author | zecke <zecke> | 2003-09-01 09:42:06 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-09-01 09:42:06 (UTC) |
commit | 45a479040238764f97eed267c74aed6cf27eece8 (patch) (unidiff) | |
tree | d589b1a89a2f6f9862822c03235630e987f9bcb6 /libopie/big-screen/example | |
parent | 143807c9d438ee6f07e92e6009ec5633088c34f4 (diff) | |
download | opie-45a479040238764f97eed267c74aed6cf27eece8.zip opie-45a479040238764f97eed267c74aed6cf27eece8.tar.gz opie-45a479040238764f97eed267c74aed6cf27eece8.tar.bz2 |
OSplitter the first BigScreen Extension widget is done
with a small example
-rw-r--r-- | libopie/big-screen/example/osplitter_example.cpp | 28 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_example.h | 20 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_example.o | bin | 0 -> 17276 bytes | |||
-rw-r--r-- | libopie/big-screen/example/osplitter_example.pro | 13 |
4 files changed, 61 insertions, 0 deletions
diff --git a/libopie/big-screen/example/osplitter_example.cpp b/libopie/big-screen/example/osplitter_example.cpp new file mode 100644 index 0000000..e337379 --- a/dev/null +++ b/libopie/big-screen/example/osplitter_example.cpp | |||
@@ -0,0 +1,28 @@ | |||
1 | #include <qdir.h> | ||
2 | #include <qlayout.h> | ||
3 | |||
4 | #include "../osplitter.h" | ||
5 | |||
6 | #include <qpe/qpeapplication.h> | ||
7 | #include <opie/oapplicationfactory.h> | ||
8 | |||
9 | #include "osplitter_example.h" | ||
10 | |||
11 | OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) | ||
12 | |||
13 | OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) | ||
14 | : QWidget( w, n, f ){ | ||
15 | QVBoxLayout * lay = new QVBoxLayout(this); | ||
16 | OSplitter * splitter = new OSplitter( Horizontal, this ); | ||
17 | lay->addWidget( splitter ); | ||
18 | |||
19 | OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector, | ||
20 | OFileSelector::Normal, QDir::homeDirPath(), | ||
21 | QString::null ); | ||
22 | splitter->addWidget( selector, "zoom", tr("Selector 1") ); | ||
23 | |||
24 | selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal, | ||
25 | QDir::homeDirPath(), QString::null ); | ||
26 | splitter->addWidget( selector, "zoom", tr("Selector 2") ); | ||
27 | |||
28 | } | ||
diff --git a/libopie/big-screen/example/osplitter_example.h b/libopie/big-screen/example/osplitter_example.h new file mode 100644 index 0000000..ae8f120 --- a/dev/null +++ b/libopie/big-screen/example/osplitter_example.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * May be used, copied and modified wihtout any limitation | ||
3 | */ | ||
4 | |||
5 | #ifndef OSPlitter_EXAMPLE_H | ||
6 | #define OSPlitter_EXAMPLE_H | ||
7 | |||
8 | #include <qvbox.h> | ||
9 | #include <opie/ofileselector.h> | ||
10 | |||
11 | class OSplitterExample : public QWidget { | ||
12 | Q_OBJECT | ||
13 | public: | ||
14 | static QString appName() { return QString::fromLatin1("osplitter_example"); } | ||
15 | OSplitterExample( QWidget *parent, const char* name, WFlags fl ); | ||
16 | |||
17 | }; | ||
18 | |||
19 | |||
20 | #endif | ||
diff --git a/libopie/big-screen/example/osplitter_example.o b/libopie/big-screen/example/osplitter_example.o new file mode 100644 index 0000000..e52d5d9 --- a/dev/null +++ b/libopie/big-screen/example/osplitter_example.o | |||
Binary files differ | |||
diff --git a/libopie/big-screen/example/osplitter_example.pro b/libopie/big-screen/example/osplitter_example.pro new file mode 100644 index 0000000..b12bf17 --- a/dev/null +++ b/libopie/big-screen/example/osplitter_example.pro | |||
@@ -0,0 +1,13 @@ | |||
1 | CONFIG = qt warn_on | ||
2 | TEMPLATE = app | ||
3 | TARGET = osplitter_example | ||
4 | |||
5 | HEADERS = osplitter_example.h ../osplitter.h | ||
6 | SOURCES = osplitter_example.cpp ../osplitter.cpp | ||
7 | |||
8 | INCLUDEPATH += $(OPIEDIR)/include ../ | ||
9 | DEPENDSPATH += $(OPIEDIR)/include | ||
10 | |||
11 | LIBS += -lqpe -lopie | ||
12 | |||
13 | include ( $(OPIEDIR)/include.pro ) \ No newline at end of file | ||