From dfb9c76738bb68e235114c5ad43dbd26a59b98ab Mon Sep 17 00:00:00 2001 From: kergoth Date: Thu, 06 Jun 2002 23:31:00 +0000 Subject: Initial revision --- (limited to 'examples/application') diff --git a/examples/application/Example.png b/examples/application/Example.png new file mode 100644 index 0000000..f63d0bc --- a/dev/null +++ b/examples/application/Example.png Binary files differ diff --git a/examples/application/README b/examples/application/README new file mode 100644 index 0000000..63986f4 --- a/dev/null +++ b/examples/application/README @@ -0,0 +1,2 @@ +See /opt/Qtopia/doc/index.html for help. +See doc.trolltech.com for more recent documentation updates. diff --git a/examples/application/example.control b/examples/application/example.control new file mode 100644 index 0000000..e79c6f6 --- a/dev/null +++ b/examples/application/example.control @@ -0,0 +1,11 @@ +Files: bin/example apps/Applications/example.desktop pics/Example.png help/html/example.html +Priority: optional +Section: qpe/applications +Maintainer: Your Name +Architecture: arm +Version: 1.0.0 +Depends: qpe-base ($QPE_VERSION) +License: Public Domain +Description: Example program + An example program for the Qtopia environment. + Does nothing interesting. diff --git a/examples/application/example.cpp b/examples/application/example.cpp new file mode 100644 index 0000000..1e0bbe9 --- a/dev/null +++ b/examples/application/example.cpp @@ -0,0 +1,28 @@ +#include "example.h" +#include + +/* + * Constructs a Example which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +Example::Example( QWidget* parent, const char* name, WFlags fl ) + : ExampleBase( parent, name, fl ) +{ + connect(quit, SIGNAL(clicked()), this, SLOT(goodBye())); +} + +/* + * Destroys the object and frees any allocated resources + */ +Example::~Example() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * A simple slot... not very interesting. + */ +void Example::goodBye() +{ + close(); +} diff --git a/examples/application/example.desktop b/examples/application/example.desktop new file mode 100644 index 0000000..f1e6f06 --- a/dev/null +++ b/examples/application/example.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Comment=An Example Program +Exec=example +Icon=Example +Type=Application +Name=Example diff --git a/examples/application/example.h b/examples/application/example.h new file mode 100644 index 0000000..24c58c0 --- a/dev/null +++ b/examples/application/example.h @@ -0,0 +1,17 @@ +#ifndef EXAMPLE_H +#define EXAMPLE_H +#include "examplebase.h" + +class Example : public ExampleBase +{ + Q_OBJECT + +public: + Example( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~Example(); + +private slots: + void goodBye(); +}; + +#endif // EXAMPLE_H diff --git a/examples/application/example.html b/examples/application/example.html new file mode 100644 index 0000000..9163573 --- a/dev/null +++ b/examples/application/example.html @@ -0,0 +1,15 @@ + +

Example

+ +

This is the help for the Example program. + +

To user this application: + +

    +
  1. Press the icon in the Qtopia launcher. +
  2. Read the label. +
  3. Press the button. +
  4. Read the source code provided. +
+ +Now you know how to make a Qtopia application! diff --git a/examples/application/example.pro b/examples/application/example.pro new file mode 100644 index 0000000..2d89311 --- a/dev/null +++ b/examples/application/example.pro @@ -0,0 +1,10 @@ +TEMPLATE = app +#CONFIG = qt warn_on debug +CONFIG = qt warn_on release +HEADERS = example.h +SOURCES = main.cpp example.cpp +INCLUDEPATH += $(QPEDIR)/include +DEPENDPATH += $(QPEDIR)/include +LIBS += -lqpe +INTERFACES = examplebase.ui +TARGET = example diff --git a/examples/application/examplebase.ui b/examples/application/examplebase.ui new file mode 100644 index 0000000..b47d20c --- a/dev/null +++ b/examples/application/examplebase.ui @@ -0,0 +1,55 @@ + +ExampleBase + + QWidget + + name + ExampleBase + + + geometry + + 0 + 0 + 196 + 245 + + + + caption + Example + + + + margin + 11 + + + spacing + 6 + + + QLabel + + name + TextLabel1 + + + text + <p>This is just an <i>example</i>. It doesn't do anything interesting at all. + + + + QPushButton + + name + quit + + + text + Quit + + + + + diff --git a/examples/application/index.html b/examples/application/index.html new file mode 100644 index 0000000..ad97378 --- a/dev/null +++ b/examples/application/index.html @@ -0,0 +1,23 @@ +

Welcome to the
Qtopia SDK

+ +

API Documentation

+

+For API documentation, point a web browser at +/opt/Qtopia/doc/html/qtopia/index.html + +

Application Documentation

+Put English documentation for applications in: + +

+   $QPEDIR/help/html/appname.html + +

+Put non-English documentation for applications in: + +

+   $QPEDIR/help/lang/html/appname.html + +

+Where lang is the language specifier (eg. "de" for German), +and appname is the program name of your application. + diff --git a/examples/application/main.cpp b/examples/application/main.cpp new file mode 100644 index 0000000..b705c44 --- a/dev/null +++ b/examples/application/main.cpp @@ -0,0 +1,12 @@ +#include "example.h" +#include + +int main( int argc, char ** argv ) +{ + QPEApplication a( argc, argv ); + + Example mw; + a.showMainWidget( &mw ); + + return a.exec(); +} -- cgit v0.9.0.2