-rw-r--r-- | example/Example.png | bin | 0 -> 1262 bytes | |||
-rw-r--r-- | example/README | 2 | ||||
-rw-r--r-- | example/example.control | 11 | ||||
-rw-r--r-- | example/example.cpp | 28 | ||||
-rw-r--r-- | example/example.desktop | 6 | ||||
-rw-r--r-- | example/example.h | 17 | ||||
-rw-r--r-- | example/example.pro | 10 | ||||
-rw-r--r-- | example/examplebase.ui | 55 | ||||
-rw-r--r-- | example/main.cpp | 12 |
9 files changed, 141 insertions, 0 deletions
diff --git a/example/Example.png b/example/Example.png new file mode 100644 index 0000000..f63d0bc --- a/dev/null +++ b/example/Example.png | |||
Binary files differ | |||
diff --git a/example/README b/example/README new file mode 100644 index 0000000..98c2c51 --- a/dev/null +++ b/example/README | |||
@@ -0,0 +1,2 @@ | |||
1 | See /opt/Qtopia/doc/html/qtopia/index.html for help. | ||
2 | See doc.trolltech.com for more recent documentation updates. | ||
diff --git a/example/example.control b/example/example.control new file mode 100644 index 0000000..b0f267a --- a/dev/null +++ b/example/example.control | |||
@@ -0,0 +1,11 @@ | |||
1 | Files: bin/example apps/Applications/example.desktop pics/Example.png | ||
2 | Priority: optional | ||
3 | Section: qpe/applications | ||
4 | Maintainer: Warwick Allison <warwick@trolltech.com> | ||
5 | Architecture: arm | ||
6 | Version: 1.0.0 | ||
7 | Depends: qpe-base ($QPE_VERSION) | ||
8 | License: Public Domain | ||
9 | Description: Example program | ||
10 | An example program for the Qtopia environment. | ||
11 | Does nothing interesting. | ||
diff --git a/example/example.cpp b/example/example.cpp new file mode 100644 index 0000000..1e0bbe9 --- a/dev/null +++ b/example/example.cpp | |||
@@ -0,0 +1,28 @@ | |||
1 | #include "example.h" | ||
2 | #include <qpushbutton.h> | ||
3 | |||
4 | /* | ||
5 | * Constructs a Example which is a child of 'parent', with the | ||
6 | * name 'name' and widget flags set to 'f' | ||
7 | */ | ||
8 | Example::Example( QWidget* parent, const char* name, WFlags fl ) | ||
9 | : ExampleBase( parent, name, fl ) | ||
10 | { | ||
11 | connect(quit, SIGNAL(clicked()), this, SLOT(goodBye())); | ||
12 | } | ||
13 | |||
14 | /* | ||
15 | * Destroys the object and frees any allocated resources | ||
16 | */ | ||
17 | Example::~Example() | ||
18 | { | ||
19 | // no need to delete child widgets, Qt does it all for us | ||
20 | } | ||
21 | |||
22 | /* | ||
23 | * A simple slot... not very interesting. | ||
24 | */ | ||
25 | void Example::goodBye() | ||
26 | { | ||
27 | close(); | ||
28 | } | ||
diff --git a/example/example.desktop b/example/example.desktop new file mode 100644 index 0000000..f1e6f06 --- a/dev/null +++ b/example/example.desktop | |||
@@ -0,0 +1,6 @@ | |||
1 | [Desktop Entry] | ||
2 | Comment=An Example Program | ||
3 | Exec=example | ||
4 | Icon=Example | ||
5 | Type=Application | ||
6 | Name=Example | ||
diff --git a/example/example.h b/example/example.h new file mode 100644 index 0000000..24c58c0 --- a/dev/null +++ b/example/example.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef EXAMPLE_H | ||
2 | #define EXAMPLE_H | ||
3 | #include "examplebase.h" | ||
4 | |||
5 | class Example : public ExampleBase | ||
6 | { | ||
7 | Q_OBJECT | ||
8 | |||
9 | public: | ||
10 | Example( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
11 | ~Example(); | ||
12 | |||
13 | private slots: | ||
14 | void goodBye(); | ||
15 | }; | ||
16 | |||
17 | #endif // EXAMPLE_H | ||
diff --git a/example/example.pro b/example/example.pro new file mode 100644 index 0000000..2d89311 --- a/dev/null +++ b/example/example.pro | |||
@@ -0,0 +1,10 @@ | |||
1 | TEMPLATE= app | ||
2 | #CONFIG = qt warn_on debug | ||
3 | CONFIG = qt warn_on release | ||
4 | HEADERS = example.h | ||
5 | SOURCES = main.cpp example.cpp | ||
6 | INCLUDEPATH+= $(QPEDIR)/include | ||
7 | DEPENDPATH+= $(QPEDIR)/include | ||
8 | LIBS += -lqpe | ||
9 | INTERFACES= examplebase.ui | ||
10 | TARGET = example | ||
diff --git a/example/examplebase.ui b/example/examplebase.ui new file mode 100644 index 0000000..b47d20c --- a/dev/null +++ b/example/examplebase.ui | |||
@@ -0,0 +1,55 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>ExampleBase</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>ExampleBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>196</width> | ||
15 | <height>245</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Example</string> | ||
21 | </property> | ||
22 | <vbox> | ||
23 | <property stdset="1"> | ||
24 | <name>margin</name> | ||
25 | <number>11</number> | ||
26 | </property> | ||
27 | <property stdset="1"> | ||
28 | <name>spacing</name> | ||
29 | <number>6</number> | ||
30 | </property> | ||
31 | <widget> | ||
32 | <class>QLabel</class> | ||
33 | <property stdset="1"> | ||
34 | <name>name</name> | ||
35 | <cstring>TextLabel1</cstring> | ||
36 | </property> | ||
37 | <property stdset="1"> | ||
38 | <name>text</name> | ||
39 | <string><p>This is just an <i>example</i>. It doesn't do anything interesting at all.</string> | ||
40 | </property> | ||
41 | </widget> | ||
42 | <widget> | ||
43 | <class>QPushButton</class> | ||
44 | <property stdset="1"> | ||
45 | <name>name</name> | ||
46 | <cstring>quit</cstring> | ||
47 | </property> | ||
48 | <property stdset="1"> | ||
49 | <name>text</name> | ||
50 | <string>Quit</string> | ||
51 | </property> | ||
52 | </widget> | ||
53 | </vbox> | ||
54 | </widget> | ||
55 | </UI> | ||
diff --git a/example/main.cpp b/example/main.cpp new file mode 100644 index 0000000..b705c44 --- a/dev/null +++ b/example/main.cpp | |||
@@ -0,0 +1,12 @@ | |||
1 | #include "example.h" | ||
2 | #include <qpe/qpeapplication.h> | ||
3 | |||
4 | int main( int argc, char ** argv ) | ||
5 | { | ||
6 | QPEApplication a( argc, argv ); | ||
7 | |||
8 | Example mw; | ||
9 | a.showMainWidget( &mw ); | ||
10 | |||
11 | return a.exec(); | ||
12 | } | ||