author | llornkcor <llornkcor> | 2003-03-21 19:45:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-03-21 19:45:10 (UTC) |
commit | 9610419c1fe5f91f257cefa8b8753872da87445f (patch) (unidiff) | |
tree | eec1902cc5c77ebdf3eb9c88c57ca6e4ba1710ce /libopie | |
parent | d3f71dadbd2dafcf42480afeffe75e7e36ec7d9c (diff) | |
download | opie-9610419c1fe5f91f257cefa8b8753872da87445f.zip opie-9610419c1fe5f91f257cefa8b8753872da87445f.tar.gz opie-9610419c1fe5f91f257cefa8b8753872da87445f.tar.bz2 |
added doxygen comment docs
-rw-r--r-- | libopie/oticker.h | 95 |
1 files changed, 85 insertions, 10 deletions
diff --git a/libopie/oticker.h b/libopie/oticker.h index b7499e3..5df08da 100644 --- a/libopie/oticker.h +++ b/libopie/oticker.h | |||
@@ -30,42 +30,117 @@ | |||
30 | 30 | ||
31 | #ifndef OTICKER_H | 31 | #ifndef OTICKER_H |
32 | #define OTICKER_H | 32 | #define OTICKER_H |
33 | 33 | ||
34 | #include <qwidget.h> | 34 | #include <qwidget.h> |
35 | #include <qpainter.h> | 35 | #include <qpainter.h> |
36 | #include <qdrawutil.h> | 36 | #include <qdrawutil.h> |
37 | #include <qpixmap.h> | 37 | #include <qpixmap.h> |
38 | #include <qstring.h> | 38 | #include <qstring.h> |
39 | #include <qslider.h> | 39 | #include <qslider.h> |
40 | #include <qlabel.h> | 40 | #include <qlabel.h> |
41 | #include <qframe.h> | 41 | #include <qframe.h> |
42 | #include <qlineedit.h> | ||
43 | #include <qcolor.h> | 42 | #include <qcolor.h> |
44 | 43 | /*! | |
44 | * @class OTicker | ||
45 | * @brief The OTicker class provides a QLabel widget that scroll its contents | ||
46 | * | ||
47 | */ | ||
45 | class OTicker : public QLabel { | 48 | class OTicker : public QLabel { |
46 | //class OTicker : public QFrame { | 49 | //class OTicker : public QFrame { |
47 | Q_OBJECT | 50 | Q_OBJECT |
48 | 51 | ||
49 | public: | 52 | public: |
53 | |||
54 | /*! | ||
55 | * @fn OTicker( QWidget* parent = 0 ) | ||
56 | * @brief Object constructor. | ||
57 | * | ||
58 | * @param parent Pointer to parent of this control. | ||
59 | |||
60 | * Constructs a new OTicker control with parent | ||
61 | */ | ||
50 | OTicker( QWidget* parent=0 ); | 62 | OTicker( QWidget* parent=0 ); |
63 | /*! | ||
64 | * @fn ~OTicker() | ||
65 | * @brief Object destructor. | ||
66 | */ | ||
51 | ~OTicker(); | 67 | ~OTicker(); |
68 | /*! | ||
69 | * @fn setText() | ||
70 | * @brief sets text to be displayed | ||
71 | * @param text QString text to be displayed. | ||
72 | * | ||
73 | */ | ||
52 | void setText( const QString& text ) ; | 74 | void setText( const QString& text ) ; |
53 | void setBackgroundColor(QColor color); //sets background | 75 | /*! |
54 | void setForegroundColor(QColor color); //sets text color | 76 | * @fn setBackgroundColor(QColor color) |
55 | void setFrame(int); //sets frame style | 77 | * @brief sets color of the ticker's background |
56 | void setUpdateTime(int); //sets timeout for redraws default is 50 ms | 78 | * @param color QColor color to be set. |
57 | void setScrollLength(int); //sets amount of scrolling default is 1 | 79 | * |
80 | */ | ||
81 | void setBackgroundColor(QColor color); | ||
82 | /*! | ||
83 | * @fn setForegroundColor(QColor color) | ||
84 | * @brief sets color of text | ||
85 | * @param color QColor color of text | ||
86 | * | ||
87 | */ | ||
88 | void setForegroundColor(QColor color); | ||
89 | /*! | ||
90 | * @fn setFrame(int style) | ||
91 | * @brief sets frame style | ||
92 | * @param style int Frame style to be see. See Qt::WidgetFlags. | ||
93 | * | ||
94 | */ | ||
95 | void setFrame(int style); | ||
96 | /*! | ||
97 | * @fn setUpdateTime(int timeout) | ||
98 | * @brief sets time of update | ||
99 | * @param timeout int time in milliseconds between updates. | ||
100 | * | ||
101 | */ | ||
102 | void setUpdateTime(int timeout); | ||
103 | /*! | ||
104 | * @fn setScrollLength(int length) | ||
105 | * @brief sets amount of scrolling default is 1 | ||
106 | * @param length int scroll length. | ||
107 | * | ||
108 | */ | ||
109 | void setScrollLength(int length); | ||
58 | signals: | 110 | signals: |
59 | void mousePressed(); // for mouse press events | 111 | /*! |
112 | * @fn mousePressed() | ||
113 | * @brief signal mouse press event | ||
114 | * | ||
115 | */ | ||
116 | void mousePressed(); | ||
60 | protected: | 117 | protected: |
61 | void timerEvent( QTimerEvent * ); | 118 | /*! |
119 | * @fn timerEvent( QTimerEvent * e) | ||
120 | * @brief timer timeout event | ||
121 | * @param e QEvent see QEvent. | ||
122 | * | ||
123 | */ | ||
124 | void timerEvent( QTimerEvent * e); | ||
125 | /*! | ||
126 | * @fn drawContents( QPainter *p ) | ||
127 | * @brief draws widget contents | ||
128 | * @param p QPainter. see QPainter | ||
129 | * | ||
130 | */ | ||
62 | void drawContents( QPainter *p ); | 131 | void drawContents( QPainter *p ); |
63 | void mouseReleaseEvent ( QMouseEvent *); | 132 | /*! |
133 | * @fn mouseReleaseEvent( QMouseEvent *e) | ||
134 | * @brief mouse release event | ||
135 | * @param e QMouseEvent. see QMouseEvent. | ||
136 | * | ||
137 | */ | ||
138 | void mouseReleaseEvent( QMouseEvent *e); | ||
64 | private: | 139 | private: |
65 | QColor backgroundcolor, foregroundcolor; | 140 | QColor backgroundcolor, foregroundcolor; |
66 | QString scrollText; | 141 | QString scrollText; |
67 | QPixmap scrollTextPixmap; | 142 | QPixmap scrollTextPixmap; |
68 | int pos, updateTimerTime, scrollLength; | 143 | int pos, updateTimerTime, scrollLength; |
69 | }; | 144 | }; |
70 | 145 | ||
71 | #endif | 146 | #endif |