summaryrefslogtreecommitdiff
authorzecke <zecke>2003-04-13 16:57:28 (UTC)
committer zecke <zecke>2003-04-13 16:57:28 (UTC)
commit0b311079ff19798866291034663757103c6ba935 (patch) (unidiff)
tree70ddccf3a3147475050fa06cc2d807a71ab1d5ee
parent1537ccb435ca725c793db6e94e0b9e83484b57e7 (diff)
downloadopie-0b311079ff19798866291034663757103c6ba935.zip
opie-0b311079ff19798866291034663757103c6ba935.tar.gz
opie-0b311079ff19798866291034663757103c6ba935.tar.bz2
Jumbo API documentation update
and some API fixed ColorDialog is now OColorDialog!!! keep the namespace tidy! ColorPopupMenu is now OColorPopupMenu!!! keep the namespace tidy ColorDialog TT couldn't break bc we can so make it const QColor& OTimePicker add some convience methods more I might have forgot
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/colordialog.cpp17
-rw-r--r--libopie/colordialog.h6
-rw-r--r--libopie/colorpopupmenu.cpp32
-rw-r--r--libopie/colorpopupmenu.h36
-rw-r--r--libopie/ocheckitem.cpp31
-rw-r--r--libopie/ocheckitem.h14
-rw-r--r--libopie/oclickablelabel.cpp33
-rw-r--r--libopie/oclickablelabel.h35
-rw-r--r--libopie/ocolorbutton.cpp45
-rw-r--r--libopie/ocolorbutton.h15
-rw-r--r--libopie/odevice.cpp108
-rw-r--r--libopie/odevice.h63
-rw-r--r--libopie/odevicebutton.h4
-rw-r--r--libopie/ofiledialog.cc40
-rw-r--r--libopie/ofiledialog.h23
-rw-r--r--libopie/ofileselector.h2
-rw-r--r--libopie/ofontmenu.cc46
-rw-r--r--libopie/ofontmenu.h44
-rw-r--r--libopie/ofontselector.cpp132
-rw-r--r--libopie/ofontselector.h23
-rw-r--r--libopie/orecurrancewidget.cpp46
-rw-r--r--libopie/orecurrancewidget.h12
-rw-r--r--libopie/otabbar.h1
-rw-r--r--libopie/otabwidget.h2
-rw-r--r--libopie/oticker.h10
-rw-r--r--libopie/otimepicker.cpp86
-rw-r--r--libopie/otimepicker.h34
-rw-r--r--libopie/owait.cpp12
-rw-r--r--libopie/owait.h13
-rw-r--r--libopie/todayconfigwidget.h18
-rw-r--r--libopie/todayplugininterface.h23
31 files changed, 832 insertions, 174 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 */
63namespace {
64
60class QColorPicker : public QFrame 65class QColorPicker : public QFrame
@@ -609,2 +614,4 @@ void QColorShower::setHsv( int h, int s, int v )
609 614
615}
616
610class OColorDialogPrivate : public QObject 617class 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
640void OColorDialogPrivate::setCurrentColor( QRgb rgb ) 647void OColorDialogPrivate::setCurrentColor( const QRgb& rgb )
641{ 648{
@@ -728,3 +735,3 @@ OColorDialog::OColorDialog(QWidget* parent, const char* name, bool modal) :
728 735
729QColor OColorDialog::getColor( QColor initial, QWidget *parent, 736QColor 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
766QRgb OColorDialog::getRgba( QRgb initial, bool *ok, 773QRgb 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
822void OColorDialog::setColor( QColor c ) 829void 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
63public: 63public:
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
40ColorPanelButton::ColorPanelButton( const QColor& color, QWidget* parent, const char* name ) 40OColorPanelButton::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
49ColorPanelButton::~ColorPanelButton() 49OColorPanelButton::~OColorPanelButton()
50{ 50{
@@ -52,3 +52,3 @@ ColorPanelButton::~ColorPanelButton()
52 52
53void ColorPanelButton::setActive( bool active ) 53void OColorPanelButton::setActive( bool active )
54{ 54{
@@ -63,6 +63,4 @@ void ColorPanelButton::setActive( bool active )
63 63
64void ColorPanelButton::enterEvent( QEvent* e ) 64void 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
73void ColorPanelButton::leaveEvent( QEvent* e ) 71void 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
82void ColorPanelButton::paintEvent( QPaintEvent* e ) 78void OColorPanelButton::paintEvent( QPaintEvent* e )
83{ 79{
@@ -93,6 +89,4 @@ void ColorPanelButton::paintEvent( QPaintEvent* e )
93 89
94void ColorPanelButton::mouseReleaseEvent( QMouseEvent* e ) 90void 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
101ColorPopupMenu::ColorPopupMenu( const QColor& color, QWidget* parent, const char* name ) 95OColorPopupMenu::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
152ColorPopupMenu::~ColorPopupMenu() 146OColorPopupMenu::~OColorPopupMenu()
153{ 147{
@@ -155,5 +149,5 @@ ColorPopupMenu::~ColorPopupMenu()
155 149
156void ColorPopupMenu::addColor( const QColor& color, int row, int col ) 150void 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
163void ColorPopupMenu::buttonSelected( const QColor& color ) 157void OColorPopupMenu::buttonSelected( const QColor& color )
164{ 158{
@@ -169,3 +163,3 @@ void ColorPopupMenu::buttonSelected( const QColor& color )
169 163
170void ColorPopupMenu::moreColorClicked() 164void 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 */
52class ColorPanelButton : public QFrame 52class 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 */
165class ColorPopupMenu : public QPopupMenu 165class 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 */
17OCheckItem::OCheckItem( QTable *t, const QString &key ) 24OCheckItem::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 */
22QString OCheckItem::key() const 34QString 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 */
27void OCheckItem::setChecked( bool b ) 45void 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 */
33void OCheckItem::toggle() 55void 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 */
38bool OCheckItem::isChecked() const 65bool OCheckItem::isChecked() const
@@ -42,2 +69,6 @@ bool OCheckItem::isChecked() const
42 69
70/**
71 * @internal
72 * This paints the item
73 */
43void OCheckItem::paint( QPainter *p, const QColorGroup &cg, const QRect &cr, 74void 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
@@ -5,3 +5,3 @@
5** GNU Library General Public License version 2 as published by the 5** GNU Library General Public License version 2 as published by the
6** Free Software Foundation and appearing in the file LICENSE.GPL 6** Free Software Foundation and appearing in the file LICENSE.GPL
7** included in the packaging of this file. 7** included in the packaging of this file.
@@ -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
17class OCheckItem : public QTableItem 29class 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,4 +3,11 @@
3 3
4OClickableLabel::OClickableLabel(QWidget* parent, 4/**
5 const char* name, 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 */
11OClickableLabel::OClickableLabel(QWidget* parent,
12 const char* name,
6 WFlags fl) : 13 WFlags fl) :
@@ -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 */
16void OClickableLabel::setToggleButton(bool t) { 28void OClickableLabel::setToggleButton(bool t) {
@@ -19,2 +31,5 @@ void OClickableLabel::setToggleButton(bool t) {
19 31
32/**
33 * @internal
34 */
20void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) { 35void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) {
@@ -27,2 +42,5 @@ void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) {
27 42
43/**
44 * @internal
45 */
28void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { 46void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) {
@@ -44,2 +62,5 @@ void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) {
44 62
63/**
64 * @internal
65 */
45void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) { 66void 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 */
61void OClickableLabel::showState(bool on) { 87void 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 */
85void OClickableLabel::setOn(bool on) { 114void 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
@@ -3,5 +3,25 @@
3 3
4#include <qlabel.h> 4#include <qlabel.h>
5 5
6class OClickableLabel: public QLabel 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
26class OClickableLabel: public QLabel
7{ 27{
@@ -9,5 +29,6 @@ class OClickableLabel: public QLabel
9public: 29public:
10 OClickableLabel(QWidget* parent = 0, const char* name = 0, 30 OClickableLabel(QWidget* parent = 0, const char* name = 0,
11 WFlags fl = 0); 31 WFlags fl = 0);
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,8 +36,16 @@
36 36
37class OColorButtonPrivate { 37struct OColorButtonPrivate {
38public: 38 QPopupMenu *m_menu;
39 QPopupMenu *m_menu; 39 QColor m_color;
40 QColor m_color;
41}; 40};
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 */
43OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *name ) 51OColorButton::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 */
60OColorButton::~OColorButton ( ) 71OColorButton::~OColorButton ( )
@@ -64,2 +75,5 @@ OColorButton::~OColorButton ( )
64 75
76/**
77 * @return Returns the current color of the button
78 */
65QColor OColorButton::color ( ) const 79QColor 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 */
70void OColorButton::setColor ( const QColor &c ) 88void OColorButton::setColor ( const QColor &c )
@@ -74,2 +92,5 @@ void OColorButton::setColor ( const QColor &c )
74 92
93/**
94 * @internal
95 */
75void OColorButton::updateColor ( const QColor &c ) 96void OColorButton::updateColor ( const QColor &c )
@@ -77,15 +98,15 @@ void OColorButton::updateColor ( const QColor &c )
77 d-> m_color = c; 98 d-> m_color = c;
78 99
79 QImage img ( 16, 16, 32 ); 100 QImage img ( 16, 16, 32 );
80 img. fill ( 0 ); 101 img. fill ( 0 );
81 102
82 int r, g, b; 103 int r, g, b;
83 c. rgb ( &r, &g, &b ); 104 c. rgb ( &r, &g, &b );
84 105
85 int w = img. width ( ); 106 int w = img. width ( );
86 int h = img. height ( ); 107 int h = img. height ( );
87 108
88 int dx = w * 20 / 100; // 15% 109 int dx = w * 20 / 100; // 15%
89 int dy = h * 20 / 100; 110 int dy = h * 20 / 100;
90 111
91 for ( int y = 0; y < h; y++ ) { 112 for ( int y = 0; y < h; y++ ) {
@@ -102,3 +123,3 @@ void OColorButton::updateColor ( const QColor &c )
102 alpha *= ( double ( h - y ) / dy ); 123 alpha *= ( double ( h - y ) / dy );
103 124
104 int a = int ( alpha * 255.0 ); 125 int a = int ( alpha * 255.0 );
@@ -116,3 +137,3 @@ void OColorButton::updateColor ( const QColor &c )
116 pix. convertFromImage ( img ); 137 pix. convertFromImage ( img );
117 setPixmap ( pix ); 138 setPixmap ( pix );
118 139
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 */
37class OColorButton : public QPushButton { 44class OColorButton : public QPushButton {
@@ -49,9 +56,9 @@ public slots:
49 virtual void setColor ( const QColor & ); 56 virtual void setColor ( const QColor & );
50 57
51 protected slots: 58protected slots:
52 virtual void updateColor ( const QColor & ); 59 virtual void updateColor ( const QColor & );
53 60
54private: 61private:
55 OColorButtonPrivate *d; 62 OColorButtonPrivate *d;
56 }; 63};
57 64
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 {
55public: 55public:
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 */
273void ODevice::initButtons ( ) 276void 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 */
317bool ODevice::suspend ( ) 330bool ODevice::suspend ( )
@@ -356,3 +369,5 @@ bool ODevice::suspend ( )
356 369
357 370/**
371 * This sets the display on or off
372 */
358bool ODevice::setDisplayStatus ( bool on ) 373bool ODevice::setDisplayStatus ( bool on )
@@ -372,4 +387,9 @@ bool ODevice::setDisplayStatus ( bool on )
372 387
373bool ODevice::setDisplayBrightness ( int ) 388/**
389 * This sets the display brightness
390 * @return success or failure
391 */
392bool 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 */
383QString ODevice::vendorString ( ) const 407QString 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 */
388OVendor ODevice::vendor ( ) const 416OVendor 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 */
393QString ODevice::modelString ( ) const 425QString ODevice::modelString ( ) const
@@ -397,2 +429,5 @@ QString ODevice::modelString ( ) const
397 429
430/**
431 * This does return the OModel used
432 */
398OModel ODevice::model ( ) const 433OModel ODevice::model ( ) const
@@ -402,2 +437,5 @@ OModel ODevice::model ( ) const
402 437
438/**
439 * This does return the systen name
440 */
403QString ODevice::systemString ( ) const 441QString ODevice::systemString ( ) const
@@ -407,2 +445,5 @@ QString ODevice::systemString ( ) const
407 445
446/**
447 * Return System as OSystem value
448 */
408OSystem ODevice::system ( ) const 449OSystem ODevice::system ( ) const
@@ -412,2 +453,5 @@ OSystem ODevice::system ( ) const
412 453
454/**
455 * @return the version string of the base system
456 */
413QString ODevice::systemVersionString ( ) const 457QString ODevice::systemVersionString ( ) const
@@ -417,2 +461,5 @@ QString ODevice::systemVersionString ( ) const
417 461
462/**
463 * @return the current Transformation
464 */
418Transformation ODevice::rotation ( ) const 465Transformation ODevice::rotation ( ) const
@@ -422,2 +469,5 @@ Transformation ODevice::rotation ( ) const
422 469
470/**
471 * This plays an alarmSound
472 */
423void ODevice::alarmSound ( ) 473void ODevice::alarmSound ( )
@@ -432,2 +482,5 @@ void ODevice::alarmSound ( )
432 482
483/**
484 * This plays a key sound
485 */
433void ODevice::keySound ( ) 486void ODevice::keySound ( )
@@ -442,2 +495,5 @@ void ODevice::keySound ( )
442 495
496/**
497 * This plays a touch sound
498 */
443void ODevice::touchSound ( ) 499void 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 */
455QValueList <OLed> ODevice::ledList ( ) const 515QValueList <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 */
460QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const 523QValueList <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 */
465OLedState ODevice::ledState ( OLed /*which*/ ) const 531OLedState ODevice::ledState ( OLed /*which*/ ) const
@@ -469,4 +535,12 @@ OLedState ODevice::ledState ( OLed /*which*/ ) const
469 535
470bool 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 */
542bool 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 */
475bool ODevice::hasLightSensor ( ) const 552bool ODevice::hasLightSensor ( ) const
@@ -479,2 +556,5 @@ bool ODevice::hasLightSensor ( ) const
479 556
557/**
558 * @return a value from the light senso
559 */
480int ODevice::readLightSensor ( ) 560int ODevice::readLightSensor ( )
@@ -484,2 +564,5 @@ int ODevice::readLightSensor ( )
484 564
565/**
566 * @return the light sensor resolution whatever that is ;)
567 */
485int ODevice::lightSensorResolution ( ) const 568int ODevice::lightSensorResolution ( ) const
@@ -489,2 +572,5 @@ int ODevice::lightSensorResolution ( ) const
489 572
573/**
574 * @return a list of hardware buttons
575 */
490const QValueList <ODeviceButton> &ODevice::buttons ( ) 576const 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 */
497uint ODevice::buttonHoldTime ( ) const 586uint 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 */
502const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) 598const 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
@@ -2,3 +2,3 @@
2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) 2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
@@ -7,3 +7,3 @@
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
@@ -12,3 +12,3 @@
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
@@ -34,5 +34,8 @@ namespace Opie {
34 34
35/**
36 * The available devices
37 */
35enum OModel { 38enum OModel {
36 Model_Unknown, 39 Model_Unknown, // = 0
37 40
38 Model_Series_Mask = 0xff000000, 41 Model_Series_Mask = 0xff000000,
@@ -57,3 +60,6 @@ enum OModel {
57 60
58 enum OVendor { 61/**
62 * The vendor of the device
63 */
64enum OVendor {
59 Vendor_Unknown, 65 Vendor_Unknown,
@@ -62,4 +68,7 @@ enum OVendor {
62 Vendor_Sharp 68 Vendor_Sharp
63 }; 69};
64 70
71/**
72 * The System used
73 */
65enum OSystem { 74enum OSystem {
@@ -96,6 +105,18 @@ 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 */
97class ODevice : public QObject { 117class ODevice : public QObject {
98 Q_OBJECT 118 Q_OBJECT
99 119
100private: 120private:
121 /* disable copy */
101 ODevice ( const ODevice & ); 122 ODevice ( const ODevice & );
@@ -106,3 +127,3 @@ protected:
106 virtual void initButtons ( ); 127 virtual void initButtons ( );
107 128
108 ODeviceData *d; 129 ODeviceData *d;
@@ -110,4 +131,6 @@ protected:
110public: 131public:
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 ( );
@@ -116,6 +139,6 @@ public:
116 139
117 QString modelString ( ) const; 140 QString modelString ( ) const;
118 OModel model ( ) const; 141 OModel model ( ) const;
119 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } 142 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
120 143
121 QString vendorString ( ) const; 144 QString vendorString ( ) const;
@@ -130,3 +153,3 @@ public:
130 153
131 // system 154// system
132 155
@@ -138,5 +161,5 @@ public:
138 virtual int displayBrightnessResolution ( ) const; 161 virtual int displayBrightnessResolution ( ) const;
139
140// input / output
141 162
163// input / output
164 //FIXME playAlarmSound and al might be better -zecke
142 virtual void alarmSound ( ); 165 virtual void alarmSound ( );
@@ -161,3 +184,3 @@ public:
161 const QValueList<ODeviceButton> &buttons ( ); 184 const QValueList<ODeviceButton> &buttons ( );
162 185
163 /** 186 /**
@@ -177,3 +200,3 @@ public:
177 * default pass an empty string as \a qcopMessage. 200 * default pass an empty string as \a qcopMessage.
178 */ 201 */
179 void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); 202 void remapHeldAction ( int button, const OQCopMessage &qcopMessage );
@@ -185,8 +208,8 @@ public:
185 208
186 signals: 209signals:
187 void buttonMappingChanged ( ); 210 void buttonMappingChanged ( );
188 211
189 private slots: 212private slots:
190 void systemMessage ( const QCString &, const QByteArray & ); 213 void systemMessage ( const QCString &, const QByteArray & );
191 214
192protected: 215protected:
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 */
36OFileDialog::OFileDialog(const QString &caption, 47OFileDialog::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 */
63QString OFileDialog::mimetype()const 78QString OFileDialog::mimetype()const
@@ -66,2 +81,6 @@ QString OFileDialog::mimetype()const
66} 81}
82
83/**
84 * @return the fileName
85 */
67QString OFileDialog::fileName()const 86QString OFileDialog::fileName()const
@@ -70,2 +89,6 @@ QString OFileDialog::fileName()const
70} 89}
90
91/**
92 * return a DocLnk to the current file
93 */
71DocLnk OFileDialog::selectedDocument()const 94DocLnk 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 */
75QString OFileDialog::getOpenFileName(int selector, 110QString 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 */
91QString OFileDialog::getSaveFileName(int selector, 131QString 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 */
37class OFileDialog : public QDialog { 60class 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 */
8OFontMenu::OFontMenu(QWidget *parent, const char *name, const QList<QWidget> &list ) 14OFontMenu::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 */
23void OFontMenu::save(Config *cfg ) 36void 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 */
28void OFontMenu::restore(Config *cfg ) 47void 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 */
50void OFontMenu::setWidgets(const QList<QWidget> &list ) 74void 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 */
54void OFontMenu::addWidget( QWidget *wid ) 83void 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 */
58void OFontMenu::removeWidget( QWidget *wid ) 92void OFontMenu::removeWidget( QWidget *wid )
@@ -61,2 +95,6 @@ void OFontMenu::removeWidget( QWidget *wid )
61} 95}
96
97/**
98 * The list of controlled widgets
99 */
62const QList<QWidget> &OFontMenu::widgets()const 100const 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 */
66void OFontMenu::forceSize(QWidget *wid, int size ) 110void 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
@@ -6,3 +6,3 @@
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This library is free software; you can 7 _;:,     .>    :=|. This library is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
@@ -12,4 +12,4 @@
12     ._= =}       : or (at your option) any later version. 12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This library is distributed in the hope that 14    .i_,=:_.      -<s. This library is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
@@ -20,6 +20,6 @@
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.
21 :     =  ...= . :.=- 21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
@@ -39,3 +39,5 @@
39 39
40 40/*
41 * @internal
42 */
41namespace { 43namespace {
@@ -48,4 +50,26 @@ namespace {
48 50
49// if i would be on kde this would be a KActionMenu... 51// forward declarations
50class Config; 52class 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 */
51class OFontMenu : public QPopupMenu { 75class 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
@@ -40,3 +40,3 @@
40class OFontSelectorPrivate { 40class OFontSelectorPrivate {
41public: 41public:
42 QListBox * m_font_family_list; 42 QListBox * m_font_family_list;
@@ -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
52namespace {
52 53
@@ -59,3 +60,3 @@ public:
59 m_sizes = sizes; 60 m_sizes = sizes;
60 61
61 QString str = t; 62 QString str = t;
@@ -69,3 +70,3 @@ public:
69 } 70 }
70 71
71 const QStringList &styles ( ) const 72 const QStringList &styles ( ) const
@@ -74,3 +75,3 @@ public:
74 } 75 }
75 76
76 const QValueList<int> &sizes ( ) const 77 const QValueList<int> &sizes ( ) const
@@ -79,3 +80,3 @@ public:
79 } 80 }
80 81
81private: 82private:
@@ -96,3 +97,4 @@ static int findItemCB ( QComboBox *box, const QString &str )
96 97
97 98}
99/* static same as anon. namespace */
98static int qt_version ( ) 100static 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 */
106OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) 114OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl )
@@ -137,3 +145,3 @@ OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *na
137 d-> m_preview-> setWordWrap ( QMultiLineEdit::WidgetWidth ); 145 d-> m_preview-> setWordWrap ( QMultiLineEdit::WidgetWidth );
138 d-> m_preview-> setMargin ( 3 ); 146 d-> m_preview-> setMargin ( 3 );
139 d-> m_preview-> setText ( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" )); 147 d-> m_preview-> setText ( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" ));
@@ -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 */
155bool OFontSelector::setSelectedFont ( const QFont &f ) 168bool OFontSelector::setSelectedFont ( const QFont &f )
@@ -159,3 +172,11 @@ bool OFontSelector::setSelectedFont ( const QFont &f )
159 172
160bool 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 */
181bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset )
161{ 182{
@@ -168,3 +189,3 @@ bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &s
168 family = d-> m_font_family_list-> firstItem ( ); 189 family = d-> m_font_family_list-> firstItem ( );
169 d-> m_font_family_list-> setCurrentItem ( family ); 190 d-> m_font_family_list-> setCurrentItem ( family );
170 fontFamilyClicked ( d-> m_font_family_list-> index ( family )); 191 fontFamilyClicked ( d-> m_font_family_list-> index ( family ));
@@ -186,3 +207,3 @@ bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &s
186 fontSizeClicked ( size ); 207 fontSizeClicked ( size );
187 208
188 return (( family ) && ( style >= 0 ) && ( size >= 0 )); 209 return (( family ) && ( style >= 0 ) && ( size >= 0 ));
@@ -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 */
191bool OFontSelector::selectedFont ( QString &family, QString &style, int &size ) 220bool 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 */
198QString OFontSelector::fontFamily ( ) const 232QString OFontSelector::fontFamily ( ) const
@@ -200,3 +234,3 @@ QString OFontSelector::fontFamily ( ) const
200 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( d-> m_font_family_list-> currentItem ( )); 234 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( d-> m_font_family_list-> currentItem ( ));
201 235
202 return fli ? fli-> family ( ) : QString::null; 236 return fli ? fli-> family ( ) : QString::null;
@@ -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 */
205QString OFontSelector::fontStyle ( ) const 243QString OFontSelector::fontStyle ( ) const
@@ -207,3 +245,3 @@ QString OFontSelector::fontStyle ( ) const
207 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( d-> m_font_family_list-> currentItem ( )); 245 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( d-> m_font_family_list-> currentItem ( ));
208 int fst = d-> m_font_style_list-> currentItem ( ); 246 int fst = d-> m_font_style_list-> currentItem ( );
209 247
@@ -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 */
213int OFontSelector::fontSize ( ) const 254int OFontSelector::fontSize ( ) const
@@ -215,3 +256,3 @@ int OFontSelector::fontSize ( ) const
215 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( d-> m_font_family_list-> currentItem ( )); 256 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( d-> m_font_family_list-> currentItem ( ));
216 int fsi = d-> m_font_size_list-> currentItem ( ); 257 int fsi = d-> m_font_size_list-> currentItem ( );
217 258
@@ -220,2 +261,5 @@ int OFontSelector::fontSize ( ) const
220 261
262/**
263 * returns the charset of the font or QString::null
264 */
221QString OFontSelector::fontCharSet ( ) const 265QString OFontSelector::fontCharSet ( ) const
@@ -227,2 +271,6 @@ QString OFontSelector::fontCharSet ( ) const
227 271
272/**
273 * Overloaded member function see above
274 * @see selectedFont
275 */
228bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset ) 276bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset )
@@ -230,7 +278,7 @@ bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, Q
230 int ffa = d-> m_font_family_list-> currentItem ( ); 278 int ffa = d-> m_font_family_list-> currentItem ( );
231 int fst = d-> m_font_style_list-> currentItem ( ); 279 int fst = d-> m_font_style_list-> currentItem ( );
232 int fsi = d-> m_font_size_list-> currentItem ( ); 280 int fsi = d-> m_font_size_list-> currentItem ( );
233 281
234 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( ffa ); 282 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( ffa );
235 283
236 if ( fli ) { 284 if ( fli ) {
@@ -248,3 +296,3 @@ bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, Q
248 296
249 297
250 298
@@ -253,6 +301,6 @@ void OFontSelector::loadFonts ( QListBox *list )
253 QStringList f = d-> m_fdb. families ( ); 301 QStringList f = d-> m_fdb. families ( );
254 302
255 for ( QStringList::ConstIterator it = f. begin ( ); it != f. end ( ); ++it ) { 303 for ( QStringList::ConstIterator it = f. begin ( ); it != f. end ( ); ++it ) {
256 QValueList <int> ps = d-> m_fdb. pointSizes ( *it ); 304 QValueList <int> ps = d-> m_fdb. pointSizes ( *it );
257 305
258 if ( d-> m_pointbug ) { 306 if ( d-> m_pointbug ) {
@@ -261,3 +309,3 @@ void OFontSelector::loadFonts ( QListBox *list )
261 } 309 }
262 310
263 list-> insertItem ( new FontListItem ( *it, d-> m_fdb. styles ( *it ), ps )); 311 list-> insertItem ( new FontListItem ( *it, d-> m_fdb. styles ( *it ), ps ));
@@ -270,6 +318,6 @@ void OFontSelector::fontFamilyClicked ( int index )
270 QString oldsize = d-> m_font_size_list-> currentText ( ); 318 QString oldsize = d-> m_font_size_list-> currentText ( );
271 319
272 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( index ); 320 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( index );
273 321
274 d-> m_font_style_list-> clear ( ); 322 d-> m_font_style_list-> clear ( );
275 d-> m_font_style_list-> insertStringList ( fli-> styles ( )); 323 d-> m_font_style_list-> insertStringList ( fli-> styles ( ));
@@ -278,3 +326,3 @@ void OFontSelector::fontFamilyClicked ( int index )
278 int i; 326 int i;
279 327
280 i = findItemCB ( d-> m_font_style_list, oldstyle ); 328 i = findItemCB ( d-> m_font_style_list, oldstyle );
@@ -284,12 +332,12 @@ void OFontSelector::fontFamilyClicked ( int index )
284 i = 0; 332 i = 0;
285 333
286 if ( i >= 0 ) { 334 if ( i >= 0 ) {
287 d-> m_font_style_list-> setCurrentItem ( i ); 335 d-> m_font_style_list-> setCurrentItem ( i );
288 fontStyleClicked ( i ); 336 fontStyleClicked ( i );
289 } 337 }
290 338
291 d-> m_font_size_list-> clear ( ); 339 d-> m_font_size_list-> clear ( );
292 QValueList<int> sl = fli-> sizes ( ); 340 QValueList<int> sl = fli-> sizes ( );
293 341
294 for ( QValueList<int>::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) 342 for ( QValueList<int>::Iterator it = sl. begin ( ); it != sl. end ( ); ++it )
295 d-> m_font_size_list-> insertItem ( QString::number ( *it )); 343 d-> m_font_size_list-> insertItem ( QString::number ( *it ));
@@ -301,8 +349,8 @@ void OFontSelector::fontFamilyClicked ( int index )
301 i = 0; 349 i = 0;
302 350
303 if ( i >= 0 ) { 351 if ( i >= 0 ) {
304 d-> m_font_size_list-> setCurrentItem ( i ); 352 d-> m_font_size_list-> setCurrentItem ( i );
305 fontSizeClicked ( i ); 353 fontSizeClicked ( i );
306 } 354 }
307 changeFont ( ); 355 changeFont ( );
308} 356}
@@ -311,3 +359,3 @@ void OFontSelector::fontStyleClicked ( int /*index*/ )
311{ 359{
312 changeFont ( ); 360 changeFont ( );
313} 361}
@@ -329,3 +377,5 @@ void OFontSelector::changeFont ( )
329 377
330 378/**
379 * Return the selected font
380 */
331QFont OFontSelector::selectedFont ( ) 381QFont OFontSelector::selectedFont ( )
@@ -333,7 +383,7 @@ QFont OFontSelector::selectedFont ( )
333 int ffa = d-> m_font_family_list-> currentItem ( ); 383 int ffa = d-> m_font_family_list-> currentItem ( );
334 int fst = d-> m_font_style_list-> currentItem ( ); 384 int fst = d-> m_font_style_list-> currentItem ( );
335 int fsi = d-> m_font_size_list-> currentItem ( ); 385 int fsi = d-> m_font_size_list-> currentItem ( );
336 386
337 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( ffa ); 387 FontListItem *fli = (FontListItem *) d-> m_font_family_list-> item ( ffa );
338 388
339 if ( fli ) { 389 if ( fli ) {
@@ -357,6 +407,6 @@ void OFontSelector::resizeEvent ( QResizeEvent *re )
357 QWidget::resizeEvent ( re ); 407 QWidget::resizeEvent ( re );
358 408
359 if ( d-> m_preview ) 409 if ( d-> m_preview )
360 d-> m_preview-> setFixedHeight ( d-> m_preview-> height ( )); 410 d-> m_preview-> setFixedHeight ( d-> m_preview-> height ( ));
361 411
362} 412}
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 */
38class OFontSelector : public QWidget 48class OFontSelector : public QWidget
@@ -47,3 +57,3 @@ public:
47 bool selectedFont ( QString &family, QString &style, int &size, QString &charset ); 57 bool selectedFont ( QString &family, QString &style, int &size, QString &charset );
48 58
49 QFont selectedFont ( ); 59 QFont selectedFont ( );
@@ -59,2 +69,5 @@ public:
59signals: 69signals:
70 /**
71 * This signal gets emitted when a font got chosen
72 */
60 void fontSelected ( const QFont & ); 73 void fontSelected ( const QFont & );
@@ -73,3 +86,3 @@ private:
73 void changeFont ( ); 86 void changeFont ( );
74 87
75private: 88private:
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 */
30ORecurranceWidget::ORecurranceWidget( bool startOnMonday, 38ORecurranceWidget::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 */
46ORecurranceWidget::ORecurranceWidget( bool startOnMonday, 65ORecurranceWidget::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 */
62void ORecurranceWidget::setStartDate( const QDate& date ) { 86void 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 */
66void ORecurranceWidget::setRecurrence( const ORecur& rp ) { 94void 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 */
69void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { 103void 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 */
126ORecur ORecurranceWidget::recurrence()const { 165ORecur 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 */
183QDate ORecurranceWidget::endDate()const { 227QDate 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 */
20class ORecurranceWidget : public ORecurranceBase { 32class 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
@@ -46,5 +47,4 @@
46 * 47 *
47*/ 48 */
48class OTicker : public QLabel { 49class OTicker : public QLabel {
49//class OTicker : public QFrame {
50 Q_OBJECT 50 Q_OBJECT
@@ -94,3 +94,3 @@ public:
94 */ 94 */
95 void setFrame(int style); 95 void setFrame(int style);
96/*! 96/*!
@@ -108,3 +108,3 @@ public:
108 */ 108 */
109 void setScrollLength(int length); 109 void setScrollLength(int length);
110signals: 110signals:
diff --git a/libopie/otimepicker.cpp b/libopie/otimepicker.cpp
index 8e8a4e7..115d39b 100644
--- a/libopie/otimepicker.cpp
+++ b/libopie/otimepicker.cpp
@@ -9,3 +9,10 @@
9 9
10OTimePicker::OTimePicker(QWidget* parent, const char* name, 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 */
17OTimePicker::OTimePicker(QWidget* parent, const char* name,
11 WFlags fl) : 18 WFlags fl) :
@@ -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);
@@ -22,4 +30,4 @@ OTimePicker::OTimePicker(QWidget* parent, const char* name,
22 vbox->addWidget(row); 30 vbox->addWidget(row);
23 31
24 32
25 for (int i=0; i<24; i++) { 33 for (int i=0; i<24; i++) {
@@ -46,3 +54,3 @@ OTimePicker::OTimePicker(QWidget* parent, const char* name,
46 vbox->addWidget(row); 54 vbox->addWidget(row);
47 55
48 for (int i=0; i<60; i+=5) { 56 for (int i=0; i<60; i+=5) {
@@ -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 */
73QTime OTimePicker::time()const {
74 return tm;
75}
76
61void OTimePicker::slotHour(bool b) { 77void 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 */
116void 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 */
125void 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 */
95void OTimePicker::setMinute(int m) { 137void OTimePicker::setMinute(int m) {
@@ -103,3 +145,3 @@ void OTimePicker::setMinute(int m) {
103 else (*it)->setOn(false); 145 else (*it)->setOn(false);
104 } 146 }
105 147
@@ -108,2 +150,5 @@ void OTimePicker::setMinute(int m) {
108 150
151/**
152 * Method to set the hour
153 */
109void OTimePicker::setHour(int h) { 154void OTimePicker::setHour(int h) {
@@ -117,3 +162,3 @@ void OTimePicker::setHour(int h) {
117 else (*it)->setOn(false); 162 else (*it)->setOn(false);
118 } 163 }
119 tm.setHMS(h,tm.minute(),0); 164 tm.setHMS(h,tm.minute(),0);
@@ -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 */
123OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) 175OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl )
@@ -135,3 +187,6 @@ OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags
135 187
136QTime& OTimePickerDialog::time() 188/**
189 * @return the time
190 */
191QTime 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 */
140void OTimePickerDialog::setTime( const QTime& time ) 200void OTimePickerDialog::setTime( const QTime& time )
@@ -156,5 +216,10 @@ void OTimePickerDialog::setTime( const QTime& time )
156 minuteField->setText( QString::number( time.minute() ) ); 216 minuteField->setText( QString::number( time.minute() ) );
157 217
158} 218}
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 */
160void OTimePickerDialog::setHour ( const QString& hour ) 225void 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 */
169void OTimePickerDialog::setMinute ( const QString& minute ) 239void 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 */
12class OTimePicker: public QWidget { 23class OTimePicker: public QWidget {
@@ -15,6 +26,13 @@ class OTimePicker: public QWidget {
15 public: 26 public:
16 OTimePicker(QWidget* parent = 0, const char* name = 0, 27 OTimePicker(QWidget* parent = 0, const char* name = 0,
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
34class OTimePickerDialog: public OTimePickerDialogBase { 64class 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 */
32OWait::OWait(QWidget *parent, const char* msg, bool dispIcon ) 41OWait::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,5 +41,5 @@ class OWait : public QDialog {
37public: 41public:
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();
40 44
41 /** 45 /**
@@ -47,5 +51,6 @@ 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
49 */ 54 */
50 void setTimerLength( int length ); 55 void setTimerLength( int length );
51 56
@@ -59,3 +64,3 @@ public:
59 void timerEvent( QTimerEvent * ) ; 64 void timerEvent( QTimerEvent * ) ;
60 void paintEvent( QPaintEvent * ); 65 void paintEvent( QPaintEvent * );
61 66
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 */
6class TodayConfigWidget : public QWidget { 17class 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 */
85struct TodayPluginInterface : public QUnknownInterface { 102struct TodayPluginInterface : public QUnknownInterface {