author | zecke <zecke> | 2003-08-30 20:23:05 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-08-30 20:23:05 (UTC) |
commit | 4c3a1de5289631db05b86a07092f0a334608dcf6 (patch) (side-by-side diff) | |
tree | 90caf9b05312013006dad0af7f039ed1c595842d /examples/simple-icon/simple.h | |
parent | cc1e68e0b6e0677e0523382daeb12d60ba0b67c9 (diff) | |
download | opie-4c3a1de5289631db05b86a07092f0a334608dcf6.zip opie-4c3a1de5289631db05b86a07092f0a334608dcf6.tar.gz opie-4c3a1de5289631db05b86a07092f0a334608dcf6.tar.bz2 |
Add four examples
#1 simple widget + OApplicationFactory + qmake usage explained
#2 simple icons + usage of Resource and playing of sounds
#3 simple main + Toolbar + MenuBar IconSets and QActions explained
#4 main tab + Usage of OTabWidget and QSignals with parameters disconnect and connect
TODO
#5 PIM loading and viewing
#6 PIM qcop + usage of QCOP
BuildSystem integration
Diffstat (limited to 'examples/simple-icon/simple.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | examples/simple-icon/simple.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/examples/simple-icon/simple.h b/examples/simple-icon/simple.h new file mode 100644 index 0000000..00965cd --- a/dev/null +++ b/examples/simple-icon/simple.h @@ -0,0 +1,58 @@ + +/* + * A Simple widget with a button to quit + * and Pixmaps and Sound + */ + +/* + * The below sequence is called a guard and guards + * against multiple inclusion of header files + */ +#ifndef QUIET_SIMPLE_DEMO_H +#define QUIET_SIMPLE_DEMO_H + + + + +#include <qwidget.h> // from this class we will inherit + +class QPushButton; // forward declaration to not include the header. This can save time when compiling + + +/* + * Simple inherits from QWidget + * Remeber each example is based on the other + */ +class Simple : public QWidget { + Q_OBJECT +public: + /* + * C'tor for the Simple + * make sure to always have these three when you use + * the quicklaunch factory ( explained in the implementation ) + */ + Simple( QWidget* parent = 0, const char * name = 0, WFlags fl = 0 ); + ~Simple(); + + /* + * appName is used by the Application factory. + * make sure the name matches the one of the executable + */ + static QString appName() { return QString::fromLatin1("simple-icon"); } + + /* + * use private slots: to mark your slots as such + * A slot can also be called as a normal method + */ +private slots: + void slotQuit(); + +private: + /* my variable */ + QPushButton* m_button; +}; + + + + +#endif |