|
|
/*============================================================================= Copyright (C) 2001 Silicon Tao Technology Systems E-mail: SupportWeb: www.silicontao.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA =============================================================================*/ #ifndef STTtlPanel_included #define STTtlPanel_included #include #include /** * Porvides a logic analyzer view of a boolean state. Can be used * to show the status of a boolean value as a square wave. * * @short Porvides a logic analyzer view of a boolean state. */ class STTtlPanel: public QFrame, public STWidgetsEx { Q_OBJECT private: bool CurrentState; int MoveItDown; int SetPointsHi, SetPointsWide; int DrawXPoint, DrawYPoint; int MinYPoint, MaxYPoint; int MinXPoint, MaxXPoint; bool IntPointer[1000]; int DrawRatio; QColor PreferedColor; void DrawVerticalLine(QPainter *Painter); public: // Member functions /** * Change the color of the square wave. */ void SetPreferedColor(QColor SetColor); /** * Sets the status of the boolean state and advances the sqware wave one pixal. */ void SetPoint(bool BitState); /** * */ void SetPointRatio(int NewRatio); /** * Advances the sqware wave one pixal with out changing state. */ void Advance(); /** * Togels the status of the boolean state and advances the sqware wave one pixal. */ void TogelState(); /** * Returns status of the boolean state. */ bool GetState(); /** * If you resize the panel, call this to set the draw points again. */ void ResetSize(); /** * Constructor */ STTtlPanel(QWidget *parent, const char *name, int PointsHi, int PointsWide); /** * Destructor */ ~STTtlPanel(); private slots: // Place member function declarations here. protected: // Some standard widget virtual members //virtual void paintEvent(QPaintEvent *TheEventPointer); virtual void drawContents(QPainter *Painter); }; #endif // STTtlPanel_included
Generated by: root on UtopiaPlanitia.Ept on Mon Dec 10 22:55:12 2001, using kdoc 2.0a53. |