author | mickeyl <mickeyl> | 2003-10-29 16:45:13 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-29 16:45:13 (UTC) |
commit | e8697a4281f7a265b69e6bf5253383c73a38626b (patch) (side-by-side diff) | |
tree | 040470f8f5c90c0d72ff5f01a272143571842078 | |
parent | d5d9b307e950d9038215e4d63e64bc9cd5d85352 (diff) | |
download | opie-e8697a4281f7a265b69e6bf5253383c73a38626b.zip opie-e8697a4281f7a265b69e6bf5253383c73a38626b.tar.gz opie-e8697a4281f7a265b69e6bf5253383c73a38626b.tar.bz2 |
merge noncore/tools/*
-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,7 +1,5 @@ -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 INCLUDEPATH += $(OPIEDIR)/include 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 @@ -117,8 +117,60 @@ 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); bgr_command.insert( PushButtonMC); @@ -207,14 +259,14 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, int x = 0; 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(); line2 = ts2.readLine(); 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 @@ -72,9 +72,11 @@ class CalculatorImpl : public Calculator Q_OBJECT 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); void enterNumber(int i); 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 @@ -20,16 +20,7 @@ #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 @@ -41,8 +41,9 @@ public: QSizePolicy sizePolicy() const; void display( const QTime& time ); + protected: void drawContents( QPainter *p ); private: @@ -66,8 +67,10 @@ public: ~Clock(); QDateTime when; bool bSound; int hour, minute, snoozeTime; + static QString appName() { return QString::fromLatin1("clock"); } + private slots: void slotSet(); void slotReset(); void modeSelect(int); 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,14 +1,11 @@ -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 \ ../../../i18n/nl/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 @@ -20,15 +20,8 @@ #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,14 +1,13 @@ -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = calcdisplay.h \ calckeypad.h SOURCES = calcdisplay.cpp \ calckeypad.cpp \ main.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 @@ -8,32 +8,30 @@ * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> * * 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 @@ -53,9 +53,9 @@ #define DELIMITER '#' /* 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 ) { if ( !name ) 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 @@ -29,9 +29,10 @@ 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; QWidget *tab, *tab_2;; 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,10 +1,8 @@ -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 @@ -13,13 +13,7 @@ #include <qpe/qpeapplication.h> #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,6 +1,6 @@ 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> Architecture: arm 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,6 +1,6 @@ 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> Architecture: arm |