From ddc141f1e33ccb4c415b4dc6bc1842127db1d78b Mon Sep 17 00:00:00 2001 From: kergoth Date: Tue, 13 May 2003 20:36:48 +0000 Subject: *extremely* minimal tabbed interface. Doesnt install the translations, etc. For testing and development purposes. --- (limited to 'core/apps/taboapp') 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 + +#include +#include +#include +#include +#include + +#include + +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 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 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 ) -- cgit v0.9.0.2