summaryrefslogtreecommitdiff
path: root/core/apps/taboapp
authormickeyl <mickeyl>2004-04-05 13:30:36 (UTC)
committer mickeyl <mickeyl>2004-04-05 13:30:36 (UTC)
commit743adf3ed3032feb15e71002613a4643d059aa09 (patch) (side-by-side diff)
treeda8c0549515f694775a1cd169cdc5abe615a3847 /core/apps/taboapp
parentb136b4d55c810c35c54b18b435aa4172b7f6b9fe (diff)
downloadopie-743adf3ed3032feb15e71002613a4643d059aa09.zip
opie-743adf3ed3032feb15e71002613a4643d059aa09.tar.gz
opie-743adf3ed3032feb15e71002613a4643d059aa09.tar.bz2
convert helpbrowser, taboapp and textedit to Opie debugging framework
qcop and embeddedkonsole needs more work. the diagnostics part uses printf
Diffstat (limited to 'core/apps/taboapp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/taboapp/main.cpp48
1 files changed, 26 insertions, 22 deletions
diff --git a/core/apps/taboapp/main.cpp b/core/apps/taboapp/main.cpp
index e46c71f..e43f118 100644
--- a/core/apps/taboapp/main.cpp
+++ b/core/apps/taboapp/main.cpp
@@ -1,17 +1,21 @@
-#include <qdir.h>
-
-#include <qpe/qpeapplication.h>
-#include <qpe/qlibrary.h>
+/* OPIE */
#include <oappinterface.h>
#include <oappplugin.h>
-
+#include <opie2/odebug.h>
#include <opie2/otabwidget.h>
+#include <qpe/qpeapplication.h>
+#include <qpe/qlibrary.h>
+using namespace Opie::Core;
+using namespace Opie::Ui;
+
+/* QT */
+#include <qdir.h>
int main( int argc, char **argv )
{
QPEApplication a( argc, argv );
- Opie::Ui::OTabWidget *tabwidget = new Opie::Ui::OTabWidget(0, "tab widget");
+ OTabWidget *tabwidget = new OTabWidget(0, "tab widget");
QString path = QPEApplication::qpeDir() + "/plugins/app";
QDir dir( path, "lib*.so" );
@@ -23,29 +27,29 @@ int main( int argc, char **argv )
for ( it = list.begin(); it != list.end(); ++it ) {
QLibrary *lib = new QLibrary( path + "/" + *it );
- qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
+ odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl;
if ( lib->queryInterface( IID_OAppInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
- qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
+ odebug << "accepted: " << QString( path + "/" + *it ) << "" << oendl;
- QList<QWidget> list = iface->widgets();
+ QList<QWidget> list = iface->widgets();
QWidget *widget;
for ( widget = list.first(); widget != 0; widget = list.next() )
tabwidget->addTab(widget, QString(*it), QString(*it));
QString lang = getenv( "LANG" );
- if (lang.isNull())
- lang = "en";
- QTranslator *trans = new QTranslator(qApp);
- QString type = (*it).left( (*it).find(".") );
- if (type.left(3) == "lib")
- type = type.mid(3);
- type = type.right( type.find("lib") );
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
- if ( trans->load( tfn ))
- qApp->installTranslator( trans );
- else
- delete trans;
- }
+ if (lang.isNull())
+ lang = "en";
+ QTranslator *trans = new QTranslator(qApp);
+ QString type = (*it).left( (*it).find(".") );
+ if (type.left(3) == "lib")
+ type = type.mid(3);
+ type = type.right( type.find("lib") );
+ QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ if ( trans->load( tfn ))
+ qApp->installTranslator( trans );
+ else
+ delete trans;
+ }
}
a.showMainDocumentWidget(tabwidget);