summaryrefslogtreecommitdiff
authorzecke <zecke>2003-04-13 16:57:28 (UTC)
committer zecke <zecke>2003-04-13 16:57:28 (UTC)
commit0b311079ff19798866291034663757103c6ba935 (patch) (side-by-side diff)
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) (show 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.h12
-rw-r--r--libopie/oclickablelabel.cpp29
-rw-r--r--libopie/oclickablelabel.h29
-rw-r--r--libopie/ocolorbutton.cpp27
-rw-r--r--libopie/ocolorbutton.h7
-rw-r--r--libopie/odevice.cpp108
-rw-r--r--libopie/odevice.h27
-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.h34
-rw-r--r--libopie/ofontselector.cpp60
-rw-r--r--libopie/ofontselector.h19
-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.h4
-rw-r--r--libopie/otimepicker.cpp72
-rw-r--r--libopie/otimepicker.h32
-rw-r--r--libopie/owait.cpp12
-rw-r--r--libopie/owait.h7
-rw-r--r--libopie/todayconfigwidget.h18
-rw-r--r--libopie/todayplugininterface.h23
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
@@ -58,4 +58,9 @@ static inline void rgb2hsv( QRgb rgb, int&h, int&s, int&v )
}
+/*
+ * avoid clashes with the original Qt
+ */
+namespace {
+
class QColorPicker : public QFrame
{
@@ -608,4 +613,6 @@ void QColorShower::setHsv( int h, int s, int v )
}
+}
+
class OColorDialogPrivate : public QObject
{
@@ -614,5 +621,5 @@ public:
OColorDialogPrivate( OColorDialog *p );
QRgb currentColor() const { return cs->currentColor(); }
- void setCurrentColor( QRgb rgb );
+ void setCurrentColor( const QRgb& rgb );
int currentAlpha() const { return cs->currentAlpha(); }
@@ -638,5 +645,5 @@ void OColorDialogPrivate::newHsv( int h, int s, int v )
//sets all widgets to display rgb
-void OColorDialogPrivate::setCurrentColor( QRgb rgb )
+void OColorDialogPrivate::setCurrentColor( const QRgb& rgb )
{
cs->setRgb( rgb );
@@ -727,5 +734,5 @@ OColorDialog::OColorDialog(QWidget* parent, const char* name, bool modal) :
*/
-QColor OColorDialog::getColor( QColor initial, QWidget *parent,
+QColor OColorDialog::getColor( const QColor& initial, QWidget *parent,
const char *name )
{
@@ -764,5 +771,5 @@ QColor OColorDialog::getColor( QColor initial, QWidget *parent,
*/
-QRgb OColorDialog::getRgba( QRgb initial, bool *ok,
+QRgb OColorDialog::getRgba( const QRgb& initial, bool *ok,
QWidget *parent, const char* name )
{
@@ -820,5 +827,5 @@ OColorDialog::~OColorDialog()
*/
-void OColorDialog::setColor( QColor c )
+void OColorDialog::setColor( const QColor& c )
{
d->setCurrentColor( c.rgb() );
diff --git a/libopie/colordialog.h b/libopie/colordialog.h
index 926f8f2..e9bb7ed 100644
--- a/libopie/colordialog.h
+++ b/libopie/colordialog.h
@@ -62,6 +62,6 @@ class Q_EXPORT OColorDialog : public QDialog
public:
- static QColor getColor( QColor, QWidget *parent=0, const char* name=0 ); // ### 3.0: make const QColor&
- static QRgb getRgba( QRgb, bool* ok = 0,
+ static QColor getColor( const QColor&, QWidget *parent=0, const char* name=0 );
+ static QRgb getRgba( const QRgb&, bool* ok = 0,
QWidget *parent=0, const char* name=0 );
@@ -70,5 +70,5 @@ private:
OColorDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE );
- void setColor( QColor ); // ### 3.0: make const QColor&
+ void setColor( const QColor& );
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
@@ -38,5 +38,5 @@
#include <qpainter.h>
-ColorPanelButton::ColorPanelButton( const QColor& color, QWidget* parent, const char* name )
+OColorPanelButton::OColorPanelButton( const QColor& color, QWidget* parent, const char* name )
: QFrame( parent, name )
{
@@ -47,9 +47,9 @@ ColorPanelButton::ColorPanelButton( const QColor& color, QWidget* parent, const
}
-ColorPanelButton::~ColorPanelButton()
+OColorPanelButton::~OColorPanelButton()
{
}
-void ColorPanelButton::setActive( bool active )
+void OColorPanelButton::setActive( bool active )
{
m_active = active;
@@ -62,8 +62,6 @@ void ColorPanelButton::setActive( bool active )
}
-void ColorPanelButton::enterEvent( QEvent* e )
+void OColorPanelButton::enterEvent( QEvent* )
{
- Q_UNUSED( e )
-
if ( !m_active ) {
setFrameStyle( Panel | Sunken );
@@ -71,8 +69,6 @@ void ColorPanelButton::enterEvent( QEvent* e )
}
-void ColorPanelButton::leaveEvent( QEvent* e )
+void OColorPanelButton::leaveEvent( QEvent* )
{
- Q_UNUSED( e )
-
if ( !m_active ) {
setFrameStyle( NoFrame );
@@ -80,5 +76,5 @@ void ColorPanelButton::leaveEvent( QEvent* e )
}
-void ColorPanelButton::paintEvent( QPaintEvent* e )
+void OColorPanelButton::paintEvent( QPaintEvent* e )
{
QFrame::paintEvent( e );
@@ -92,12 +88,10 @@ void ColorPanelButton::paintEvent( QPaintEvent* e )
}
-void ColorPanelButton::mouseReleaseEvent( QMouseEvent* e )
+void OColorPanelButton::mouseReleaseEvent( QMouseEvent* )
{
- Q_UNUSED( e )
-
emit selected( m_color );
}
-ColorPopupMenu::ColorPopupMenu( const QColor& color, QWidget* parent, const char* name )
+OColorPopupMenu::OColorPopupMenu( const QColor& color, QWidget* parent, const char* name )
: QPopupMenu( parent, name )
{
@@ -150,16 +144,16 @@ ColorPopupMenu::ColorPopupMenu( const QColor& color, QWidget* parent, const char
}
-ColorPopupMenu::~ColorPopupMenu()
+OColorPopupMenu::~OColorPopupMenu()
{
}
-void ColorPopupMenu::addColor( const QColor& color, int row, int col )
+void OColorPopupMenu::addColor( const QColor& color, int row, int col )
{
- ColorPanelButton* panelButton = new ColorPanelButton( color, colorPanel );
+ OColorPanelButton* panelButton = new OColorPanelButton( color, colorPanel );
connect( panelButton, SIGNAL( selected( const QColor& ) ), this, SLOT( buttonSelected( const QColor& ) ) );
colorLayout->addWidget( panelButton, row, col );
}
-void ColorPopupMenu::buttonSelected( const QColor& color )
+void OColorPopupMenu::buttonSelected( const QColor& color )
{
m_color = color;
@@ -168,5 +162,5 @@ void ColorPopupMenu::buttonSelected( const QColor& color )
}
-void ColorPopupMenu::moreColorClicked()
+void OColorPopupMenu::moreColorClicked()
{
QColor color = OColorDialog::getColor( m_color );
diff --git a/libopie/colorpopupmenu.h b/libopie/colorpopupmenu.h
index b0453b2..184b132 100644
--- a/libopie/colorpopupmenu.h
+++ b/libopie/colorpopupmenu.h
@@ -41,14 +41,14 @@ class QGridLayout;
/**
- * @class ColorPanelButton
- * @brief The ColorPanelButton class provides a button for color selection.
+ * @class OColorPanelButton
+ * @brief The OColorPanelButton class provides a button for color selection.
*
- * @see ColorPopupMenu
+ * @see OColorPopupMenu
*
- * The ColorPanelButton class provides a button for color selection. The button
+ * The OColorPanelButton class provides a button for color selection. The button
* is drawn with the desired color and no border. This class is used internally
- * by the ColorPopupMenu class to displaying colors in its menu.
+ * by the OColorPopupMenu class to displaying colors in its menu.
*/
-class ColorPanelButton : public QFrame
+class OColorPanelButton : public QFrame
{
Q_OBJECT
@@ -57,5 +57,5 @@ public:
/**
- * @fn ColorPanelButton( const QColor& color, QWidget* parent = 0, const char* name = 0 )
+ * @fn OColorPanelButton( const QColor& color, QWidget* parent = 0, const char* name = 0 )
* @brief Object constructor.
*
@@ -66,5 +66,5 @@ public:
* Constructs a new ColorPanelButton control with parent, name and desired color.
*/
- ColorPanelButton(const QColor& color, QWidget* parent = 0, const char* name = 0);
+ OColorPanelButton(const QColor& color, QWidget* parent = 0, const char* name = 0);
/**
@@ -72,5 +72,5 @@ public:
* @brief Object destructor.
*/
- ~ColorPanelButton();
+ ~OColorPanelButton();
/**
@@ -151,9 +151,9 @@ private:
/**
- * @class ColorPopupMenu
- * @brief The ColorPopupMenu class provides a small color selection
+ * @class OColorPopupMenu
+ * @brief The OColorPopupMenu class provides a small color selection
* popup menu.
*
- * ColorPopupMenu is a derivation of TrollTech's QPopupMenu and provides
+ * OColorPopupMenu is a derivation of TrollTech's QPopupMenu and provides
* a small color selection popup menu which can be attached to another control
* such as a toolbar button of menu item.
@@ -163,5 +163,5 @@ private:
* finer color control.
*/
-class ColorPopupMenu : public QPopupMenu
+class OColorPopupMenu : public QPopupMenu
{
Q_OBJECT
@@ -170,5 +170,5 @@ public:
/**
- * @fn ColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 )
+ * @fn OColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 )
* @brief Object constructor.
*
@@ -177,13 +177,13 @@ public:
* @param name Name of control.
*
- * Constructs a new ColorPopupMenu control with parent, name and initial color selected.
+ * Constructs a new OColorPopupMenu control with parent, name and initial color selected.
*/
- ColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 );
+ OColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 );
/**
- * @fn ~ColorPopupMenu()
+ * @fn ~OColorPopupMenu()
* @brief Object destructor.
*/
- ~ColorPopupMenu();
+ ~OColorPopupMenu();
private:
diff --git a/libopie/ocheckitem.cpp b/libopie/ocheckitem.cpp
index d6ddc79..082d7a2 100644
--- a/libopie/ocheckitem.cpp
+++ b/libopie/ocheckitem.cpp
@@ -15,4 +15,11 @@
#include "ocheckitem.h"
+/**
+ * Constructs an CheckItem with a QTable as parent
+ * and a sort key for.
+ * The sort key will be used by QTable to sort the table later
+ * @param t The parent QTable where the check item belongs
+ * @param key A sort key
+ */
OCheckItem::OCheckItem( QTable *t, const QString &key )
: QTableItem( t, Never, "" ), m_checked( FALSE ), m_sortKey( key )
@@ -20,4 +27,9 @@ OCheckItem::OCheckItem( QTable *t, const QString &key )
}
+/**
+ * reimplemted for internal reasons
+ * @return Returns the sort key of the Item
+ * @see QTableItem
+ */
QString OCheckItem::key() const
{
@@ -25,4 +37,10 @@ QString OCheckItem::key() const
}
+/**
+ * This method can check or uncheck the item. It will
+ * call QTable to update the cell.
+ *
+ * @param b Whether to check or uncheck the item
+ */
void OCheckItem::setChecked( bool b )
{
@@ -31,4 +49,8 @@ void OCheckItem::setChecked( bool b )
}
+/**
+ * This will toggle the item. If it is checked it'll get
+ * unchecked by this method or vice versa.
+ */
void OCheckItem::toggle()
{
@@ -36,4 +58,9 @@ void OCheckItem::toggle()
}
+/**
+ * This will return the state of the item.
+ *
+ * @return Returns true if the item is checked
+ */
bool OCheckItem::isChecked() const
{
@@ -41,4 +68,8 @@ bool OCheckItem::isChecked() const
}
+/**
+ * @internal
+ * This paints the item
+ */
void OCheckItem::paint( QPainter *p, const QColorGroup &cg, const QRect &cr,
bool )
diff --git a/libopie/ocheckitem.h b/libopie/ocheckitem.h
index 7885032..2387134 100644
--- a/libopie/ocheckitem.h
+++ b/libopie/ocheckitem.h
@@ -15,4 +15,16 @@
#define CHECKITEM_H__
+/**
+ * This class represents a checkable QTableItem. This can
+ * be added to any QTable.
+ *
+ *
+ * @see QTable
+ * @see QTableItem
+ * @short An checkable QTableItem
+ * @version 1.0
+ * @author Stefan Eilers ( eilers@handhelds.org )
+ */
+
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
@@ -2,4 +2,11 @@
#include <stdio.h>
+/**
+ * This constructs the clickable ButtonLabel
+ *
+ * @param parent The parent of this label
+ * @param name A name of this label @see QObject
+ * @param fl The windowing flags
+ */
OClickableLabel::OClickableLabel(QWidget* parent,
const char* name,
@@ -14,8 +21,16 @@ OClickableLabel::OClickableLabel(QWidget* parent,
}
+/**
+ * This method makes the label behave as a toggle button
+ *
+ * @param t Whether or not to behave like a toggle button
+ */
void OClickableLabel::setToggleButton(bool t) {
isToggle=t;
}
+/**
+ * @internal
+ */
void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) {
if (isToggle && isDown) {
@@ -26,4 +41,7 @@ void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) {
}
+/**
+ * @internal
+ */
void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) {
if (rect().contains(e->pos()) && isToggle) isDown=!isDown;
@@ -43,4 +61,7 @@ void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) {
}
+/**
+ * @internal
+ */
void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) {
if (rect().contains(e->pos())) {
@@ -59,4 +80,9 @@ void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) {
}
+/**
+ * this toggles the label and inverts the color of
+ * the label
+ * @param on
+ */
void OClickableLabel::showState(bool on) {
if (on) {
@@ -83,4 +109,7 @@ void OClickableLabel::setInverted(bool on) {
}
+/**
+ * @param on if the Label is down or up
+ */
void OClickableLabel::setOn(bool on) {
isDown=on;
diff --git a/libopie/oclickablelabel.h b/libopie/oclickablelabel.h
index f65c440..4b6dcbc 100644
--- a/libopie/oclickablelabel.h
+++ b/libopie/oclickablelabel.h
@@ -4,4 +4,24 @@
#include <qlabel.h>
+/**
+ * This class is a special QLabel which can behave
+ * as a QPushButton or QToggleButton.
+ * The reason to use a clickable is if you want to save space
+ * or you want to skip the border of a normal button
+ *
+ * <pre>
+ * QLabel* lbl = new OClickableLabel( parent, "PushLabel" );
+ * lbl->setPixmap( "config" );
+ * QWhatsThis::add( lbl, tr("Click here to do something") );
+ * </pre>
+ *
+ * @short A Label behaving as button
+ * @author Hakan Ardo, Maximillian Reiß ( harlekin@handhelds.org )
+ * @see QLabel
+ * @see QPushButton
+ * @see QToggleButton
+ * @version 1.0
+ */
+
class OClickableLabel: public QLabel
{
@@ -11,8 +31,10 @@ public:
WFlags fl = 0);
void setToggleButton(bool t);
+
protected:
void mousePressEvent( QMouseEvent *e );
void mouseReleaseEvent( QMouseEvent *e );
void mouseMoveEvent( QMouseEvent *e );
+
public slots:
void setOn(bool on);
@@ -21,8 +43,9 @@ public:
void toggled(bool on);
private:
- bool isToggle;
- bool isDown;
+ bool isToggle : 1;
+ bool isDown : 1;
+ bool textInverted : 1;
+
void showState(bool on);
- bool textInverted;
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
@@ -35,10 +35,18 @@
#include <qpe/resource.h>
-class OColorButtonPrivate {
-public:
+struct OColorButtonPrivate {
QPopupMenu *m_menu;
QColor m_color;
};
+
+/**
+ * This concstructs a Color Button with @param color as the start color
+ * It'll use a OColorPopupMenu internally
+ *
+ * @param parent The parent of the Color Button
+ * @param color The color from where to start on
+ * @param name @see QObject
+ */
OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *name )
: QPushButton ( parent, name )
@@ -46,5 +54,5 @@ OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *n
d = new OColorButtonPrivate;
- d-> m_menu = new ColorPopupMenu ( color, 0, 0 );
+ d-> m_menu = new OColorPopupMenu ( color, 0, 0 );
setPopup ( d-> m_menu );
// setPopupDelay ( 0 );
@@ -58,4 +66,7 @@ OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *n
}
+/**
+ * This destructs the object
+ */
OColorButton::~OColorButton ( )
{
@@ -63,4 +74,7 @@ OColorButton::~OColorButton ( )
}
+/**
+ * @return Returns the current color of the button
+ */
QColor OColorButton::color ( ) const
{
@@ -68,4 +82,8 @@ QColor OColorButton::color ( ) const
}
+/**
+ * This method sets the color of the button
+ * @param c The color to be set.
+ */
void OColorButton::setColor ( const QColor &c )
{
@@ -73,4 +91,7 @@ void OColorButton::setColor ( const QColor &c )
}
+/**
+ * @internal
+ */
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
@@ -35,4 +35,11 @@ class OColorButtonPrivate;
class QColor;
+/**
+ *
+ * @short A Button which will show a OColorPopupMenu
+ * @author Robert Griebl ( sandman@handhelds.org )
+ * @version 1.0
+ * @see QPushButton
+ */
class OColorButton : public QPushButton {
Q_OBJECT
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 9b2a954..8f954b1 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -54,5 +54,5 @@ using namespace Opie;
class ODeviceData {
public:
- bool m_qwsserver;
+ bool m_qwsserver : 1;
QString m_vendorstr;
@@ -271,4 +271,7 @@ void ODevice::init ( )
}
+/**
+ * This method initialises the button mapping
+ */
void ODevice::initButtons ( )
{
@@ -314,5 +317,15 @@ bool ODevice::setSoftSuspend ( bool /*soft*/ )
#define APM_IOC_SUSPEND OD_IO( 'A', 2 )
-
+/**
+ * This method will try to suspend the device
+ * It only works if the user is the QWS Server and the apm application
+ * is installed.
+ * It tries to suspend and then waits some time cause some distributions
+ * do have asynchronus apm implementations.
+ * This method will either fail and return false or it'll suspend the
+ * device and return once the device got woken up
+ *
+ * @return if the device got suspended
+ */
bool ODevice::suspend ( )
{
@@ -355,5 +368,7 @@ bool ODevice::suspend ( )
#define VESA_POWERDOWN 3
-
+/**
+ * This sets the display on or off
+ */
bool ODevice::setDisplayStatus ( bool on )
{
@@ -371,6 +386,11 @@ bool ODevice::setDisplayStatus ( bool on )
}
-bool ODevice::setDisplayBrightness ( int )
+/**
+ * This sets the display brightness
+ * @return success or failure
+ */
+bool ODevice::setDisplayBrightness ( int p)
{
+ Q_UNUSED( p )
return false;
}
@@ -381,4 +401,8 @@ int ODevice::displayBrightnessResolution ( ) const
}
+/**
+ * This returns the vendor as string
+ * @return Vendor as QString
+ */
QString ODevice::vendorString ( ) const
{
@@ -386,4 +410,8 @@ QString ODevice::vendorString ( ) const
}
+/**
+ * This returns the vendor as one of the values of OVendor
+ * @return OVendor
+ */
OVendor ODevice::vendor ( ) const
{
@@ -391,4 +419,8 @@ OVendor ODevice::vendor ( ) const
}
+/**
+ * This returns the model as a string
+ * @return A string representing the model
+ */
QString ODevice::modelString ( ) const
{
@@ -396,4 +428,7 @@ QString ODevice::modelString ( ) const
}
+/**
+ * This does return the OModel used
+ */
OModel ODevice::model ( ) const
{
@@ -401,4 +436,7 @@ OModel ODevice::model ( ) const
}
+/**
+ * This does return the systen name
+ */
QString ODevice::systemString ( ) const
{
@@ -406,4 +444,7 @@ QString ODevice::systemString ( ) const
}
+/**
+ * Return System as OSystem value
+ */
OSystem ODevice::system ( ) const
{
@@ -411,4 +452,7 @@ OSystem ODevice::system ( ) const
}
+/**
+ * @return the version string of the base system
+ */
QString ODevice::systemVersionString ( ) const
{
@@ -416,4 +460,7 @@ QString ODevice::systemVersionString ( ) const
}
+/**
+ * @return the current Transformation
+ */
Transformation ODevice::rotation ( ) const
{
@@ -421,4 +468,7 @@ Transformation ODevice::rotation ( ) const
}
+/**
+ * This plays an alarmSound
+ */
void ODevice::alarmSound ( )
{
@@ -431,4 +481,7 @@ void ODevice::alarmSound ( )
}
+/**
+ * This plays a key sound
+ */
void ODevice::keySound ( )
{
@@ -441,4 +494,7 @@ void ODevice::keySound ( )
}
+/**
+ * This plays a touch sound
+ */
void ODevice::touchSound ( )
{
@@ -452,5 +508,9 @@ void ODevice::touchSound ( )
}
-
+/**
+ * This method will return a list of leds
+ * available on this device
+ * @return a list of LEDs.
+ */
QValueList <OLed> ODevice::ledList ( ) const
{
@@ -458,4 +518,7 @@ QValueList <OLed> ODevice::ledList ( ) const
}
+/**
+ * This does return the state of the LEDs
+ */
QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const
{
@@ -463,4 +526,7 @@ QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const
}
+/**
+ * @return the state for a given OLed
+ */
OLedState ODevice::ledState ( OLed /*which*/ ) const
{
@@ -468,9 +534,20 @@ OLedState ODevice::ledState ( OLed /*which*/ ) const
}
-bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ )
+/**
+ * Set the state for a LED
+ * @param which Which OLed to use
+ * @param st The state to set
+ * @return success or failure
+ */
+bool ODevice::setLedState ( OLed which, OLedState st )
{
+ Q_UNUSED( which )
+ Q_UNUSED( st )
return false;
}
+/**
+ * @return if the device has a light sensor
+ */
bool ODevice::hasLightSensor ( ) const
{
@@ -478,4 +555,7 @@ bool ODevice::hasLightSensor ( ) const
}
+/**
+ * @return a value from the light senso
+ */
int ODevice::readLightSensor ( )
{
@@ -483,4 +563,7 @@ int ODevice::readLightSensor ( )
}
+/**
+ * @return the light sensor resolution whatever that is ;)
+ */
int ODevice::lightSensorResolution ( ) const
{
@@ -488,4 +571,7 @@ int ODevice::lightSensorResolution ( ) const
}
+/**
+ * @return a list of hardware buttons
+ */
const QValueList <ODeviceButton> &ODevice::buttons ( )
{
@@ -495,4 +581,7 @@ const QValueList <ODeviceButton> &ODevice::buttons ( )
}
+/**
+ * @return The amount of time that would count as a hold
+ */
uint ODevice::buttonHoldTime ( ) const
{
@@ -500,4 +589,11 @@ uint ODevice::buttonHoldTime ( ) const
}
+/**
+ * This method return a ODeviceButton for a key code
+ * or 0 if no special hardware button is available for the device
+ *
+ * @return The devicebutton or 0l
+ * @see ODeviceButton
+ */
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
@@ -33,6 +33,9 @@ class ODeviceData;
namespace Opie {
+/**
+ * The available devices
+ */
enum OModel {
- Model_Unknown,
+ Model_Unknown, // = 0
Model_Series_Mask = 0xff000000,
@@ -56,4 +59,7 @@ enum OModel {
};
+/**
+ * The vendor of the device
+ */
enum OVendor {
Vendor_Unknown,
@@ -63,4 +69,7 @@ enum OVendor {
};
+/**
+ * The System used
+ */
enum OSystem {
System_Unknown,
@@ -95,8 +104,20 @@ enum OHardKey {
};
+/**
+ * A singleton which gives informations about device specefic option
+ * like the Hardware used, LEDs, the Base Distribution and
+ * hardware key mappings.
+ *
+ *
+ * @short A small class for device specefic options
+ * @see QObject
+ * @author Robert Griebl
+ * @version 1.0
+ */
class ODevice : public QObject {
Q_OBJECT
private:
+ /* disable copy */
ODevice ( const ODevice & );
@@ -109,6 +130,8 @@ protected:
public:
+ // sandman do we want to allow destructions? -zecke?
virtual ~ODevice ( );
+
static ODevice *inst ( );
@@ -139,5 +162,5 @@ public:
// input / output
-
+ //FIXME playAlarmSound and al might be better -zecke
virtual void alarmSound ( );
virtual void keySound ( );
diff --git a/libopie/odevicebutton.h b/libopie/odevicebutton.h
index 5281ab2..cf91bbd 100644
--- a/libopie/odevicebutton.h
+++ b/libopie/odevicebutton.h
@@ -59,4 +59,8 @@ private:
* and number of buttons will vary from device to device. userText() and pixmap()
* may be used to describe this button to the user in help documentation.
+ *
+ * @version 1.0
+ * @author Trolltech
+ * @short A representation of buttons
*/
diff --git a/libopie/ofiledialog.cc b/libopie/ofiledialog.cc
index 4783004..9e725c2 100644
--- a/libopie/ofiledialog.cc
+++ b/libopie/ofiledialog.cc
@@ -34,4 +34,15 @@
#include "ofiledialog.h"
+/**
+ * This constructs a modal dialog
+ *
+ * @param caption The caption of the dialog
+ * @param wid The parent widget
+ * @param mode The mode of the OFileSelector @see OFileSelector
+ * @param selector The selector of the OFileSelector
+ * @param dirName the dir or resource to start from
+ * @param fileName a proposed or existing filename
+ * @param mimetypes The mimeTypes
+ */
OFileDialog::OFileDialog(const QString &caption,
QWidget *wid, int mode, int selector,
@@ -61,16 +72,40 @@ OFileDialog::OFileDialog(const QString &caption,
file->setYesCancelVisible( false ); // relayout
}
+/**
+ * @returns the mimetype of the selected
+ * currently it return QString::null
+ */
QString OFileDialog::mimetype()const
{
return QString::null;
}
+
+/**
+ * @return the fileName
+ */
QString OFileDialog::fileName()const
{
return file->selectedName();
}
+
+/**
+ * return a DocLnk to the current file
+ */
DocLnk OFileDialog::selectedDocument()const
{
return file->selectedDocument();
}
+
+/**
+ * This opens up a filedialog in Open mode
+ *
+ * @param selector the Selector Mode
+ * @param startDir Where to start from
+ * @param file A proposed filename
+ * @param mimes A list of MimeTypes
+ * @param wid the parent
+ * @param caption of the dialog if QString::null tr("Open") will be used
+ * @return the fileName or QString::null
+ */
QString OFileDialog::getOpenFileName(int selector,
const QString &startDir,
@@ -89,4 +124,9 @@ QString OFileDialog::getOpenFileName(int selector,
return ret;
}
+
+/**
+ * This opens up a file dialog in save mode
+ * @see getOpenFileName
+ */
QString OFileDialog::getSaveFileName(int selector,
const QString &startDir,
diff --git a/libopie/ofiledialog.h b/libopie/ofiledialog.h
index e14253c..309086b 100644
--- a/libopie/ofiledialog.h
+++ b/libopie/ofiledialog.h
@@ -35,4 +35,27 @@
#include <opie/ofileselector.h>
+/**
+ * This class places a OFileSelector inside a QDialog.
+ * It provides static method for letting a user chose
+ * a file for either opening or saving.
+ * Most of the time the c'tor will not be used instead using
+ * the static member functions is prefered.
+ *
+ * <pre>
+ * QMap<QString, QStringList> mimeTypes;
+ * QStringList types;
+ * types << "text/* ";
+ * mimeTypes.insert( tr("Text"), types );
+ * mimeTypes.insert( tr("All"), " * / * " ); // remove the spaces in the 2nd comment
+ * QString fileName= OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL,
+ * "foo","bar", mimeTypes);
+ * </pre>
+ *
+ * @short A small QDialog swalloing a FileSelector
+ * @see QDialog
+ * @see OFileSelector
+ * @version 0.1-unfinished
+ * @author Holger Freyther ( zecke@handhelds.org )
+ */
class OFileDialog : public QDialog {
Q_OBJECT
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h
index 17c494e..06ac806 100644
--- a/libopie/ofileselector.h
+++ b/libopie/ofileselector.h
@@ -122,4 +122,6 @@ class OFileSelector : public QWidget {
// currently only for the FILESELECTOR Mode
+ /**
+ */
void setNewVisible( bool /*b*/ );
void setCloseVisible(bool /*b*/ );
diff --git a/libopie/ofontmenu.cc b/libopie/ofontmenu.cc
index 52ff3ee..d16c5e5 100644
--- a/libopie/ofontmenu.cc
+++ b/libopie/ofontmenu.cc
@@ -5,5 +5,11 @@
-
+/**
+ * Constructs the FontMenu.
+ *
+ * @param parent The parent widget
+ * @param name A name for this widget
+ * @param list The list of widgets to be controlled
+ */
OFontMenu::OFontMenu(QWidget *parent, const char *name, const QList<QWidget> &list )
: QPopupMenu( parent, name )
@@ -21,4 +27,11 @@ OFontMenu::OFontMenu(QWidget *parent, const char *name, const QList<QWidget> &li
m_size=10;
}
+
+/**
+ * This method saves the font size
+ * into a Config object
+ * OFontMenu will be used as group and size as key
+ * @param cfg The Config object to be used
+ */
void OFontMenu::save(Config *cfg )
{
@@ -26,4 +39,10 @@ void OFontMenu::save(Config *cfg )
cfg->writeEntry("size", m_size );
}
+
+/**
+ * This method restores the font size from a Config object
+ * it'll apply the sizes to the widgets and will also set the
+ * menu appropriate
+ */
void OFontMenu::restore(Config *cfg )
{
@@ -48,20 +67,45 @@ void OFontMenu::restore(Config *cfg )
setFontSize( m_size );
}
+
+/**
+ * set the list of widgets
+ * @param list the widget list
+ */
void OFontMenu::setWidgets(const QList<QWidget> &list )
{
m_list = list;
}
+
+/**
+ * add a widget to the list
+ * @param wid The widget to be added
+ */
void OFontMenu::addWidget( QWidget *wid )
{
m_list.append(wid );
}
+
+/**
+ * removes the widget from the list of controlled objects
+ * @param wid the to be removed widget
+ */
void OFontMenu::removeWidget( QWidget *wid )
{
m_list.remove( wid );
}
+
+/**
+ * The list of controlled widgets
+ */
const QList<QWidget> &OFontMenu::widgets()const
{
return m_list;
}
+
+/**
+ * Forces a size on a widget
+ * @param wid The widget
+ * @param size The font size forced onto the widget
+ */
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
@@ -38,5 +38,7 @@
#include <qlist.h>
-
+/*
+ * @internal
+ */
namespace {
struct WidSize {
@@ -47,6 +49,28 @@ namespace {
};
-// if i would be on kde this would be a KActionMenu...
+// forward declarations
class Config;
+
+/**
+ * This class is a specialised QPopupMenu. It'll display three different
+ * font sizes. Small, Normal and large by adding widgets to the Menu
+ * you can control the font size of these widgets
+ * by using the save and restore method you can also apply font sizes
+ * over two different runtimes
+ *
+ * <pre>
+ * QTable* tbl = new QTable();
+ * QList<QWidget> wid;
+ * wid.append( tbl );
+ * OFontMenu* menu = new OFontMenu(this, "Popup Menu", wid );
+ * Config cfg("mycfg");
+ * menu->restore( cfg );
+ * </pre>
+ *
+ * @author Holger Freyther ( zecke@handhelds.org )
+ * @version 0.1
+ * @short PopupMenu which can control the size of Widgets
+ * @see QPopupMenu
+ */
class OFontMenu : public QPopupMenu {
Q_OBJECT
@@ -62,5 +86,10 @@ class OFontMenu : public QPopupMenu {
signals:
+ /**
+ * this signal gets emitted when the font size gets changed
+ * @param size The new size of font
+ */
void fontChanged(int size );
+
private:
QList<QWidget> m_list;
@@ -69,4 +98,5 @@ class OFontMenu : public QPopupMenu {
class OFontMenuPrivate;
OFontMenuPrivate *d;
+
private slots:
virtual void slotSmall();
diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp
index b905474..c8471cc 100644
--- a/libopie/ofontselector.cpp
+++ b/libopie/ofontselector.cpp
@@ -45,9 +45,10 @@ public:
QMultiLineEdit *m_preview;
- bool m_pointbug;
+ bool m_pointbug : 1;
FontDatabase m_fdb;
};
+namespace {
class FontListItem : public QListBoxText {
@@ -95,5 +96,6 @@ static int findItemCB ( QComboBox *box, const QString &str )
}
-
+}
+/* static same as anon. namespace */
static int qt_version ( )
{
@@ -103,5 +105,11 @@ static int qt_version ( )
}
-
+/**
+ * Constructs the Selector object
+ * @param withpreview If a font preview should be given
+ * @param parent The parent of the Font Selector
+ * @param name The name of the object
+ * @param fl WidgetFlags
+ */
OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl )
{
@@ -153,4 +161,9 @@ OFontSelector::~OFontSelector ( )
}
+/**
+ * This methods tries to set the font
+ * @param f The wishes font
+ * @return success or failure
+ */
bool OFontSelector::setSelectedFont ( const QFont &f )
{
@@ -158,5 +171,13 @@ bool OFontSelector::setSelectedFont ( const QFont &f )
}
-bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & /*charset*/ )
+
+/**
+ * This is an overloaded method @see setSelectedFont
+ * @param familyStr The family of the font
+ * @param styleStr The style of the font
+ * @param sizeVal The size of font
+ * @param charset The charset to be used. Will be deprecated by QT3
+ */
+bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset )
{
QString sizeStr = QString::number ( sizeVal );
@@ -189,4 +210,12 @@ bool OFontSelector::setSelectedFont ( const QString &familyStr, const QString &s
}
+/**
+ * This method returns the name, style and size of the currently selected
+ * font or false if no font is selected
+ * @param family The font family will be written there
+ * @param style The style will be written there
+ * @param size The size will be written there
+ * @return success or failure
+ */
bool OFontSelector::selectedFont ( QString &family, QString &style, int &size )
{
@@ -196,4 +225,9 @@ bool OFontSelector::selectedFont ( QString &family, QString &style, int &size )
+/**
+ * This method does return the font family or QString::null if there is
+ * no font item selected
+ * @return the font family
+ */
QString OFontSelector::fontFamily ( ) const
{
@@ -203,4 +237,8 @@ QString OFontSelector::fontFamily ( ) const
}
+/**
+ * This method will return the style of the font or QString::null
+ * @return the style of the font
+ */
QString OFontSelector::fontStyle ( ) const
{
@@ -211,4 +249,7 @@ QString OFontSelector::fontStyle ( ) const
}
+/**
+ * This method will return the font size or 10 if no font size is available
+ */
int OFontSelector::fontSize ( ) const
{
@@ -219,4 +260,7 @@ int OFontSelector::fontSize ( ) const
}
+/**
+ * returns the charset of the font or QString::null
+ */
QString OFontSelector::fontCharSet ( ) const
{
@@ -226,4 +270,8 @@ QString OFontSelector::fontCharSet ( ) const
}
+/**
+ * Overloaded member function see above
+ * @see selectedFont
+ */
bool OFontSelector::selectedFont ( QString &family, QString &style, int &size, QString &charset )
{
@@ -328,5 +376,7 @@ void OFontSelector::changeFont ( )
}
-
+/**
+ * Return the selected font
+ */
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
@@ -27,6 +27,6 @@
*/
-#ifndef __OPIE_FONTSELECTOR_H__
-#define __OPIE_FONTSELECTOR_H__
+#ifndef OPIE_FONTSELECTOR_H__
+#define OPIE_FONTSELECTOR_H__
#include <qwidget.h>
@@ -35,5 +35,15 @@ class QListBox;
class OFontSelectorPrivate;
-
+/**
+ * This class lets you chose a Font out of a list of Fonts.
+ * It can show a preview too. This selector will use all available
+ * fonts
+ *
+ *
+ * @short A widget to select a font
+ * @see QWidget
+ * @see QFont
+ * @author Rober Griebl
+ */
class OFontSelector : public QWidget
{
@@ -58,4 +68,7 @@ public:
signals:
+ /**
+ * This signal gets emitted when a font got chosen
+ */
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
@@ -27,5 +27,13 @@ static QString numberPlacing( int x ); // return the proper word format for
static int week( const QDate &dt ); // what week in the month is dt?
-
+/**
+ * Constructs the Widget
+ * @param startOnMonday Does the week start on monday
+ * @param newStart The start date of the recurrence
+ * @param parent The parent widget
+ * @param name the name of object
+ * @param modal if the dialog should be modal
+ * @param fl Additional window flags
+ */
ORecurranceWidget::ORecurranceWidget( bool startOnMonday,
const QDate& newStart,
@@ -44,4 +52,15 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday,
setupNone();
}
+
+/**
+ * Different constructor
+ * @param startOnMonday Does the week start on monday?
+ * @param rp Already set ORecur object
+ * @param startDate The start date
+ * @param parent The parent widget
+ * @param name The name of the object
+ * @param modal
+ * @param fl The flags for window
+ */
ORecurranceWidget::ORecurranceWidget( bool startOnMonday,
const ORecur& rp, const QDate& startDate,
@@ -60,11 +79,26 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday,
ORecurranceWidget::~ORecurranceWidget() {
}
+
+/**
+ * set the start date
+ * @param date the new start date
+ */
void ORecurranceWidget::setStartDate( const QDate& date ) {
qWarning("ORecurranceWidget::setStartDate");
setRecurrence( recurrence(), date );
}
+/**
+ * set the recurrence
+ * @param rp The ORecur object with the new recurrence rules
+ */
void ORecurranceWidget::setRecurrence( const ORecur& rp ) {
setRecurrence( rp, start );
}
+
+/**
+ * overloaded method taking ORecur and a new start date
+ * @param rp Recurrence rule
+ * @param date The new start date
+ */
void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) {
start = date;
@@ -124,4 +158,9 @@ void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) {
cmdEnd->setText( TimeString::shortDate( end ) );
}
+
+/**
+ * the user selected recurrence rule.
+ * @return The recurrence rule.
+ */
ORecur ORecurranceWidget::recurrence()const {
QListIterator<QToolButton> it( listRTypeButtons );
@@ -181,4 +220,9 @@ ORecur ORecurranceWidget::recurrence()const {
return rpTmp;
}
+
+/**
+ * Return the end date of the recurrence. This is only
+ * valid if the recurrence rule does contain an enddate
+ */
QDate ORecurranceWidget::endDate()const {
return end;
diff --git a/libopie/orecurrancewidget.h b/libopie/orecurrancewidget.h
index 4a8dd08..af87ce9 100644
--- a/libopie/orecurrancewidget.h
+++ b/libopie/orecurrancewidget.h
@@ -18,4 +18,16 @@
// FIXME spelling!!!! -zecke
+// FIXME spelling filenames
+
+/**
+ * A widget to let the user select rules for recurrences.
+ * This widget can take care of weekly, monthly, daily and yearly recurrence
+ * It is used inside todolist and datebook.
+ *
+ *
+ * @short Widget of selecting Recurrance
+ * @author Trolltech, Holger Freyther
+ * @version 0.9
+ */
class ORecurranceWidget : public ORecurranceBase {
Q_OBJECT
diff --git a/libopie/otabbar.h b/libopie/otabbar.h
index 16797a3..c413611 100644
--- a/libopie/otabbar.h
+++ b/libopie/otabbar.h
@@ -58,4 +58,5 @@ public:
* Constructs a new OTabBar control with parent and name.
*/
+ // FIXME Allow WFlags? -zecke
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
@@ -100,4 +100,5 @@ public:
* determine how the widget selection control will be displayed.
*/
+ // FIXME WFlags? -zecke
OTabWidget( QWidget * = 0, const char * = 0, TabStyle = Global, TabPosition = Top );
@@ -198,4 +199,5 @@ public:
* @brief returns current tab id.
*/
+ //FIXME TT coding style currentTab() -zecke
int getCurrentTab();
diff --git a/libopie/oticker.h b/libopie/oticker.h
index 5df08da..30b7517 100644
--- a/libopie/oticker.h
+++ b/libopie/oticker.h
@@ -41,5 +41,6 @@
#include <qframe.h>
#include <qcolor.h>
-/*!
+
+/**
* @class OTicker
* @brief The OTicker class provides a QLabel widget that scroll its contents
@@ -47,5 +48,4 @@
*/
class OTicker : public QLabel {
-//class OTicker : public QFrame {
Q_OBJECT
diff --git a/libopie/otimepicker.cpp b/libopie/otimepicker.cpp
index 8e8a4e7..115d39b 100644
--- a/libopie/otimepicker.cpp
+++ b/libopie/otimepicker.cpp
@@ -8,8 +8,16 @@
#include <qlineedit.h>
+
+/**
+ * Constructs the widget
+ * @param parent The parent of the OTimePicker
+ * @param name The name of the object
+ * @param fl Window Flags
+ */
OTimePicker::OTimePicker(QWidget* parent, const char* name,
WFlags fl) :
QWidget(parent,name,fl)
{
+
QVBoxLayout *vbox=new QVBoxLayout(this);
@@ -59,4 +67,12 @@ OTimePicker::OTimePicker(QWidget* parent, const char* name,
}
+/**
+ * This method return the current time
+ * @return the time
+ */
+QTime OTimePicker::time()const {
+ return tm;
+}
+
void OTimePicker::slotHour(bool b) {
@@ -93,4 +109,30 @@ void OTimePicker::slotMinute(bool b) {
}
+/**
+ * Method to set the time. No signal gets emitted during this method call
+ * Minutes must be within 5 minutes step starting at 0 ( 0,5,10,15,20... )
+ * @param t The time to be set
+ */
+void OTimePicker::setTime( const QTime& t) {
+ setTime( t.hour(), t.minute() );
+}
+
+/**
+ * Method to set the time. No signal gets emitted during this method call
+ * @param h The hour
+ * @param m The minute. Minutes need to set by 5 minute steps
+ */
+void OTimePicker::setTime( int h, int m ) {
+ setHour(h);
+ setMinute(m);
+}
+
+/*
+ * FIXME round minutes to the 5 minute arrangement -zecke
+ */
+/**
+ * Method to set the minutes
+ * @param m minutes
+ */
void OTimePicker::setMinute(int m) {
@@ -107,4 +149,7 @@ void OTimePicker::setMinute(int m) {
}
+/**
+ * Method to set the hour
+ */
void OTimePicker::setHour(int h) {
@@ -121,4 +166,11 @@ void OTimePicker::setHour(int h) {
+/**
+ * This is a modal Dialog.
+ *
+ * @param parent The parent widget
+ * @param name The name of the object
+ * @param fl Possible window flags
+ */
OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl )
: OTimePickerDialogBase (parent , name, true , fl)
@@ -134,8 +186,16 @@ OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags
}
-QTime& OTimePickerDialog::time()
+/**
+ * @return the time
+ */
+QTime OTimePickerDialog::time()const
{
return m_time;
}
+
+/**
+ * Set the time to time
+ * @param time The time to be set
+ */
void OTimePickerDialog::setTime( const QTime& time )
{
@@ -158,4 +218,9 @@ void OTimePickerDialog::setTime( const QTime& time )
}
+/**
+ * This method takes the current minute and tries to set hour
+ * to hour. This succeeds if the resulting date is valid
+ * @param hour The hour as a string
+ */
void OTimePickerDialog::setHour ( const QString& hour )
{
@@ -167,4 +232,9 @@ void OTimePickerDialog::setHour ( const QString& hour )
}
+/**
+ * Method to set a new minute. It tries to convert the string to int and
+ * if the resulting date is valid a new date is set.
+ * @see setHour
+ */
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
@@ -10,4 +10,15 @@
#include "otimepickerbase.h"
+/**
+ * A class to pick time. It uses clickable labels
+ * internally to allow a quick selection of a time.
+ * A time can be selected by two clicks of a user
+ *
+ * @short A widget to quickly pick a QTime
+ * @version 1.0
+ * @see QWidget
+ * @see QTime
+ * @author Hakan Ardo, Stefan Eilers
+ */
class OTimePicker: public QWidget {
Q_OBJECT
@@ -16,6 +27,13 @@ class OTimePicker: public QWidget {
OTimePicker(QWidget* parent = 0, const char* name = 0,
WFlags fl = 0);
+
+ public slots:
void setHour(int h);
void setMinute(int m);
+ void setTime( const QTime& );
+ void setTime( int h, int m );
+
+ public:
+ QTime time()const;
private:
@@ -23,4 +41,6 @@ class OTimePicker: public QWidget {
QValueList<OClickableLabel *> minuteLst;
QTime tm;
+ struct Private;
+ Private *d;
private slots:
@@ -29,7 +49,17 @@ class OTimePicker: public QWidget {
signals:
+ /**
+ * gets emitted when the time got changed by the user
+ */
void timeChanged(const QTime &);
};
+/**
+ *
+ * @short
+ * @version 1.0
+ * @author Stefan Eilers
+ */
+
class OTimePickerDialog: public OTimePickerDialogBase {
Q_OBJECT
@@ -39,5 +69,5 @@ class OTimePickerDialog: public OTimePickerDialogBase {
~OTimePickerDialog() { };
- QTime& time();
+ QTime time()const;
public slots:
diff --git a/libopie/owait.cpp b/libopie/owait.cpp
index c90bb72..0fdf08d 100644
--- a/libopie/owait.cpp
+++ b/libopie/owait.cpp
@@ -30,6 +30,16 @@
static int frame = 0;
+/**
+ * This will construct a modal dialog.
+ *
+ * The default timer length is 10.
+ *
+ * @param parent The parent of the widget
+ * @param msg The name of the object
+ * @param dispIcon Display Icon?
+ */
OWait::OWait(QWidget *parent, const char* msg, bool dispIcon )
- :QDialog(parent, QObject::tr("Wait"), TRUE,WStyle_Customize) {
+ :QDialog(parent, msg, TRUE,WStyle_Customize) {
+
QHBoxLayout *hbox = new QHBoxLayout( this );
diff --git a/libopie/owait.h b/libopie/owait.h
index d22e141..6217e31 100644
--- a/libopie/owait.h
+++ b/libopie/owait.h
@@ -30,4 +30,8 @@
/**
* This class displays a animated waiting icon in the middle of the screen.
+ *
+ * @short modal hour glass dialog
+ * @see QDialog
+ * @author Maximilian Reiß
*/
class OWait : public QDialog {
@@ -36,5 +40,5 @@ class OWait : public QDialog {
public:
- OWait(QWidget *parent=0,const char* msg=0,bool dispIcon=TRUE);
+ OWait(QWidget *parent=0,const char* name=0, bool dispIcon=TRUE);
~OWait();
@@ -46,4 +50,5 @@ public:
/**
* Set the time before the icon will be automaticly hidden
+ * The timer will be started once the widget will be shown.
* @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
@@ -4,4 +4,15 @@
+/**
+ * A base class for all Today Config Widgets.
+ * This will let a Today plugin to add the possibility of configuration.
+ * Plugins need to inherit from this class and need to implement
+ * the pure virtual method to control configuration.
+ * The Plugin should read its configuration during creation of the Widget
+ *
+ *
+ * @author Maximilian Reiß
+ * @short base class of all today config widgets
+ */
class TodayConfigWidget : public QWidget {
@@ -9,4 +20,11 @@ class TodayConfigWidget : public QWidget {
public:
+ /**
+ * This will construct the widget. The widget gets deleted once the parent
+ * gets deleted as in any Qt application
+ *
+ * @param parent The parent of the widget
+ * @paran name The name of the object
+ */
TodayConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {} ;
virtual ~TodayConfigWidget() {};
diff --git a/libopie/todayplugininterface.h b/libopie/todayplugininterface.h
index 6ee2a06..29a12bc 100644
--- a/libopie/todayplugininterface.h
+++ b/libopie/todayplugininterface.h
@@ -15,5 +15,10 @@ class QWidget;
/**
*
+ * A TodayPluginObject is the base for all Today Plugins.
+ * A plugin author needs to inherit this class and implement
+ * the pure virtual methods
*
+ * @short base class for today plugins
+ * @author Maximilian Reiss
*
*/
@@ -26,4 +31,5 @@ public:
/**
* The name if the plugin
+ * @return The plugin should return its name here
*/
virtual QString pluginName() const = 0;
@@ -31,14 +37,20 @@ public:
/**
* Version numbering
+ * @return The plugin should return the version number
*/
virtual double versionNumber() const = 0;
+ /**
+ * @return the pixmap name widget?! -- FIXME
+ */
virtual QString pixmapNameWidget() const = 0;
- /** widget for the today view
+ /**
+ * widget for the today view
* It _needs_ a parent here.
+ * Plugin authors need to take parent as parent!
*/
- virtual QWidget* widget( QWidget * ) = 0;
+ virtual QWidget* widget( QWidget *parent ) = 0;
/**
@@ -50,4 +62,5 @@ public:
* Config plugin widget - optional
* If the plugin has a config widget, it _needs_ a parent here.
+ * may return 0 if no config widget is needed
*/
virtual TodayConfigWidget* configWidget( QWidget * ) = 0;
@@ -55,4 +68,6 @@ public:
/**
* The application that should be assigned to the button (pixmap)
+ * Today will show the plugin icon. On click it tries to execute the
+ * plugin related application.
*/
virtual QString appName() const = 0;
@@ -82,5 +97,7 @@ public:
};
-
+/**
+ * This is part of the QCOM works. See example plugins how to do it right
+ */
struct TodayPluginInterface : public QUnknownInterface {
virtual TodayPluginObject *guiPart() = 0;