summaryrefslogtreecommitdiff
path: root/examples/simple-icon/simple.h
authorzecke <zecke>2003-08-30 20:23:05 (UTC)
committer zecke <zecke>2003-08-30 20:23:05 (UTC)
commit4c3a1de5289631db05b86a07092f0a334608dcf6 (patch) (unidiff)
tree90caf9b05312013006dad0af7f039ed1c595842d /examples/simple-icon/simple.h
parentcc1e68e0b6e0677e0523382daeb12d60ba0b67c9 (diff)
downloadopie-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.h58
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 @@
1
2/*
3 * A Simple widget with a button to quit
4 * and Pixmaps and Sound
5 */
6
7/*
8 * The below sequence is called a guard and guards
9 * against multiple inclusion of header files
10 */
11#ifndef QUIET_SIMPLE_DEMO_H
12#define QUIET_SIMPLE_DEMO_H
13
14
15
16
17#include <qwidget.h> // from this class we will inherit
18
19class QPushButton; // forward declaration to not include the header. This can save time when compiling
20
21
22/*
23 * Simple inherits from QWidget
24 * Remeber each example is based on the other
25 */
26class Simple : public QWidget {
27 Q_OBJECT
28public:
29 /*
30 * C'tor for the Simple
31 * make sure to always have these three when you use
32 * the quicklaunch factory ( explained in the implementation )
33 */
34 Simple( QWidget* parent = 0, const char * name = 0, WFlags fl = 0 );
35 ~Simple();
36
37 /*
38 * appName is used by the Application factory.
39 * make sure the name matches the one of the executable
40 */
41 static QString appName() { return QString::fromLatin1("simple-icon"); }
42
43 /*
44 * use private slots: to mark your slots as such
45 * A slot can also be called as a normal method
46 */
47private slots:
48 void slotQuit();
49
50private:
51 /* my variable */
52 QPushButton* m_button;
53};
54
55
56
57
58#endif