summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-05-13 20:36:48 (UTC)
committer kergoth <kergoth>2003-05-13 20:36:48 (UTC)
commitddc141f1e33ccb4c415b4dc6bc1842127db1d78b (patch) (side-by-side diff)
tree1145775d7c53b80817b508ff864088c48e07961c
parent2c26bb12add88b531ef49f725d0c48f421cb4d83 (diff)
downloadopie-ddc141f1e33ccb4c415b4dc6bc1842127db1d78b.zip
opie-ddc141f1e33ccb4c415b4dc6bc1842127db1d78b.tar.gz
opie-ddc141f1e33ccb4c415b4dc6bc1842127db1d78b.tar.bz2
*extremely* minimal tabbed interface. Doesnt install the translations, etc.
For testing and development purposes.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/taboapp/config.in4
-rw-r--r--core/apps/taboapp/main.cpp42
-rw-r--r--core/apps/taboapp/taboapp.pro17
3 files changed, 63 insertions, 0 deletions
diff --git a/core/apps/taboapp/config.in b/core/apps/taboapp/config.in
new file mode 100644
index 0000000..043ed94
--- a/dev/null
+++ b/core/apps/taboapp/config.in
@@ -0,0 +1,4 @@
+ config TABOAPP
+ boolean "TabOApp"
+ default "n"
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/core/apps/taboapp/main.cpp b/core/apps/taboapp/main.cpp
new file mode 100644
index 0000000..497e29f
--- a/dev/null
+++ b/core/apps/taboapp/main.cpp
@@ -0,0 +1,42 @@
+#include <qdir.h>
+
+#include <qpe/global.h>
+#include <qpe/qpeapplication.h>
+#include <qpe/qlibrary.h>
+#include <oappinterface.h>
+#include <oappplugin.h>
+
+#include <opie/otabwidget.h>
+
+int main( int argc, char **argv )
+{
+ QPEApplication a( argc, argv );
+ int ret = 0;
+
+ OTabWidget *tabwidget = new OTabWidget(0, "tab widget");
+
+ QString path = QPEApplication::qpeDir() + "/plugins/app";
+ QDir dir( path, "lib*.so" );
+
+ QStringList list = dir.entryList();
+ QStringList::Iterator it;
+
+ QInterfacePtr<OAppInterface> iface;
+ for ( it = list.begin(); it != list.end(); ++it ) {
+ QLibrary *lib = new QLibrary( path + "/" + *it );
+
+ qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
+ if ( lib->queryInterface( IID_OAppInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
+ qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
+
+ QList<QWidget> list = iface->widgets();
+
+ QWidget *widget;
+ for ( widget = list.first(); widget != 0; widget = list.next() )
+ tabwidget->addTab(widget, QString(*it), QString(*it));
+ }
+ }
+
+ a.showMainDocumentWidget(tabwidget);
+ return a.exec();
+}
diff --git a/core/apps/taboapp/taboapp.pro b/core/apps/taboapp/taboapp.pro
new file mode 100644
index 0000000..d915921
--- a/dev/null
+++ b/core/apps/taboapp/taboapp.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+CONFIG = qt warn_on release
+DESTDIR = $(OPIEDIR)/bin
+
+SOURCES = main.cpp
+
+INCLUDEPATH += $(OPIEDIR)/include
+DEPENDPATH += $(OPIEDIR)/include .
+TARGET = taboapp
+LIBS += -lqpe -lopie -loapp
+INCLUDEPATH += $(OPIEDIR)/core/apps/oapp
+DEPENDPATH += $(OPIEDIR)/core/apps/oapp
+MOC_DIR = .build
+OBJECTS_DIR = .build
+UI_DIR = .build
+
+include ( $(OPIEDIR)/include.pro )