-rw-r--r-- | noncore/apps/odict/main.cpp | 11 | ||||
-rw-r--r-- | noncore/apps/odict/odict.cpp | 34 | ||||
-rw-r--r-- | noncore/apps/odict/odict.h | 4 | ||||
-rw-r--r-- | noncore/apps/odict/odict.pro | 5 |
4 files changed, 23 insertions, 31 deletions
diff --git a/noncore/apps/odict/main.cpp b/noncore/apps/odict/main.cpp index c68253f..0642022 100644 --- a/noncore/apps/odict/main.cpp +++ b/noncore/apps/odict/main.cpp @@ -19,11 +19,6 @@ #include <qpe/qpeapplication.h> +#include <opie/oapplicationfactory.h> #include "odict.h" -int main(int argc, char **argv) -{ - QPEApplication app(argc, argv); - ODict *odict= new ODict(); - app.setMainWidget(odict); - odict->showMaximized(); - return app.exec(); -} + +OPIE_EXPORT_APP( OApplicationFactory<ODict> ) diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 010545e..9718c5c 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp @@ -38,6 +38,6 @@ -ODict::ODict() : QMainWindow() +ODict::ODict(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, fl ) { activated_name = QString::null; - + vbox = new QVBox( this ); @@ -47,3 +47,3 @@ ODict::ODict() : QMainWindow() QHBox *hbox = new QHBox( vbox ); - QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); + QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); @@ -54,3 +54,3 @@ ODict::ODict() : QMainWindow() connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); - + top_name = new QLabel( vbox ); @@ -74,3 +74,3 @@ void ODict::loadConfig() QString lastname; - + Config cfg ( "odict" ); @@ -81,3 +81,3 @@ void ODict::loadConfig() int i = 0, e = 0; - + QStringList groupListCfg = cfg.groupList().grep( "Method_" ); @@ -119,4 +119,4 @@ void ODict::lookupLanguageNames( QString dictname ) cfg.setGroup( "Method_"+dictname ); - top_name_content = cfg.readEntry( "Lang1" ); - bottom_name_content = cfg.readEntry( "Lang2" ); + top_name_content = cfg.readEntry( "Lang1" ); + bottom_name_content = cfg.readEntry( "Lang2" ); } @@ -143,3 +143,3 @@ void ODict::slotStartQuery() tr( "No dictionary defined" ), - tr( "&Define one" ), + tr( "&Define one" ), tr( "&Cancel" ), @@ -147,3 +147,3 @@ void ODict::slotStartQuery() 1 ) ) // Cancel choosen - { + { case 0: @@ -154,3 +154,3 @@ void ODict::slotStartQuery() } - } + } @@ -159,3 +159,3 @@ void ODict::slotStartQuery() */ - ding->setCaseSensitive( casesens ); + ding->setCaseSensitive( casesens ); @@ -191,3 +191,3 @@ void ODict::slotMethodChanged( const QString& methodnumber ) activated_name = methodnumber; - + if ( activated_name != ding->loadedDict() ) @@ -195,3 +195,3 @@ void ODict::slotMethodChanged( const QString& methodnumber ) ding->loadDict(activated_name); - + lookupLanguageNames( activated_name ); @@ -205,3 +205,3 @@ void ODict::setupMenus() menu = new QMenuBar( this ); - + settings = new QPopupMenu( menu ); @@ -211,3 +211,3 @@ void ODict::setupMenus() setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 ); - + parameter = new QPopupMenu( menu ); @@ -216,3 +216,3 @@ void ODict::setupMenus() parameter->insertSeparator(); - + menu->insertItem( tr( "Settings" ) , settings ); diff --git a/noncore/apps/odict/odict.h b/noncore/apps/odict/odict.h index be2a532..68a8f95 100644 --- a/noncore/apps/odict/odict.h +++ b/noncore/apps/odict/odict.h @@ -31,3 +31,3 @@ class ODict : public QMainWindow public: - ODict(); + ODict(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); QVBox *vbox; @@ -36,3 +36,3 @@ class ODict : public QMainWindow DingWidget *ding; - + static QString appName() { return QString::fromLatin1("odict"); } private: diff --git a/noncore/apps/odict/odict.pro b/noncore/apps/odict/odict.pro index 82f6a41..4ad287b 100644 --- a/noncore/apps/odict/odict.pro +++ b/noncore/apps/odict/odict.pro @@ -1,4 +1,2 @@ -TEMPLATE = app -CONFIG = qt warn_on debug -#CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = odict.h \ @@ -17,3 +15,2 @@ LIBS += -lqpe -lstdc++ -lopie TARGET = odict -DESTDIR = $(OPIEDIR)/bin |