-rw-r--r-- | noncore/tools/calculator/calculator.pro | 4 | ||||
-rw-r--r-- | noncore/tools/calculator/calculatorimpl.cpp | 56 | ||||
-rw-r--r-- | noncore/tools/calculator/calculatorimpl.h | 4 | ||||
-rw-r--r-- | noncore/tools/calculator/main.cpp | 13 | ||||
-rw-r--r-- | noncore/tools/clock/clock.h | 3 | ||||
-rw-r--r-- | noncore/tools/clock/clock.pro | 5 | ||||
-rw-r--r-- | noncore/tools/clock/main.cpp | 11 | ||||
-rw-r--r-- | noncore/tools/euroconv/euroconv.pro | 5 | ||||
-rw-r--r-- | noncore/tools/euroconv/main.cpp | 30 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.h | 3 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.pro | 4 | ||||
-rw-r--r-- | noncore/tools/formatter/main.cpp | 10 | ||||
-rw-r--r-- | noncore/tools/opie-sh/opie-sh.control | 2 | ||||
-rw-r--r-- | noncore/tools/remote/opie-remote.control | 2 |
15 files changed, 90 insertions, 64 deletions
diff --git a/noncore/tools/calculator/calculator.pro b/noncore/tools/calculator/calculator.pro index 0fe5bb2..8a5fcfe 100644 --- a/noncore/tools/calculator/calculator.pro +++ b/noncore/tools/calculator/calculator.pro @@ -1,6 +1,4 @@ -DESTDIR = $(OPIEDIR)/bin -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = calculatorimpl.h SOURCES = calculatorimpl.cpp \ main.cpp diff --git a/noncore/tools/calculator/calculatorimpl.cpp b/noncore/tools/calculator/calculatorimpl.cpp index 8d11132..163b4da 100644 --- a/noncore/tools/calculator/calculatorimpl.cpp +++ b/noncore/tools/calculator/calculatorimpl.cpp @@ -118,6 +118,58 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, current_mode = max_mode = conversion_mode_count = 0; last_conversion = -1; + // translation trick mode - with this stuff parsed in from a file is translatable + QObject::tr("Standard"); + QObject::tr("Weight"); + QObject::tr("Distance"); + QObject::tr("Area"); + QObject::tr("Temperatures"); + QObject::tr("Volume"); + QObject::tr("acres"); + QObject::tr("°C"); + QObject::tr("carats"); + QObject::tr("cm"); + QObject::tr("cu cm"); + QObject::tr("cu ft"); + QObject::tr("cu in"); + QObject::tr("°F"); + QObject::tr("fl oz (US)"); + QObject::tr("ft"); + QObject::tr("g"); + QObject::tr("gal (US)"); + QObject::tr("hectares"); + QObject::tr("in"); + QObject::tr("kg"); + QObject::tr("km"); + QObject::tr("l"); + QObject::tr("lb"); + QObject::tr("Lg tons"); + QObject::tr("m"); + QObject::tr("mg"); + QObject::tr("mi"); + QObject::tr("ml"); + QObject::tr("mm"); + QObject::tr("naut. mi"); + QObject::tr("oz"); + QObject::tr("points"); + QObject::tr("pt"); + QObject::tr("qt"); + QObject::tr("sq cm"); + QObject::tr("sq ft"); + QObject::tr("sq in"); + QObject::tr("sq km"); + QObject::tr("sq m"); + QObject::tr("sq mi"); + QObject::tr("sq mm"); + QObject::tr("sq yd"); + QObject::tr("st"); + QObject::tr("St tons"); + QObject::tr("tblspoon"); + QObject::tr("teaspoons"); + QObject::tr("tonnes"); + QObject::tr("yd"); + + //bgr_command.insert( PushButtonFunction); bgr_command.insert( PushButtonMPlus); bgr_command.insert( PushButtonMR); @@ -208,12 +260,12 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, while ( ! ts2.eof() ) { line = ts2.readLine(); if ( line.contains("STARTTYPE") ) { - captions << line.remove(0,10); + captions << tr( line.remove(0,10) ); ComboBoxFunction->insertItem(captions.last()); while ( !line.contains("ENDTYPE") ) { line = ts2.readLine(); if ( line.contains("NAME") ) { - faces << line.remove(0,5); + faces << tr( line.remove(0,5) ); line2 = ts2.readLine(); line2.remove(0,6); entry_list[x] = line2.toDouble(); diff --git a/noncore/tools/calculator/calculatorimpl.h b/noncore/tools/calculator/calculatorimpl.h index f0180c9..06ec829 100644 --- a/noncore/tools/calculator/calculatorimpl.h +++ b/noncore/tools/calculator/calculatorimpl.h @@ -73,7 +73,9 @@ class CalculatorImpl : public Calculator public: CalculatorImpl( QWidget * parent = 0, const char * name = 0, - WFlags f = 0 ); + WFlags f = 0 ); + static QString appName() { return QString::fromLatin1("calculator"); } + public slots: void command_buttons(int); diff --git a/noncore/tools/calculator/main.cpp b/noncore/tools/calculator/main.cpp index 74cd5d3..c4d00b1 100644 --- a/noncore/tools/calculator/main.cpp +++ b/noncore/tools/calculator/main.cpp @@ -21,15 +21,6 @@ #include "calculatorimpl.h" #include <qpe/qpeapplication.h> +#include <opie/oapplicationfactory.h> -int main( int argc, char ** argv ) -{ - QPEApplication a( argc, argv ); - - CalculatorImpl mw; - QPEApplication::setInputMethodHint( &mw, QPEApplication::AlwaysOff ); - mw.setCaption( CalculatorImpl::tr("Calculator") ); - a.showMainWidget( &mw ); - - return a.exec(); -} +OPIE_EXPORT_APP( OApplicationFactory<CalculatorImpl> ) diff --git a/noncore/tools/clock/clock.h b/noncore/tools/clock/clock.h index fa12b61..00d097d 100644 --- a/noncore/tools/clock/clock.h +++ b/noncore/tools/clock/clock.h @@ -42,6 +42,7 @@ public: void display( const QTime& time ); + protected: void drawContents( QPainter *p ); @@ -67,6 +68,8 @@ public: QDateTime when; bool bSound; int hour, minute, snoozeTime; + static QString appName() { return QString::fromLatin1("clock"); } + private slots: void slotSet(); void slotReset(); diff --git a/noncore/tools/clock/clock.pro b/noncore/tools/clock/clock.pro index 38ce2f8..9890b3a 100644 --- a/noncore/tools/clock/clock.pro +++ b/noncore/tools/clock/clock.pro @@ -1,13 +1,10 @@ -TEMPLATE = app -CONFIG = qt warn_on release -DESTDIR = $(OPIEDIR)/bin +CONFIG = qt warn_on release quick-app HEADERS = clock.h setAlarm.h SOURCES = clock.cpp setAlarm.cpp \ main.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopie -lpthread -INTERFACES = TARGET = clock TRANSLATIONS = ../../../i18n/de/clock.ts \ diff --git a/noncore/tools/clock/main.cpp b/noncore/tools/clock/main.cpp index cbfb73b..4a5e523 100644 --- a/noncore/tools/clock/main.cpp +++ b/noncore/tools/clock/main.cpp @@ -21,14 +21,7 @@ #include "clock.h" #include <qpe/qpeapplication.h> +#include <opie/oapplicationfactory.h> -int main( int argc, char ** argv ) -{ - QPEApplication a( argc, argv ); - Clock mw; - mw.setCaption( Clock::tr("Clock") ); - a.showMainWidget( &mw ); - - return a.exec(); -} +OPIE_EXPORT_APP( OApplicationFactory<Clock> ) diff --git a/noncore/tools/euroconv/euroconv.pro b/noncore/tools/euroconv/euroconv.pro index d817dd3..2b732da 100644 --- a/noncore/tools/euroconv/euroconv.pro +++ b/noncore/tools/euroconv/euroconv.pro @@ -1,5 +1,4 @@ -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = calcdisplay.h \ calckeypad.h SOURCES = calcdisplay.cpp \ @@ -8,7 +7,7 @@ SOURCES = calcdisplay.cpp \ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopie -DESTDIR = $(OPIEDIR)/bin INTERFACES = TARGET = euroconv + include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/tools/euroconv/main.cpp b/noncore/tools/euroconv/main.cpp index 7d69535..b765a5e 100644 --- a/noncore/tools/euroconv/main.cpp +++ b/noncore/tools/euroconv/main.cpp @@ -9,31 +9,29 @@ * * Requirements: Qt * - * $Id$ * ***************************************************************************/ #include <qpe/qpeapplication.h> #include <qvbox.h> -//#include <qapplication.h> #include "calcdisplay.h" #include "calckeypad.h" +#include <opie/oapplicationfactory.h> - -int main( int argc, char **argv ) { - - QPEApplication app( argc, argv ); - - QVBox *layout = new QVBox(0, "fond"); +struct Layout : QVBox{ + static QString appName() { return QString::fromLatin1("euroconv"); } + Layout(QWidget *p, const char* n, WFlags) + :QVBox(0,"fond" ) + { + LCDDisplay *lcd = new LCDDisplay(this, "lcd"); + KeyPad *num = new KeyPad(lcd, this, "keypad"); - LCDDisplay lcd (layout, "lcd"); - KeyPad num(&lcd, layout, "keypad"); - app.setMainWidget(layout); - layout->setCaption( QObject::tr("Euroconv") ); - layout->showMaximized (); - layout->show(); - return app.exec(); -} + setCaption( QObject::tr("Euroconv") ); + }; + +}; + +OPIE_EXPORT_APP( OApplicationFactory<Layout> ) diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index 49f6355..a8dd11c 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp @@ -54,7 +54,7 @@ /* Blah blah blah blah */ -FormatterApp::FormatterApp( QWidget* parent, const char* name, bool , WFlags fl ) +FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool modal ) : QMainWindow( parent, name, fl ) // : QDialog( parent, name, modal, fl ) { diff --git a/noncore/tools/formatter/formatter.h b/noncore/tools/formatter/formatter.h index 960a68a..faf0b30 100644 --- a/noncore/tools/formatter/formatter.h +++ b/noncore/tools/formatter/formatter.h @@ -30,7 +30,8 @@ class FormatterApp : public QMainWindow Q_OBJECT public: - FormatterApp( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + static QString appName() { return QString::fromLatin1("formatter"); } + FormatterApp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0, bool modal = FALSE ); ~FormatterApp(); QTabWidget *TabWidget; diff --git a/noncore/tools/formatter/formatter.pro b/noncore/tools/formatter/formatter.pro index baf6ace..17aab57 100644 --- a/noncore/tools/formatter/formatter.pro +++ b/noncore/tools/formatter/formatter.pro @@ -1,9 +1,7 @@ -TEMPLATE = app -CONFIG += qt warn_on release +CONFIG += qt warn_on release quick-app HEADERS = formatter.h inputDialog.h output.h SOURCES = formatter.cpp inputDialog.cpp output.cpp main.cpp TARGET = formatter -DESTDIR = $(OPIEDIR)/bin INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe diff --git a/noncore/tools/formatter/main.cpp b/noncore/tools/formatter/main.cpp index f67c9f2..6228e55 100644 --- a/noncore/tools/formatter/main.cpp +++ b/noncore/tools/formatter/main.cpp @@ -14,12 +14,6 @@ #include "formatter.h" -int main(int argc, char *argv[]) -{ - QPEApplication a(argc, argv); - - FormatterApp formatterApp; - a.showMainWidget( &formatterApp); - return a.exec(); -} +#include <opie/oapplicationfactory.h> +OPIE_EXPORT_APP( OApplicationFactory<FormatterApp> ) diff --git a/noncore/tools/opie-sh/opie-sh.control b/noncore/tools/opie-sh/opie-sh.control index a5619ce..f03e5ac 100644 --- a/noncore/tools/opie-sh/opie-sh.control +++ b/noncore/tools/opie-sh/opie-sh.control @@ -1,5 +1,5 @@ Package: opie-sh -Files: plugins/application/libopie-sh.so* bin/opie-sh bin/opie-sh-howto.sh apps/Opie-SH/opie-sh.desktop pics/opie-sh/*.png help/opie-sh/*.html +Files: bin/opie-sh apps/Opie-SH/opie-sh.desktop pics/opie-sh/*.png help/opie-sh/*.html Priority: optional Section: opie/applications Maintainer: Thomas Stephens <spiralman@softhome.net> diff --git a/noncore/tools/remote/opie-remote.control b/noncore/tools/remote/opie-remote.control index 78bfbc9..d29bb06 100644 --- a/noncore/tools/remote/opie-remote.control +++ b/noncore/tools/remote/opie-remote.control @@ -1,5 +1,5 @@ Package: opie-remote -Files: plugins/application/libremote.so* bin/remote apps/Applications/remote.desktop pics/remote/*.png +Files: bin/remote apps/Applications/remote.desktop pics/remote/*.png Priority: optional Section: opie/applications Maintainer: Thomas Stephens <spiralman@softhome.net> |