31 files changed, 738 insertions, 80 deletions
diff --git a/libopie/colordialog.cpp b/libopie/colordialog.cpp index 684d6ea..35f15d6 100644 --- a/libopie/colordialog.cpp +++ b/libopie/colordialog.cpp | |||
@@ -59,2 +59,7 @@ static inline void rgb2hsv( QRgb rgb, int&h, int&s, int&v ) | |||
59 | 59 | ||
60 | /* | ||
61 | * avoid clashes with the original Qt | ||
62 | */ | ||
63 | namespace { | ||
64 | |||
60 | class QColorPicker : public QFrame | 65 | class QColorPicker : public QFrame |
@@ -609,2 +614,4 @@ void QColorShower::setHsv( int h, int s, int v ) | |||
609 | 614 | ||
615 | } | ||
616 | |||
610 | class OColorDialogPrivate : public QObject | 617 | class OColorDialogPrivate : public QObject |
@@ -615,3 +622,3 @@ public: | |||
615 | QRgb currentColor() const { return cs->currentColor(); } | 622 | QRgb currentColor() const { return cs->currentColor(); } |
616 | void setCurrentColor( QRgb rgb ); | 623 | void setCurrentColor( const QRgb& rgb ); |
617 | 624 | ||
@@ -639,3 +646,3 @@ void OColorDialogPrivate::newHsv( int h, int s, int v ) | |||
639 | //sets all widgets to display rgb | 646 | //sets all widgets to display rgb |
640 | void OColorDialogPrivate::setCurrentColor( QRgb rgb ) | 647 | void OColorDialogPrivate::setCurrentColor( const QRgb& rgb ) |
641 | { | 648 | { |
@@ -728,3 +735,3 @@ OColorDialog::OColorDialog(QWidget* parent, const char* name, bool modal) : | |||
728 | 735 | ||
729 | QColor OColorDialog::getColor( QColor initial, QWidget *parent, | 736 | QColor OColorDialog::getColor( const QColor& initial, QWidget *parent, |
730 | const char *name ) | 737 | const char *name ) |
@@ -765,3 +772,3 @@ QColor OColorDialog::getColor( QColor initial, QWidget *parent, | |||
765 | 772 | ||
766 | QRgb OColorDialog::getRgba( QRgb initial, bool *ok, | 773 | QRgb OColorDialog::getRgba( const QRgb& initial, bool *ok, |
767 | QWidget *parent, const char* name ) | 774 | QWidget *parent, const char* name ) |
@@ -821,3 +828,3 @@ OColorDialog::~OColorDialog() | |||
821 | 828 | ||
822 | void OColorDialog::setColor( QColor c ) | 829 | void OColorDialog::setColor( const QColor& c ) |
823 | { | 830 | { |
diff --git a/libopie/colordialog.h b/libopie/colordialog.h index 926f8f2..e9bb7ed 100644 --- a/libopie/colordialog.h +++ b/libopie/colordialog.h | |||
@@ -63,4 +63,4 @@ class Q_EXPORT OColorDialog : public QDialog | |||
63 | public: | 63 | public: |
64 | static QColor getColor( QColor, QWidget *parent=0, const char* name=0 ); // ### 3.0: make const QColor& | 64 | static QColor getColor( const QColor&, QWidget *parent=0, const char* name=0 ); |
65 | static QRgb getRgba( QRgb, bool* ok = 0, | 65 | static QRgb getRgba( const QRgb&, bool* ok = 0, |
66 | QWidget *parent=0, const char* name=0 ); | 66 | QWidget *parent=0, const char* name=0 ); |
@@ -71,3 +71,3 @@ private: | |||
71 | OColorDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE ); | 71 | OColorDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE ); |
72 | void setColor( QColor ); // ### 3.0: make const QColor& | 72 | void setColor( const QColor& ); |
73 | QColor color() const; | 73 | QColor color() const; |
diff --git a/libopie/colorpopupmenu.cpp b/libopie/colorpopupmenu.cpp index 510a2ad..dac10e9 100644 --- a/libopie/colorpopupmenu.cpp +++ b/libopie/colorpopupmenu.cpp | |||
@@ -39,3 +39,3 @@ | |||
39 | 39 | ||
40 | ColorPanelButton::ColorPanelButton( const QColor& color, QWidget* parent, const char* name ) | 40 | OColorPanelButton::OColorPanelButton( const QColor& color, QWidget* parent, const char* name ) |
41 | : QFrame( parent, name ) | 41 | : QFrame( parent, name ) |
@@ -48,3 +48,3 @@ ColorPanelButton::ColorPanelButton( const QColor& color, QWidget* parent, const | |||
48 | 48 | ||
49 | ColorPanelButton::~ColorPanelButton() | 49 | OColorPanelButton::~OColorPanelButton() |
50 | { | 50 | { |
@@ -52,3 +52,3 @@ ColorPanelButton::~ColorPanelButton() | |||
52 | 52 | ||
53 | void ColorPanelButton::setActive( bool active ) | 53 | void OColorPanelButton::setActive( bool active ) |
54 | { | 54 | { |
@@ -63,6 +63,4 @@ void ColorPanelButton::setActive( bool active ) | |||
63 | 63 | ||
64 | void ColorPanelButton::enterEvent( QEvent* e ) | 64 | void OColorPanelButton::enterEvent( QEvent* ) |
65 | { | 65 | { |
66 | Q_UNUSED( e ) | ||
67 | |||
68 | if ( !m_active ) { | 66 | if ( !m_active ) { |
@@ -72,6 +70,4 @@ void ColorPanelButton::enterEvent( QEvent* e ) | |||
72 | 70 | ||
73 | void ColorPanelButton::leaveEvent( QEvent* e ) | 71 | void OColorPanelButton::leaveEvent( QEvent* ) |
74 | { | 72 | { |
75 | Q_UNUSED( e ) | ||
76 | |||
77 | if ( !m_active ) { | 73 | if ( !m_active ) { |
@@ -81,3 +77,3 @@ void ColorPanelButton::leaveEvent( QEvent* e ) | |||
81 | 77 | ||
82 | void ColorPanelButton::paintEvent( QPaintEvent* e ) | 78 | void OColorPanelButton::paintEvent( QPaintEvent* e ) |
83 | { | 79 | { |
@@ -93,6 +89,4 @@ void ColorPanelButton::paintEvent( QPaintEvent* e ) | |||
93 | 89 | ||
94 | void ColorPanelButton::mouseReleaseEvent( QMouseEvent* e ) | 90 | void OColorPanelButton::mouseReleaseEvent( QMouseEvent* ) |
95 | { | 91 | { |
96 | Q_UNUSED( e ) | ||
97 | |||
98 | emit selected( m_color ); | 92 | emit selected( m_color ); |
@@ -100,3 +94,3 @@ void ColorPanelButton::mouseReleaseEvent( QMouseEvent* e ) | |||
100 | 94 | ||
101 | ColorPopupMenu::ColorPopupMenu( const QColor& color, QWidget* parent, const char* name ) | 95 | OColorPopupMenu::OColorPopupMenu( const QColor& color, QWidget* parent, const char* name ) |
102 | : QPopupMenu( parent, name ) | 96 | : QPopupMenu( parent, name ) |
@@ -151,3 +145,3 @@ ColorPopupMenu::ColorPopupMenu( const QColor& color, QWidget* parent, const char | |||
151 | 145 | ||
152 | ColorPopupMenu::~ColorPopupMenu() | 146 | OColorPopupMenu::~OColorPopupMenu() |
153 | { | 147 | { |
@@ -155,5 +149,5 @@ ColorPopupMenu::~ColorPopupMenu() | |||
155 | 149 | ||
156 | void ColorPopupMenu::addColor( const QColor& color, int row, int col ) | 150 | void OColorPopupMenu::addColor( const QColor& color, int row, int col ) |
157 | { | 151 | { |
158 | ColorPanelButton* panelButton = new ColorPanelButton( color, colorPanel ); | 152 | OColorPanelButton* panelButton = new OColorPanelButton( color, colorPanel ); |
159 | connect( panelButton, SIGNAL( selected( const QColor& ) ), this, SLOT( buttonSelected( const QColor& ) ) ); | 153 | connect( panelButton, SIGNAL( selected( const QColor& ) ), this, SLOT( buttonSelected( const QColor& ) ) ); |
@@ -162,3 +156,3 @@ void ColorPopupMenu::addColor( const QColor& color, int row, int col ) | |||
162 | 156 | ||
163 | void ColorPopupMenu::buttonSelected( const QColor& color ) | 157 | void OColorPopupMenu::buttonSelected( const QColor& color ) |
164 | { | 158 | { |
@@ -169,3 +163,3 @@ void ColorPopupMenu::buttonSelected( const QColor& color ) | |||
169 | 163 | ||
170 | void ColorPopupMenu::moreColorClicked() | 164 | void OColorPopupMenu::moreColorClicked() |
171 | { | 165 | { |
diff --git a/libopie/colorpopupmenu.h b/libopie/colorpopupmenu.h index b0453b2..184b132 100644 --- a/libopie/colorpopupmenu.h +++ b/libopie/colorpopupmenu.h | |||
@@ -42,12 +42,12 @@ class QGridLayout; | |||
42 | /** | 42 | /** |
43 | * @class ColorPanelButton | 43 | * @class OColorPanelButton |
44 | * @brief The ColorPanelButton class provides a button for color selection. | 44 | * @brief The OColorPanelButton class provides a button for color selection. |
45 | * | 45 | * |
46 | * @see ColorPopupMenu | 46 | * @see OColorPopupMenu |
47 | * | 47 | * |
48 | * The ColorPanelButton class provides a button for color selection. The button | 48 | * The OColorPanelButton class provides a button for color selection. The button |
49 | * is drawn with the desired color and no border. This class is used internally | 49 | * is drawn with the desired color and no border. This class is used internally |
50 | * by the ColorPopupMenu class to displaying colors in its menu. | 50 | * by the OColorPopupMenu class to displaying colors in its menu. |
51 | */ | 51 | */ |
52 | class ColorPanelButton : public QFrame | 52 | class OColorPanelButton : public QFrame |
53 | { | 53 | { |
@@ -58,3 +58,3 @@ public: | |||
58 | /** | 58 | /** |
59 | * @fn ColorPanelButton( const QColor& color, QWidget* parent = 0, const char* name = 0 ) | 59 | * @fn OColorPanelButton( const QColor& color, QWidget* parent = 0, const char* name = 0 ) |
60 | * @brief Object constructor. | 60 | * @brief Object constructor. |
@@ -67,3 +67,3 @@ public: | |||
67 | */ | 67 | */ |
68 | ColorPanelButton(const QColor& color, QWidget* parent = 0, const char* name = 0); | 68 | OColorPanelButton(const QColor& color, QWidget* parent = 0, const char* name = 0); |
69 | 69 | ||
@@ -73,3 +73,3 @@ public: | |||
73 | */ | 73 | */ |
74 | ~ColorPanelButton(); | 74 | ~OColorPanelButton(); |
75 | 75 | ||
@@ -152,7 +152,7 @@ private: | |||
152 | /** | 152 | /** |
153 | * @class ColorPopupMenu | 153 | * @class OColorPopupMenu |
154 | * @brief The ColorPopupMenu class provides a small color selection | 154 | * @brief The OColorPopupMenu class provides a small color selection |
155 | * popup menu. | 155 | * popup menu. |
156 | * | 156 | * |
157 | * ColorPopupMenu is a derivation of TrollTech's QPopupMenu and provides | 157 | * OColorPopupMenu is a derivation of TrollTech's QPopupMenu and provides |
158 | * a small color selection popup menu which can be attached to another control | 158 | * a small color selection popup menu which can be attached to another control |
@@ -164,3 +164,3 @@ private: | |||
164 | */ | 164 | */ |
165 | class ColorPopupMenu : public QPopupMenu | 165 | class OColorPopupMenu : public QPopupMenu |
166 | { | 166 | { |
@@ -171,3 +171,3 @@ public: | |||
171 | /** | 171 | /** |
172 | * @fn ColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 ) | 172 | * @fn OColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 ) |
173 | * @brief Object constructor. | 173 | * @brief Object constructor. |
@@ -178,11 +178,11 @@ public: | |||
178 | * | 178 | * |
179 | * Constructs a new ColorPopupMenu control with parent, name and initial color selected. | 179 | * Constructs a new OColorPopupMenu control with parent, name and initial color selected. |
180 | */ | 180 | */ |
181 | ColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 ); | 181 | OColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 ); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | * @fn ~ColorPopupMenu() | 184 | * @fn ~OColorPopupMenu() |
185 | * @brief Object destructor. | 185 | * @brief Object destructor. |
186 | */ | 186 | */ |
187 | ~ColorPopupMenu(); | 187 | ~OColorPopupMenu(); |
188 | 188 | ||
diff --git a/libopie/ocheckitem.cpp b/libopie/ocheckitem.cpp index d6ddc79..082d7a2 100644 --- a/libopie/ocheckitem.cpp +++ b/libopie/ocheckitem.cpp | |||
@@ -16,2 +16,9 @@ | |||
16 | 16 | ||
17 | /** | ||
18 | * Constructs an CheckItem with a QTable as parent | ||
19 | * and a sort key for. | ||
20 | * The sort key will be used by QTable to sort the table later | ||
21 | * @param t The parent QTable where the check item belongs | ||
22 | * @param key A sort key | ||
23 | */ | ||
17 | OCheckItem::OCheckItem( QTable *t, const QString &key ) | 24 | OCheckItem::OCheckItem( QTable *t, const QString &key ) |
@@ -21,2 +28,7 @@ OCheckItem::OCheckItem( QTable *t, const QString &key ) | |||
21 | 28 | ||
29 | /** | ||
30 | * reimplemted for internal reasons | ||
31 | * @return Returns the sort key of the Item | ||
32 | * @see QTableItem | ||
33 | */ | ||
22 | QString OCheckItem::key() const | 34 | QString OCheckItem::key() const |
@@ -26,2 +38,8 @@ QString OCheckItem::key() const | |||
26 | 38 | ||
39 | /** | ||
40 | * This method can check or uncheck the item. It will | ||
41 | * call QTable to update the cell. | ||
42 | * | ||
43 | * @param b Whether to check or uncheck the item | ||
44 | */ | ||
27 | void OCheckItem::setChecked( bool b ) | 45 | void OCheckItem::setChecked( bool b ) |
@@ -32,2 +50,6 @@ void OCheckItem::setChecked( bool b ) | |||
32 | 50 | ||
51 | /** | ||
52 | * This will toggle the item. If it is checked it'll get | ||
53 | * unchecked by this method or vice versa. | ||
54 | */ | ||
33 | void OCheckItem::toggle() | 55 | void OCheckItem::toggle() |
@@ -37,2 +59,7 @@ void OCheckItem::toggle() | |||
37 | 59 | ||
60 | /** | ||
61 | * This will return the state of the item. | ||
62 | * | ||
63 | * @return Returns true if the item is checked | ||
64 | */ | ||
38 | bool OCheckItem::isChecked() const | 65 | bool OCheckItem::isChecked() const |
@@ -42,2 +69,6 @@ bool OCheckItem::isChecked() const | |||
42 | 69 | ||
70 | /** | ||
71 | * @internal | ||
72 | * This paints the item | ||
73 | */ | ||
43 | void OCheckItem::paint( QPainter *p, const QColorGroup &cg, const QRect &cr, | 74 | void OCheckItem::paint( QPainter *p, const QColorGroup &cg, const QRect &cr, |
diff --git a/libopie/ocheckitem.h b/libopie/ocheckitem.h index 7885032..2387134 100644 --- a/libopie/ocheckitem.h +++ b/libopie/ocheckitem.h | |||
@@ -16,2 +16,14 @@ | |||
16 | 16 | ||
17 | /** | ||
18 | * This class represents a checkable QTableItem. This can | ||
19 | * be added to any QTable. | ||
20 | * | ||
21 | * | ||
22 | * @see QTable | ||
23 | * @see QTableItem | ||
24 | * @short An checkable QTableItem | ||
25 | * @version 1.0 | ||
26 | * @author Stefan Eilers ( eilers@handhelds.org ) | ||
27 | */ | ||
28 | |||
17 | class OCheckItem : public QTableItem | 29 | class OCheckItem : public QTableItem |
diff --git a/libopie/oclickablelabel.cpp b/libopie/oclickablelabel.cpp index 5768529..bc7037b 100644 --- a/libopie/oclickablelabel.cpp +++ b/libopie/oclickablelabel.cpp | |||
@@ -3,2 +3,9 @@ | |||
3 | 3 | ||
4 | /** | ||
5 | * This constructs the clickable ButtonLabel | ||
6 | * | ||
7 | * @param parent The parent of this label | ||
8 | * @param name A name of this label @see QObject | ||
9 | * @param fl The windowing flags | ||
10 | */ | ||
4 | OClickableLabel::OClickableLabel(QWidget* parent, | 11 | OClickableLabel::OClickableLabel(QWidget* parent, |
@@ -15,2 +22,7 @@ OClickableLabel::OClickableLabel(QWidget* parent, | |||
15 | 22 | ||
23 | /** | ||
24 | * This method makes the label behave as a toggle button | ||
25 | * | ||
26 | * @param t Whether or not to behave like a toggle button | ||
27 | */ | ||
16 | void OClickableLabel::setToggleButton(bool t) { | 28 | void OClickableLabel::setToggleButton(bool t) { |
@@ -19,2 +31,5 @@ void OClickableLabel::setToggleButton(bool t) { | |||
19 | 31 | ||
32 | /** | ||
33 | * @internal | ||
34 | */ | ||
20 | void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) { | 35 | void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) { |
@@ -27,2 +42,5 @@ void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) { | |||
27 | 42 | ||
43 | /** | ||
44 | * @internal | ||
45 | */ | ||
28 | void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { | 46 | void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { |
@@ -44,2 +62,5 @@ void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { | |||
44 | 62 | ||
63 | /** | ||
64 | * @internal | ||
65 | */ | ||
45 | void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) { | 66 | void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) { |
@@ -60,2 +81,7 @@ void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) { | |||
60 | 81 | ||
82 | /** | ||
83 | * this toggles the label and inverts the color of | ||
84 | * the label | ||
85 | * @param on | ||
86 | */ | ||
61 | void OClickableLabel::showState(bool on) { | 87 | void OClickableLabel::showState(bool on) { |
@@ -84,2 +110,5 @@ void OClickableLabel::setInverted(bool on) { | |||
84 | 110 | ||
111 | /** | ||
112 | * @param on if the Label is down or up | ||
113 | */ | ||
85 | void OClickableLabel::setOn(bool on) { | 114 | void OClickableLabel::setOn(bool on) { |
diff --git a/libopie/oclickablelabel.h b/libopie/oclickablelabel.h index f65c440..4b6dcbc 100644 --- a/libopie/oclickablelabel.h +++ b/libopie/oclickablelabel.h | |||
@@ -5,2 +5,22 @@ | |||
5 | 5 | ||
6 | /** | ||
7 | * This class is a special QLabel which can behave | ||
8 | * as a QPushButton or QToggleButton. | ||
9 | * The reason to use a clickable is if you want to save space | ||
10 | * or you want to skip the border of a normal button | ||
11 | * | ||
12 | * <pre> | ||
13 | * QLabel* lbl = new OClickableLabel( parent, "PushLabel" ); | ||
14 | * lbl->setPixmap( "config" ); | ||
15 | * QWhatsThis::add( lbl, tr("Click here to do something") ); | ||
16 | * </pre> | ||
17 | * | ||
18 | * @short A Label behaving as button | ||
19 | * @author Hakan Ardo, Maximillian Reiß ( harlekin@handhelds.org ) | ||
20 | * @see QLabel | ||
21 | * @see QPushButton | ||
22 | * @see QToggleButton | ||
23 | * @version 1.0 | ||
24 | */ | ||
25 | |||
6 | class OClickableLabel: public QLabel | 26 | class OClickableLabel: public QLabel |
@@ -12,2 +32,3 @@ public: | |||
12 | void setToggleButton(bool t); | 32 | void setToggleButton(bool t); |
33 | |||
13 | protected: | 34 | protected: |
@@ -16,2 +37,3 @@ public: | |||
16 | void mouseMoveEvent( QMouseEvent *e ); | 37 | void mouseMoveEvent( QMouseEvent *e ); |
38 | |||
17 | public slots: | 39 | public slots: |
@@ -22,6 +44,7 @@ public: | |||
22 | private: | 44 | private: |
23 | bool isToggle; | 45 | bool isToggle : 1; |
24 | bool isDown; | 46 | bool isDown : 1; |
47 | bool textInverted : 1; | ||
48 | |||
25 | void showState(bool on); | 49 | void showState(bool on); |
26 | bool textInverted; | ||
27 | void setInverted(bool on); | 50 | void setInverted(bool on); |
diff --git a/libopie/ocolorbutton.cpp b/libopie/ocolorbutton.cpp index ddb6c4f..113a77a 100644 --- a/libopie/ocolorbutton.cpp +++ b/libopie/ocolorbutton.cpp | |||
@@ -36,4 +36,3 @@ | |||
36 | 36 | ||
37 | class OColorButtonPrivate { | 37 | struct OColorButtonPrivate { |
38 | public: | ||
39 | QPopupMenu *m_menu; | 38 | QPopupMenu *m_menu; |
@@ -42,2 +41,11 @@ public: | |||
42 | 41 | ||
42 | |||
43 | /** | ||
44 | * This concstructs a Color Button with @param color as the start color | ||
45 | * It'll use a OColorPopupMenu internally | ||
46 | * | ||
47 | * @param parent The parent of the Color Button | ||
48 | * @param color The color from where to start on | ||
49 | * @param name @see QObject | ||
50 | */ | ||
43 | OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *name ) | 51 | OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *name ) |
@@ -47,3 +55,3 @@ OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *n | |||
47 | 55 | ||
48 | d-> m_menu = new ColorPopupMenu ( color, 0, 0 ); | 56 | d-> m_menu = new OColorPopupMenu ( color, 0, 0 ); |
49 | setPopup ( d-> m_menu ); | 57 | setPopup ( d-> m_menu ); |
@@ -59,2 +67,5 @@ OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *n | |||
59 | 67 | ||
68 | /** | ||
69 | * This destructs the object | ||
70 | */ | ||
60 | OColorButton::~OColorButton ( ) | 71 | OColorButton::~OColorButton ( ) |
@@ -64,2 +75,5 @@ OColorButton::~OColorButton ( ) | |||
64 | 75 | ||
76 | /** | ||
77 | * @return Returns the current color of the button | ||
78 | */ | ||
65 | QColor OColorButton::color ( ) const | 79 | QColor OColorButton::color ( ) const |
@@ -69,2 +83,6 @@ QColor OColorButton::color ( ) const | |||
69 | 83 | ||
84 | /** | ||
85 | * This method sets the color of the button | ||
86 | * @param c The color to be set. | ||
87 | */ | ||
70 | void OColorButton::setColor ( const QColor &c ) | 88 | void OColorButton::setColor ( const QColor &c ) |
@@ -74,2 +92,5 @@ void OColorButton::setColor ( const QColor &c ) | |||
74 | 92 | ||
93 | /** | ||
94 | * @internal | ||
95 | */ | ||
75 | void OColorButton::updateColor ( const QColor &c ) | 96 | void OColorButton::updateColor ( const QColor &c ) |
diff --git a/libopie/ocolorbutton.h b/libopie/ocolorbutton.h index fe40fae..338e654 100644 --- a/libopie/ocolorbutton.h +++ b/libopie/ocolorbutton.h | |||
@@ -36,2 +36,9 @@ class QColor; | |||
36 | 36 | ||
37 | /** | ||
38 | * | ||
39 | * @short A Button which will show a OColorPopupMenu | ||
40 | * @author Robert Griebl ( sandman@handhelds.org ) | ||
41 | * @version 1.0 | ||
42 | * @see QPushButton | ||
43 | */ | ||
37 | class OColorButton : public QPushButton { | 44 | class OColorButton : public QPushButton { |
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 9b2a954..8f954b1 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -55,3 +55,3 @@ class ODeviceData { | |||
55 | public: | 55 | public: |
56 | bool m_qwsserver; | 56 | bool m_qwsserver : 1; |
57 | 57 | ||
@@ -272,2 +272,5 @@ void ODevice::init ( ) | |||
272 | 272 | ||
273 | /** | ||
274 | * This method initialises the button mapping | ||
275 | */ | ||
273 | void ODevice::initButtons ( ) | 276 | void ODevice::initButtons ( ) |
@@ -315,3 +318,13 @@ bool ODevice::setSoftSuspend ( bool /*soft*/ ) | |||
315 | 318 | ||
316 | 319 | /** | |
320 | * This method will try to suspend the device | ||
321 | * It only works if the user is the QWS Server and the apm application | ||
322 | * is installed. | ||
323 | * It tries to suspend and then waits some time cause some distributions | ||
324 | * do have asynchronus apm implementations. | ||
325 | * This method will either fail and return false or it'll suspend the | ||
326 | * device and return once the device got woken up | ||
327 | * | ||
328 | * @return if the device got suspended | ||
329 | */ | ||
317 | bool ODevice::suspend ( ) | 330 | bool ODevice::suspend ( ) |
@@ -356,3 +369,5 @@ bool ODevice::suspend ( ) | |||
356 | 369 | ||
357 | 370 | /** | |
371 | * This sets the display on or off | ||
372 | */ | ||
358 | bool ODevice::setDisplayStatus ( bool on ) | 373 | bool ODevice::setDisplayStatus ( bool on ) |
@@ -372,4 +387,9 @@ bool ODevice::setDisplayStatus ( bool on ) | |||
372 | 387 | ||
373 | bool ODevice::setDisplayBrightness ( int ) | 388 | /** |
389 | * This sets the display brightness | ||
390 | * @return success or failure | ||
391 | */ | ||
392 | bool ODevice::setDisplayBrightness ( int p) | ||
374 | { | 393 | { |
394 | Q_UNUSED( p ) | ||
375 | return false; | 395 | return false; |
@@ -382,2 +402,6 @@ int ODevice::displayBrightnessResolution ( ) const | |||
382 | 402 | ||
403 | /** | ||
404 | * This returns the vendor as string | ||
405 | * @return Vendor as QString | ||
406 | */ | ||
383 | QString ODevice::vendorString ( ) const | 407 | QString ODevice::vendorString ( ) const |
@@ -387,2 +411,6 @@ QString ODevice::vendorString ( ) const | |||
387 | 411 | ||
412 | /** | ||
413 | * This returns the vendor as one of the values of OVendor | ||
414 | * @return OVendor | ||
415 | */ | ||
388 | OVendor ODevice::vendor ( ) const | 416 | OVendor ODevice::vendor ( ) const |
@@ -392,2 +420,6 @@ OVendor ODevice::vendor ( ) const | |||
392 | 420 | ||
421 | /** | ||
422 | * This returns the model as a string | ||
423 | * @return A string representing the model | ||
424 | */ | ||
393 | QString ODevice::modelString ( ) const | 425 | QString ODevice::modelString ( ) const |
@@ -397,2 +429,5 @@ QString ODevice::modelString ( ) const | |||
397 | 429 | ||
430 | /** | ||
431 | * This does return the OModel used | ||
432 | */ | ||
398 | OModel ODevice::model ( ) const | 433 | OModel ODevice::model ( ) const |
@@ -402,2 +437,5 @@ OModel ODevice::model ( ) const | |||
402 | 437 | ||
438 | /** | ||
439 | * This does return the systen name | ||
440 | */ | ||
403 | QString ODevice::systemString ( ) const | 441 | QString ODevice::systemString ( ) const |
@@ -407,2 +445,5 @@ QString ODevice::systemString ( ) const | |||
407 | 445 | ||
446 | /** | ||
447 | * Return System as OSystem value | ||
448 | */ | ||
408 | OSystem ODevice::system ( ) const | 449 | OSystem ODevice::system ( ) const |
@@ -412,2 +453,5 @@ OSystem ODevice::system ( ) const | |||
412 | 453 | ||
454 | /** | ||
455 | * @return the version string of the base system | ||
456 | */ | ||
413 | QString ODevice::systemVersionString ( ) const | 457 | QString ODevice::systemVersionString ( ) const |
@@ -417,2 +461,5 @@ QString ODevice::systemVersionString ( ) const | |||
417 | 461 | ||
462 | /** | ||
463 | * @return the current Transformation | ||
464 | */ | ||
418 | Transformation ODevice::rotation ( ) const | 465 | Transformation ODevice::rotation ( ) const |
@@ -422,2 +469,5 @@ Transformation ODevice::rotation ( ) const | |||
422 | 469 | ||
470 | /** | ||
471 | * This plays an alarmSound | ||
472 | */ | ||
423 | void ODevice::alarmSound ( ) | 473 | void ODevice::alarmSound ( ) |
@@ -432,2 +482,5 @@ void ODevice::alarmSound ( ) | |||
432 | 482 | ||
483 | /** | ||
484 | * This plays a key sound | ||
485 | */ | ||
433 | void ODevice::keySound ( ) | 486 | void ODevice::keySound ( ) |
@@ -442,2 +495,5 @@ void ODevice::keySound ( ) | |||
442 | 495 | ||
496 | /** | ||
497 | * This plays a touch sound | ||
498 | */ | ||
443 | void ODevice::touchSound ( ) | 499 | void ODevice::touchSound ( ) |
@@ -453,3 +509,7 @@ void ODevice::touchSound ( ) | |||
453 | 509 | ||
454 | 510 | /** | |
511 | * This method will return a list of leds | ||
512 | * available on this device | ||
513 | * @return a list of LEDs. | ||
514 | */ | ||
455 | QValueList <OLed> ODevice::ledList ( ) const | 515 | QValueList <OLed> ODevice::ledList ( ) const |
@@ -459,2 +519,5 @@ QValueList <OLed> ODevice::ledList ( ) const | |||
459 | 519 | ||
520 | /** | ||
521 | * This does return the state of the LEDs | ||
522 | */ | ||
460 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const | 523 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const |
@@ -464,2 +527,5 @@ QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const | |||
464 | 527 | ||
528 | /** | ||
529 | * @return the state for a given OLed | ||
530 | */ | ||
465 | OLedState ODevice::ledState ( OLed /*which*/ ) const | 531 | OLedState ODevice::ledState ( OLed /*which*/ ) const |
@@ -469,4 +535,12 @@ OLedState ODevice::ledState ( OLed /*which*/ ) const | |||
469 | 535 | ||
470 | bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ ) | 536 | /** |
537 | * Set the state for a LED | ||
538 | * @param which Which OLed to use | ||
539 | * @param st The state to set | ||
540 | * @return success or failure | ||
541 | */ | ||
542 | bool ODevice::setLedState ( OLed which, OLedState st ) | ||
471 | { | 543 | { |
544 | Q_UNUSED( which ) | ||
545 | Q_UNUSED( st ) | ||
472 | return false; | 546 | return false; |
@@ -474,2 +548,5 @@ bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ ) | |||
474 | 548 | ||
549 | /** | ||
550 | * @return if the device has a light sensor | ||
551 | */ | ||
475 | bool ODevice::hasLightSensor ( ) const | 552 | bool ODevice::hasLightSensor ( ) const |
@@ -479,2 +556,5 @@ bool ODevice::hasLightSensor ( ) const | |||
479 | 556 | ||
557 | /** | ||
558 | * @return a value from the light senso | ||
559 | */ | ||
480 | int ODevice::readLightSensor ( ) | 560 | int ODevice::readLightSensor ( ) |
@@ -484,2 +564,5 @@ int ODevice::readLightSensor ( ) | |||
484 | 564 | ||
565 | /** | ||
566 | * @return the light sensor resolution whatever that is ;) | ||
567 | */ | ||
485 | int ODevice::lightSensorResolution ( ) const | 568 | int ODevice::lightSensorResolution ( ) const |
@@ -489,2 +572,5 @@ int ODevice::lightSensorResolution ( ) const | |||
489 | 572 | ||
573 | /** | ||
574 | * @return a list of hardware buttons | ||
575 | */ | ||
490 | const QValueList <ODeviceButton> &ODevice::buttons ( ) | 576 | const QValueList <ODeviceButton> &ODevice::buttons ( ) |
@@ -496,2 +582,5 @@ const QValueList <ODeviceButton> &ODevice::buttons ( ) | |||
496 | 582 | ||
583 | /** | ||
584 | * @return The amount of time that would count as a hold | ||
585 | */ | ||
497 | uint ODevice::buttonHoldTime ( ) const | 586 | uint ODevice::buttonHoldTime ( ) const |
@@ -501,2 +590,9 @@ uint ODevice::buttonHoldTime ( ) const | |||
501 | 590 | ||
591 | /** | ||
592 | * This method return a ODeviceButton for a key code | ||
593 | * or 0 if no special hardware button is available for the device | ||
594 | * | ||
595 | * @return The devicebutton or 0l | ||
596 | * @see ODeviceButton | ||
597 | */ | ||
502 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) | 598 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) |
diff --git a/libopie/odevice.h b/libopie/odevice.h index ff578d8..45a790b 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -34,4 +34,7 @@ namespace Opie { | |||
34 | 34 | ||
35 | /** | ||
36 | * The available devices | ||
37 | */ | ||
35 | enum OModel { | 38 | enum OModel { |
36 | Model_Unknown, | 39 | Model_Unknown, // = 0 |
37 | 40 | ||
@@ -57,2 +60,5 @@ enum OModel { | |||
57 | 60 | ||
61 | /** | ||
62 | * The vendor of the device | ||
63 | */ | ||
58 | enum OVendor { | 64 | enum OVendor { |
@@ -64,2 +70,5 @@ enum OVendor { | |||
64 | 70 | ||
71 | /** | ||
72 | * The System used | ||
73 | */ | ||
65 | enum OSystem { | 74 | enum OSystem { |
@@ -96,2 +105,13 @@ enum OHardKey { | |||
96 | 105 | ||
106 | /** | ||
107 | * A singleton which gives informations about device specefic option | ||
108 | * like the Hardware used, LEDs, the Base Distribution and | ||
109 | * hardware key mappings. | ||
110 | * | ||
111 | * | ||
112 | * @short A small class for device specefic options | ||
113 | * @see QObject | ||
114 | * @author Robert Griebl | ||
115 | * @version 1.0 | ||
116 | */ | ||
97 | class ODevice : public QObject { | 117 | class ODevice : public QObject { |
@@ -100,2 +120,3 @@ class ODevice : public QObject { | |||
100 | private: | 120 | private: |
121 | /* disable copy */ | ||
101 | ODevice ( const ODevice & ); | 122 | ODevice ( const ODevice & ); |
@@ -110,4 +131,6 @@ protected: | |||
110 | public: | 131 | public: |
132 | // sandman do we want to allow destructions? -zecke? | ||
111 | virtual ~ODevice ( ); | 133 | virtual ~ODevice ( ); |
112 | 134 | ||
135 | |||
113 | static ODevice *inst ( ); | 136 | static ODevice *inst ( ); |
@@ -140,3 +163,3 @@ public: | |||
140 | // input / output | 163 | // input / output |
141 | 164 | //FIXME playAlarmSound and al might be better -zecke | |
142 | virtual void alarmSound ( ); | 165 | virtual void alarmSound ( ); |
diff --git a/libopie/odevicebutton.h b/libopie/odevicebutton.h index 5281ab2..cf91bbd 100644 --- a/libopie/odevicebutton.h +++ b/libopie/odevicebutton.h | |||
@@ -60,2 +60,6 @@ private: | |||
60 | * may be used to describe this button to the user in help documentation. | 60 | * may be used to describe this button to the user in help documentation. |
61 | * | ||
62 | * @version 1.0 | ||
63 | * @author Trolltech | ||
64 | * @short A representation of buttons | ||
61 | */ | 65 | */ |
diff --git a/libopie/ofiledialog.cc b/libopie/ofiledialog.cc index 4783004..9e725c2 100644 --- a/libopie/ofiledialog.cc +++ b/libopie/ofiledialog.cc | |||
@@ -35,2 +35,13 @@ | |||
35 | 35 | ||
36 | /** | ||
37 | * This constructs a modal dialog | ||
38 | * | ||
39 | * @param caption The caption of the dialog | ||
40 | * @param wid The parent widget | ||
41 | * @param mode The mode of the OFileSelector @see OFileSelector | ||
42 | * @param selector The selector of the OFileSelector | ||
43 | * @param dirName the dir or resource to start from | ||
44 | * @param fileName a proposed or existing filename | ||
45 | * @param mimetypes The mimeTypes | ||
46 | */ | ||
36 | OFileDialog::OFileDialog(const QString &caption, | 47 | OFileDialog::OFileDialog(const QString &caption, |
@@ -62,2 +73,6 @@ OFileDialog::OFileDialog(const QString &caption, | |||
62 | } | 73 | } |
74 | /** | ||
75 | * @returns the mimetype of the selected | ||
76 | * currently it return QString::null | ||
77 | */ | ||
63 | QString OFileDialog::mimetype()const | 78 | QString OFileDialog::mimetype()const |
@@ -66,2 +81,6 @@ QString OFileDialog::mimetype()const | |||
66 | } | 81 | } |
82 | |||
83 | /** | ||
84 | * @return the fileName | ||
85 | */ | ||
67 | QString OFileDialog::fileName()const | 86 | QString OFileDialog::fileName()const |
@@ -70,2 +89,6 @@ QString OFileDialog::fileName()const | |||
70 | } | 89 | } |
90 | |||
91 | /** | ||
92 | * return a DocLnk to the current file | ||
93 | */ | ||
71 | DocLnk OFileDialog::selectedDocument()const | 94 | DocLnk OFileDialog::selectedDocument()const |
@@ -74,2 +97,14 @@ DocLnk OFileDialog::selectedDocument()const | |||
74 | } | 97 | } |
98 | |||
99 | /** | ||
100 | * This opens up a filedialog in Open mode | ||
101 | * | ||
102 | * @param selector the Selector Mode | ||
103 | * @param startDir Where to start from | ||
104 | * @param file A proposed filename | ||
105 | * @param mimes A list of MimeTypes | ||
106 | * @param wid the parent | ||
107 | * @param caption of the dialog if QString::null tr("Open") will be used | ||
108 | * @return the fileName or QString::null | ||
109 | */ | ||
75 | QString OFileDialog::getOpenFileName(int selector, | 110 | QString OFileDialog::getOpenFileName(int selector, |
@@ -90,2 +125,7 @@ QString OFileDialog::getOpenFileName(int selector, | |||
90 | } | 125 | } |
126 | |||
127 | /** | ||
128 | * This opens up a file dialog in save mode | ||
129 | * @see getOpenFileName | ||
130 | */ | ||
91 | QString OFileDialog::getSaveFileName(int selector, | 131 | QString OFileDialog::getSaveFileName(int selector, |
diff --git a/libopie/ofiledialog.h b/libopie/ofiledialog.h index e14253c..309086b 100644 --- a/libopie/ofiledialog.h +++ b/libopie/ofiledialog.h | |||
@@ -36,2 +36,25 @@ | |||
36 | 36 | ||
37 | /** | ||
38 | * This class places a OFileSelector inside a QDialog. | ||
39 | * It provides static method for letting a user chose | ||
40 | * a file for either opening or saving. | ||
41 | * Most of the time the c'tor will not be used instead using | ||
42 | * the static member functions is prefered. | ||
43 | * | ||
44 | * <pre> | ||
45 | * QMap<QString, QStringList> mimeTypes; | ||
46 | * QStringList types; | ||
47 | * types << "text/* "; | ||
48 | * mimeTypes.insert( tr("Text"), types ); | ||
49 | * mimeTypes.insert( tr("All"), " * / * " ); // remove the spaces in the 2nd comment | ||
50 | * QString fileName= OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | ||
51 | * "foo","bar", mimeTypes); | ||
52 | * </pre> | ||
53 | * | ||
54 | * @short A small QDialog swalloing a FileSelector | ||
55 | * @see QDialog | ||
56 | * @see OFileSelector | ||
57 | * @version 0.1-unfinished | ||
58 | * @author Holger Freyther ( zecke@handhelds.org ) | ||
59 | */ | ||
37 | class OFileDialog : public QDialog { | 60 | class OFileDialog : public QDialog { |
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h index 17c494e..06ac806 100644 --- a/libopie/ofileselector.h +++ b/libopie/ofileselector.h | |||
@@ -123,2 +123,4 @@ class OFileSelector : public QWidget { | |||
123 | // currently only for the FILESELECTOR Mode | 123 | // currently only for the FILESELECTOR Mode |
124 | /** | ||
125 | */ | ||
124 | void setNewVisible( bool /*b*/ ); | 126 | void setNewVisible( bool /*b*/ ); |
diff --git a/libopie/ofontmenu.cc b/libopie/ofontmenu.cc index 52ff3ee..d16c5e5 100644 --- a/libopie/ofontmenu.cc +++ b/libopie/ofontmenu.cc | |||
@@ -6,3 +6,9 @@ | |||
6 | 6 | ||
7 | 7 | /** | |
8 | * Constructs the FontMenu. | ||
9 | * | ||
10 | * @param parent The parent widget | ||
11 | * @param name A name for this widget | ||
12 | * @param list The list of widgets to be controlled | ||
13 | */ | ||
8 | OFontMenu::OFontMenu(QWidget *parent, const char *name, const QList<QWidget> &list ) | 14 | OFontMenu::OFontMenu(QWidget *parent, const char *name, const QList<QWidget> &list ) |
@@ -22,2 +28,9 @@ OFontMenu::OFontMenu(QWidget *parent, const char *name, const QList<QWidget> &li | |||
22 | } | 28 | } |
29 | |||
30 | /** | ||
31 | * This method saves the font size | ||
32 | * into a Config object | ||
33 | * OFontMenu will be used as group and size as key | ||
34 | * @param cfg The Config object to be used | ||
35 | */ | ||
23 | void OFontMenu::save(Config *cfg ) | 36 | void OFontMenu::save(Config *cfg ) |
@@ -27,2 +40,8 @@ void OFontMenu::save(Config *cfg ) | |||
27 | } | 40 | } |
41 | |||
42 | /** | ||
43 | * This method restores the font size from a Config object | ||
44 | * it'll apply the sizes to the widgets and will also set the | ||
45 | * menu appropriate | ||
46 | */ | ||
28 | void OFontMenu::restore(Config *cfg ) | 47 | void OFontMenu::restore(Config *cfg ) |
@@ -49,2 +68,7 @@ void OFontMenu::restore(Config *cfg ) | |||
49 | } | 68 | } |
69 | |||
70 | /** | ||
71 | * set the list of widgets | ||
72 | * @param list the widget list | ||
73 | */ | ||
50 | void OFontMenu::setWidgets(const QList<QWidget> &list ) | 74 | void OFontMenu::setWidgets(const QList<QWidget> &list ) |
@@ -53,2 +77,7 @@ void OFontMenu::setWidgets(const QList<QWidget> &list ) | |||
53 | } | 77 | } |
78 | |||
79 | /** | ||
80 | * add a widget to the list | ||
81 | * @param wid The widget to be added | ||
82 | */ | ||
54 | void OFontMenu::addWidget( QWidget *wid ) | 83 | void OFontMenu::addWidget( QWidget *wid ) |
@@ -57,2 +86,7 @@ void OFontMenu::addWidget( QWidget *wid ) | |||
57 | } | 86 | } |
87 | |||
88 | /** | ||
89 | * removes the widget from the list of controlled objects | ||
90 | * @param wid the to be removed widget | ||
91 | */ | ||
58 | void OFontMenu::removeWidget( QWidget *wid ) | 92 | void OFontMenu::removeWidget( QWidget *wid ) |
@@ -61,2 +95,6 @@ void OFontMenu::removeWidget( QWidget *wid ) | |||
61 | } | 95 | } |
96 | |||
97 | /** | ||
98 | * The list of controlled widgets | ||
99 | */ | ||
62 | const QList<QWidget> &OFontMenu::widgets()const | 100 | const QList<QWidget> &OFontMenu::widgets()const |
@@ -65,2 +103,8 @@ const QList<QWidget> &OFontMenu::widgets()const | |||
65 | } | 103 | } |
104 | |||
105 | /** | ||
106 | * Forces a size on a widget | ||
107 | * @param wid The widget | ||
108 | * @param size The font size forced onto the widget | ||
109 | */ | ||
66 | void OFontMenu::forceSize(QWidget *wid, int size ) | 110 | void OFontMenu::forceSize(QWidget *wid, int size ) |
diff --git a/libopie/ofontmenu.h b/libopie/ofontmenu.h index 5fd515f..6e143ca 100644 --- a/libopie/ofontmenu.h +++ b/libopie/ofontmenu.h | |||
@@ -39,3 +39,5 @@ | |||
39 | 39 | ||
40 | 40 | /* | |
41 | * @internal | ||
42 | */ | ||
41 | namespace { | 43 | namespace { |
@@ -48,4 +50,26 @@ namespace { | |||
48 | 50 | ||
49 | // if i would be on kde this would be a KActionMenu... | 51 | // forward declarations |
50 | class Config; | 52 | class Config; |
53 | |||
54 | /** | ||
55 | * This class is a specialised QPopupMenu. It'll display three different | ||
56 | * font sizes. Small, Normal and large by adding widgets to the Menu | ||
57 | * you can control the font size of these widgets | ||
58 | * by using the save and restore method you can also apply font sizes | ||
59 | * over two different runtimes | ||
60 | * | ||
61 | * <pre> | ||
62 | * QTable* tbl = new QTable(); | ||
63 | * QList<QWidget> wid; | ||
64 | * wid.append( tbl ); | ||
65 | * OFontMenu* menu = new OFontMenu(this, "Popup Menu", wid ); | ||
66 | * Config cfg("mycfg"); | ||
67 | * menu->restore( cfg ); | ||
68 | * </pre> | ||
69 | * | ||
70 | * @author Holger Freyther ( zecke@handhelds.org ) | ||
71 | * @version 0.1 | ||
72 | * @short PopupMenu which can control the size of Widgets | ||
73 | * @see QPopupMenu | ||
74 | */ | ||
51 | class OFontMenu : public QPopupMenu { | 75 | class OFontMenu : public QPopupMenu { |
@@ -63,3 +87,8 @@ class OFontMenu : public QPopupMenu { | |||
63 | signals: | 87 | signals: |
88 | /** | ||
89 | * this signal gets emitted when the font size gets changed | ||
90 | * @param size The new size of font | ||
91 | */ | ||
64 | void fontChanged(int size ); | 92 | void fontChanged(int size ); |
93 | |||
65 | private: | 94 | private: |
@@ -70,2 +99,3 @@ class OFontMenu : public QPopupMenu { | |||
70 | OFontMenuPrivate *d; | 99 | OFontMenuPrivate *d; |
100 | |||
71 | private slots: | 101 | private slots: |
diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp index b905474..c8471cc 100644 --- a/libopie/ofontselector.cpp +++ b/libopie/ofontselector.cpp | |||
@@ -46,3 +46,3 @@ public: | |||
46 | 46 | ||
47 | bool m_pointbug; | 47 | bool m_pointbug : 1; |
48 | 48 | ||
@@ -51,2 +51,3 @@ public: | |||
51 | 51 | ||
52 | namespace { | ||
52 | 53 | ||
@@ -96,3 +97,4 @@ static int findItemCB ( QComboBox *box, const QString &str ) | |||
96 | 97 | ||
97 | 98 | } | |
99 | /* static same as anon. namespace */ | ||
98 | static int qt_version ( ) | 100 | static int qt_version ( ) |
@@ -104,3 +106,9 @@ static int qt_version ( ) | |||
104 | 106 | ||
105 | 107 | /** | |
108 | * Constructs the Selector object | ||
109 | * @param withpreview If a font preview should be given | ||
110 | * @param parent The parent of the Font Selector | ||
111 | * @param name The name of the object | ||
112 | * @param fl WidgetFlags | ||
113 | */ | ||
106 | OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) | 114 | OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) |
@@ -154,2 +162,7 @@ OFontSelector::~OFontSelector ( ) | |||
154 | 162 | ||
163 | /** | ||
164 | * This methods tries to set the font | ||
165 | * @param f The wishes font | ||
166 | * @return success or failure | ||
167 | */ | ||
155 | bool OFontSelector::setSelectedFont ( const QFont &f ) | 168 | bool OFontSelector::setSelectedFont ( const QFont &f ) |
@@ -159,3 +172,11 @@ bool OFontSelector::setSelectedFont ( const QFont &f ) | |||
159 | 172 | ||
160 | bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ ) | 173 | |
174 | /** | ||
175 | * This is an overloaded method @see setSelectedFont | ||
176 | * @param familyStr The family of the font | ||
177 | * @param styleStr The style of the font | ||
178 | * @param sizeVal The size of font | ||
179 | * @param charset The charset to be used. Will be deprecated by QT3 | ||
180 | */ | ||
181 | bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset ) | ||
161 | { | 182 | { |
@@ -190,2 +211,10 @@ bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &s | |||
190 | 211 | ||
212 | /** | ||
213 | * This method returns the name, style and size of the currently selected | ||
214 | * font or false if no font is selected | ||
215 | * @param family The font family will be written there | ||
216 | * @param style The style will be written there | ||
217 | * @param size The size will be written there | ||
218 | * @return success or failure | ||
219 | */ | ||
191 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size ) | 220 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size ) |
@@ -197,2 +226,7 @@ bool OFontSelector::selectedFont ( QString &family, QString &style, int &size ) | |||
197 | 226 | ||
227 | /** | ||
228 | * This method does return the font family or QString::null if there is | ||
229 | * no font item selected | ||
230 | * @return the font family | ||
231 | */ | ||
198 | QString OFontSelector::fontFamily ( ) const | 232 | QString OFontSelector::fontFamily ( ) const |
@@ -204,2 +238,6 @@ QString OFontSelector::fontFamily ( ) const | |||
204 | 238 | ||
239 | /** | ||
240 | * This method will return the style of the font or QString::null | ||
241 | * @return the style of the font | ||
242 | */ | ||
205 | QString OFontSelector::fontStyle ( ) const | 243 | QString OFontSelector::fontStyle ( ) const |
@@ -212,2 +250,5 @@ QString OFontSelector::fontStyle ( ) const | |||
212 | 250 | ||
251 | /** | ||
252 | * This method will return the font size or 10 if no font size is available | ||
253 | */ | ||
213 | int OFontSelector::fontSize ( ) const | 254 | int OFontSelector::fontSize ( ) const |
@@ -220,2 +261,5 @@ int OFontSelector::fontSize ( ) const | |||
220 | 261 | ||
262 | /** | ||
263 | * returns the charset of the font or QString::null | ||
264 | */ | ||
221 | QString OFontSelector::fontCharSet ( ) const | 265 | QString OFontSelector::fontCharSet ( ) const |
@@ -227,2 +271,6 @@ QString OFontSelector::fontCharSet ( ) const | |||
227 | 271 | ||
272 | /** | ||
273 | * Overloaded member function see above | ||
274 | * @see selectedFont | ||
275 | */ | ||
228 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset ) | 276 | bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset ) |
@@ -329,3 +377,5 @@ void OFontSelector::changeFont ( ) | |||
329 | 377 | ||
330 | 378 | /** | |
379 | * Return the selected font | ||
380 | */ | ||
331 | QFont OFontSelector::selectedFont ( ) | 381 | QFont OFontSelector::selectedFont ( ) |
diff --git a/libopie/ofontselector.h b/libopie/ofontselector.h index 10d16f0..95ffd04 100644 --- a/libopie/ofontselector.h +++ b/libopie/ofontselector.h | |||
@@ -28,4 +28,4 @@ | |||
28 | 28 | ||
29 | #ifndef __OPIE_FONTSELECTOR_H__ | 29 | #ifndef OPIE_FONTSELECTOR_H__ |
30 | #define __OPIE_FONTSELECTOR_H__ | 30 | #define OPIE_FONTSELECTOR_H__ |
31 | 31 | ||
@@ -36,3 +36,13 @@ class OFontSelectorPrivate; | |||
36 | 36 | ||
37 | 37 | /** | |
38 | * This class lets you chose a Font out of a list of Fonts. | ||
39 | * It can show a preview too. This selector will use all available | ||
40 | * fonts | ||
41 | * | ||
42 | * | ||
43 | * @short A widget to select a font | ||
44 | * @see QWidget | ||
45 | * @see QFont | ||
46 | * @author Rober Griebl | ||
47 | */ | ||
38 | class OFontSelector : public QWidget | 48 | class OFontSelector : public QWidget |
@@ -59,2 +69,5 @@ public: | |||
59 | signals: | 69 | signals: |
70 | /** | ||
71 | * This signal gets emitted when a font got chosen | ||
72 | */ | ||
60 | void fontSelected ( const QFont & ); | 73 | void fontSelected ( const QFont & ); |
diff --git a/libopie/orecurrancewidget.cpp b/libopie/orecurrancewidget.cpp index db86184..471249d 100644 --- a/libopie/orecurrancewidget.cpp +++ b/libopie/orecurrancewidget.cpp | |||
@@ -28,3 +28,11 @@ static int week( const QDate &dt ); // what week in the month is dt? | |||
28 | 28 | ||
29 | 29 | /** | |
30 | * Constructs the Widget | ||
31 | * @param startOnMonday Does the week start on monday | ||
32 | * @param newStart The start date of the recurrence | ||
33 | * @param parent The parent widget | ||
34 | * @param name the name of object | ||
35 | * @param modal if the dialog should be modal | ||
36 | * @param fl Additional window flags | ||
37 | */ | ||
30 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, | 38 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, |
@@ -45,2 +53,13 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, | |||
45 | } | 53 | } |
54 | |||
55 | /** | ||
56 | * Different constructor | ||
57 | * @param startOnMonday Does the week start on monday? | ||
58 | * @param rp Already set ORecur object | ||
59 | * @param startDate The start date | ||
60 | * @param parent The parent widget | ||
61 | * @param name The name of the object | ||
62 | * @param modal | ||
63 | * @param fl The flags for window | ||
64 | */ | ||
46 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, | 65 | ORecurranceWidget::ORecurranceWidget( bool startOnMonday, |
@@ -61,2 +80,7 @@ ORecurranceWidget::~ORecurranceWidget() { | |||
61 | } | 80 | } |
81 | |||
82 | /** | ||
83 | * set the start date | ||
84 | * @param date the new start date | ||
85 | */ | ||
62 | void ORecurranceWidget::setStartDate( const QDate& date ) { | 86 | void ORecurranceWidget::setStartDate( const QDate& date ) { |
@@ -65,2 +89,6 @@ void ORecurranceWidget::setStartDate( const QDate& date ) { | |||
65 | } | 89 | } |
90 | /** | ||
91 | * set the recurrence | ||
92 | * @param rp The ORecur object with the new recurrence rules | ||
93 | */ | ||
66 | void ORecurranceWidget::setRecurrence( const ORecur& rp ) { | 94 | void ORecurranceWidget::setRecurrence( const ORecur& rp ) { |
@@ -68,2 +96,8 @@ void ORecurranceWidget::setRecurrence( const ORecur& rp ) { | |||
68 | } | 96 | } |
97 | |||
98 | /** | ||
99 | * overloaded method taking ORecur and a new start date | ||
100 | * @param rp Recurrence rule | ||
101 | * @param date The new start date | ||
102 | */ | ||
69 | void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { | 103 | void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { |
@@ -125,2 +159,7 @@ void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { | |||
125 | } | 159 | } |
160 | |||
161 | /** | ||
162 | * the user selected recurrence rule. | ||
163 | * @return The recurrence rule. | ||
164 | */ | ||
126 | ORecur ORecurranceWidget::recurrence()const { | 165 | ORecur ORecurranceWidget::recurrence()const { |
@@ -182,2 +221,7 @@ ORecur ORecurranceWidget::recurrence()const { | |||
182 | } | 221 | } |
222 | |||
223 | /** | ||
224 | * Return the end date of the recurrence. This is only | ||
225 | * valid if the recurrence rule does contain an enddate | ||
226 | */ | ||
183 | QDate ORecurranceWidget::endDate()const { | 227 | QDate ORecurranceWidget::endDate()const { |
diff --git a/libopie/orecurrancewidget.h b/libopie/orecurrancewidget.h index 4a8dd08..af87ce9 100644 --- a/libopie/orecurrancewidget.h +++ b/libopie/orecurrancewidget.h | |||
@@ -19,2 +19,14 @@ | |||
19 | // FIXME spelling!!!! -zecke | 19 | // FIXME spelling!!!! -zecke |
20 | // FIXME spelling filenames | ||
21 | |||
22 | /** | ||
23 | * A widget to let the user select rules for recurrences. | ||
24 | * This widget can take care of weekly, monthly, daily and yearly recurrence | ||
25 | * It is used inside todolist and datebook. | ||
26 | * | ||
27 | * | ||
28 | * @short Widget of selecting Recurrance | ||
29 | * @author Trolltech, Holger Freyther | ||
30 | * @version 0.9 | ||
31 | */ | ||
20 | class ORecurranceWidget : public ORecurranceBase { | 32 | class ORecurranceWidget : public ORecurranceBase { |
diff --git a/libopie/otabbar.h b/libopie/otabbar.h index 16797a3..c413611 100644 --- a/libopie/otabbar.h +++ b/libopie/otabbar.h | |||
@@ -59,2 +59,3 @@ public: | |||
59 | */ | 59 | */ |
60 | // FIXME Allow WFlags? -zecke | ||
60 | OTabBar( QWidget * = 0, const char * = 0 ); | 61 | OTabBar( QWidget * = 0, const char * = 0 ); |
diff --git a/libopie/otabwidget.h b/libopie/otabwidget.h index 0aa9bb8..23fe774 100644 --- a/libopie/otabwidget.h +++ b/libopie/otabwidget.h | |||
@@ -101,2 +101,3 @@ public: | |||
101 | */ | 101 | */ |
102 | // FIXME WFlags? -zecke | ||
102 | OTabWidget( QWidget * = 0, const char * = 0, TabStyle = Global, TabPosition = Top ); | 103 | OTabWidget( QWidget * = 0, const char * = 0, TabStyle = Global, TabPosition = Top ); |
@@ -199,2 +200,3 @@ public: | |||
199 | */ | 200 | */ |
201 | //FIXME TT coding style currentTab() -zecke | ||
200 | int getCurrentTab(); | 202 | int getCurrentTab(); |
diff --git a/libopie/oticker.h b/libopie/oticker.h index 5df08da..30b7517 100644 --- a/libopie/oticker.h +++ b/libopie/oticker.h | |||
@@ -42,3 +42,4 @@ | |||
42 | #include <qcolor.h> | 42 | #include <qcolor.h> |
43 | /*! | 43 | |
44 | /** | ||
44 | * @class OTicker | 45 | * @class OTicker |
@@ -48,3 +49,2 @@ | |||
48 | class OTicker : public QLabel { | 49 | class OTicker : public QLabel { |
49 | //class OTicker : public QFrame { | ||
50 | Q_OBJECT | 50 | Q_OBJECT |
diff --git a/libopie/otimepicker.cpp b/libopie/otimepicker.cpp index 8e8a4e7..115d39b 100644 --- a/libopie/otimepicker.cpp +++ b/libopie/otimepicker.cpp | |||
@@ -9,2 +9,9 @@ | |||
9 | 9 | ||
10 | |||
11 | /** | ||
12 | * Constructs the widget | ||
13 | * @param parent The parent of the OTimePicker | ||
14 | * @param name The name of the object | ||
15 | * @param fl Window Flags | ||
16 | */ | ||
10 | OTimePicker::OTimePicker(QWidget* parent, const char* name, | 17 | OTimePicker::OTimePicker(QWidget* parent, const char* name, |
@@ -13,2 +20,3 @@ OTimePicker::OTimePicker(QWidget* parent, const char* name, | |||
13 | { | 20 | { |
21 | |||
14 | QVBoxLayout *vbox=new QVBoxLayout(this); | 22 | QVBoxLayout *vbox=new QVBoxLayout(this); |
@@ -60,2 +68,10 @@ OTimePicker::OTimePicker(QWidget* parent, const char* name, | |||
60 | 68 | ||
69 | /** | ||
70 | * This method return the current time | ||
71 | * @return the time | ||
72 | */ | ||
73 | QTime OTimePicker::time()const { | ||
74 | return tm; | ||
75 | } | ||
76 | |||
61 | void OTimePicker::slotHour(bool b) { | 77 | void OTimePicker::slotHour(bool b) { |
@@ -94,2 +110,28 @@ void OTimePicker::slotMinute(bool b) { | |||
94 | 110 | ||
111 | /** | ||
112 | * Method to set the time. No signal gets emitted during this method call | ||
113 | * Minutes must be within 5 minutes step starting at 0 ( 0,5,10,15,20... ) | ||
114 | * @param t The time to be set | ||
115 | */ | ||
116 | void OTimePicker::setTime( const QTime& t) { | ||
117 | setTime( t.hour(), t.minute() ); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * Method to set the time. No signal gets emitted during this method call | ||
122 | * @param h The hour | ||
123 | * @param m The minute. Minutes need to set by 5 minute steps | ||
124 | */ | ||
125 | void OTimePicker::setTime( int h, int m ) { | ||
126 | setHour(h); | ||
127 | setMinute(m); | ||
128 | } | ||
129 | |||
130 | /* | ||
131 | * FIXME round minutes to the 5 minute arrangement -zecke | ||
132 | */ | ||
133 | /** | ||
134 | * Method to set the minutes | ||
135 | * @param m minutes | ||
136 | */ | ||
95 | void OTimePicker::setMinute(int m) { | 137 | void OTimePicker::setMinute(int m) { |
@@ -108,2 +150,5 @@ void OTimePicker::setMinute(int m) { | |||
108 | 150 | ||
151 | /** | ||
152 | * Method to set the hour | ||
153 | */ | ||
109 | void OTimePicker::setHour(int h) { | 154 | void OTimePicker::setHour(int h) { |
@@ -122,2 +167,9 @@ void OTimePicker::setHour(int h) { | |||
122 | 167 | ||
168 | /** | ||
169 | * This is a modal Dialog. | ||
170 | * | ||
171 | * @param parent The parent widget | ||
172 | * @param name The name of the object | ||
173 | * @param fl Possible window flags | ||
174 | */ | ||
123 | OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) | 175 | OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) |
@@ -135,3 +187,6 @@ OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags | |||
135 | 187 | ||
136 | QTime& OTimePickerDialog::time() | 188 | /** |
189 | * @return the time | ||
190 | */ | ||
191 | QTime OTimePickerDialog::time()const | ||
137 | { | 192 | { |
@@ -139,2 +194,7 @@ QTime& OTimePickerDialog::time() | |||
139 | } | 194 | } |
195 | |||
196 | /** | ||
197 | * Set the time to time | ||
198 | * @param time The time to be set | ||
199 | */ | ||
140 | void OTimePickerDialog::setTime( const QTime& time ) | 200 | void OTimePickerDialog::setTime( const QTime& time ) |
@@ -159,2 +219,7 @@ void OTimePickerDialog::setTime( const QTime& time ) | |||
159 | 219 | ||
220 | /** | ||
221 | * This method takes the current minute and tries to set hour | ||
222 | * to hour. This succeeds if the resulting date is valid | ||
223 | * @param hour The hour as a string | ||
224 | */ | ||
160 | void OTimePickerDialog::setHour ( const QString& hour ) | 225 | void OTimePickerDialog::setHour ( const QString& hour ) |
@@ -168,2 +233,7 @@ void OTimePickerDialog::setHour ( const QString& hour ) | |||
168 | 233 | ||
234 | /** | ||
235 | * Method to set a new minute. It tries to convert the string to int and | ||
236 | * if the resulting date is valid a new date is set. | ||
237 | * @see setHour | ||
238 | */ | ||
169 | void OTimePickerDialog::setMinute ( const QString& minute ) | 239 | void OTimePickerDialog::setMinute ( const QString& minute ) |
diff --git a/libopie/otimepicker.h b/libopie/otimepicker.h index 825e2d6..495c806 100644 --- a/libopie/otimepicker.h +++ b/libopie/otimepicker.h | |||
@@ -11,2 +11,13 @@ | |||
11 | 11 | ||
12 | /** | ||
13 | * A class to pick time. It uses clickable labels | ||
14 | * internally to allow a quick selection of a time. | ||
15 | * A time can be selected by two clicks of a user | ||
16 | * | ||
17 | * @short A widget to quickly pick a QTime | ||
18 | * @version 1.0 | ||
19 | * @see QWidget | ||
20 | * @see QTime | ||
21 | * @author Hakan Ardo, Stefan Eilers | ||
22 | */ | ||
12 | class OTimePicker: public QWidget { | 23 | class OTimePicker: public QWidget { |
@@ -17,4 +28,11 @@ class OTimePicker: public QWidget { | |||
17 | WFlags fl = 0); | 28 | WFlags fl = 0); |
29 | |||
30 | public slots: | ||
18 | void setHour(int h); | 31 | void setHour(int h); |
19 | void setMinute(int m); | 32 | void setMinute(int m); |
33 | void setTime( const QTime& ); | ||
34 | void setTime( int h, int m ); | ||
35 | |||
36 | public: | ||
37 | QTime time()const; | ||
20 | 38 | ||
@@ -24,2 +42,4 @@ class OTimePicker: public QWidget { | |||
24 | QTime tm; | 42 | QTime tm; |
43 | struct Private; | ||
44 | Private *d; | ||
25 | 45 | ||
@@ -30,2 +50,5 @@ class OTimePicker: public QWidget { | |||
30 | signals: | 50 | signals: |
51 | /** | ||
52 | * gets emitted when the time got changed by the user | ||
53 | */ | ||
31 | void timeChanged(const QTime &); | 54 | void timeChanged(const QTime &); |
@@ -33,2 +56,9 @@ class OTimePicker: public QWidget { | |||
33 | 56 | ||
57 | /** | ||
58 | * | ||
59 | * @short | ||
60 | * @version 1.0 | ||
61 | * @author Stefan Eilers | ||
62 | */ | ||
63 | |||
34 | class OTimePickerDialog: public OTimePickerDialogBase { | 64 | class OTimePickerDialog: public OTimePickerDialogBase { |
@@ -40,3 +70,3 @@ class OTimePickerDialog: public OTimePickerDialogBase { | |||
40 | 70 | ||
41 | QTime& time(); | 71 | QTime time()const; |
42 | 72 | ||
diff --git a/libopie/owait.cpp b/libopie/owait.cpp index c90bb72..0fdf08d 100644 --- a/libopie/owait.cpp +++ b/libopie/owait.cpp | |||
@@ -31,4 +31,14 @@ static int frame = 0; | |||
31 | 31 | ||
32 | /** | ||
33 | * This will construct a modal dialog. | ||
34 | * | ||
35 | * The default timer length is 10. | ||
36 | * | ||
37 | * @param parent The parent of the widget | ||
38 | * @param msg The name of the object | ||
39 | * @param dispIcon Display Icon? | ||
40 | */ | ||
32 | OWait::OWait(QWidget *parent, const char* msg, bool dispIcon ) | 41 | OWait::OWait(QWidget *parent, const char* msg, bool dispIcon ) |
33 | :QDialog(parent, QObject::tr("Wait"), TRUE,WStyle_Customize) { | 42 | :QDialog(parent, msg, TRUE,WStyle_Customize) { |
43 | |||
34 | 44 | ||
diff --git a/libopie/owait.h b/libopie/owait.h index d22e141..6217e31 100644 --- a/libopie/owait.h +++ b/libopie/owait.h | |||
@@ -31,2 +31,6 @@ | |||
31 | * This class displays a animated waiting icon in the middle of the screen. | 31 | * This class displays a animated waiting icon in the middle of the screen. |
32 | * | ||
33 | * @short modal hour glass dialog | ||
34 | * @see QDialog | ||
35 | * @author Maximilian Reiß | ||
32 | */ | 36 | */ |
@@ -37,3 +41,3 @@ class OWait : public QDialog { | |||
37 | public: | 41 | public: |
38 | OWait(QWidget *parent=0,const char* msg=0,bool dispIcon=TRUE); | 42 | OWait(QWidget *parent=0,const char* name=0, bool dispIcon=TRUE); |
39 | ~OWait(); | 43 | ~OWait(); |
@@ -47,2 +51,3 @@ public: | |||
47 | * Set the time before the icon will be automaticly hidden | 51 | * Set the time before the icon will be automaticly hidden |
52 | * The timer will be started once the widget will be shown. | ||
48 | * @param length - time in seconds | 53 | * @param length - time in seconds |
diff --git a/libopie/todayconfigwidget.h b/libopie/todayconfigwidget.h index 48cf379..6b49efc 100644 --- a/libopie/todayconfigwidget.h +++ b/libopie/todayconfigwidget.h | |||
@@ -5,2 +5,13 @@ | |||
5 | 5 | ||
6 | /** | ||
7 | * A base class for all Today Config Widgets. | ||
8 | * This will let a Today plugin to add the possibility of configuration. | ||
9 | * Plugins need to inherit from this class and need to implement | ||
10 | * the pure virtual method to control configuration. | ||
11 | * The Plugin should read its configuration during creation of the Widget | ||
12 | * | ||
13 | * | ||
14 | * @author Maximilian Reiß | ||
15 | * @short base class of all today config widgets | ||
16 | */ | ||
6 | class TodayConfigWidget : public QWidget { | 17 | class TodayConfigWidget : public QWidget { |
@@ -10,2 +21,9 @@ public: | |||
10 | 21 | ||
22 | /** | ||
23 | * This will construct the widget. The widget gets deleted once the parent | ||
24 | * gets deleted as in any Qt application | ||
25 | * | ||
26 | * @param parent The parent of the widget | ||
27 | * @paran name The name of the object | ||
28 | */ | ||
11 | TodayConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ; | 29 | TodayConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ; |
diff --git a/libopie/todayplugininterface.h b/libopie/todayplugininterface.h index 6ee2a06..29a12bc 100644 --- a/libopie/todayplugininterface.h +++ b/libopie/todayplugininterface.h | |||
@@ -16,3 +16,8 @@ class QWidget; | |||
16 | * | 16 | * |
17 | * A TodayPluginObject is the base for all Today Plugins. | ||
18 | * A plugin author needs to inherit this class and implement | ||
19 | * the pure virtual methods | ||
17 | * | 20 | * |
21 | * @short base class for today plugins | ||
22 | * @author Maximilian Reiss | ||
18 | * | 23 | * |
@@ -27,2 +32,3 @@ public: | |||
27 | * The name if the plugin | 32 | * The name if the plugin |
33 | * @return The plugin should return its name here | ||
28 | */ | 34 | */ |
@@ -32,2 +38,3 @@ public: | |||
32 | * Version numbering | 38 | * Version numbering |
39 | * @return The plugin should return the version number | ||
33 | */ | 40 | */ |
@@ -36,8 +43,13 @@ public: | |||
36 | 43 | ||
44 | /** | ||
45 | * @return the pixmap name widget?! -- FIXME | ||
46 | */ | ||
37 | virtual QString pixmapNameWidget() const = 0; | 47 | virtual QString pixmapNameWidget() const = 0; |
38 | 48 | ||
39 | /** widget for the today view | 49 | /** |
50 | * widget for the today view | ||
40 | * It _needs_ a parent here. | 51 | * It _needs_ a parent here. |
52 | * Plugin authors need to take parent as parent! | ||
41 | */ | 53 | */ |
42 | virtual QWidget* widget( QWidget * ) = 0; | 54 | virtual QWidget* widget( QWidget *parent ) = 0; |
43 | 55 | ||
@@ -51,2 +63,3 @@ public: | |||
51 | * If the plugin has a config widget, it _needs_ a parent here. | 63 | * If the plugin has a config widget, it _needs_ a parent here. |
64 | * may return 0 if no config widget is needed | ||
52 | */ | 65 | */ |
@@ -56,2 +69,4 @@ public: | |||
56 | * The application that should be assigned to the button (pixmap) | 69 | * The application that should be assigned to the button (pixmap) |
70 | * Today will show the plugin icon. On click it tries to execute the | ||
71 | * plugin related application. | ||
57 | */ | 72 | */ |
@@ -83,3 +98,5 @@ public: | |||
83 | 98 | ||
84 | 99 | /** | |
100 | * This is part of the QCOM works. See example plugins how to do it right | ||
101 | */ | ||
85 | struct TodayPluginInterface : public QUnknownInterface { | 102 | struct TodayPluginInterface : public QUnknownInterface { |