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 /noncore/tools/calculator | |
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 | 2 | ||||
-rw-r--r-- | noncore/tools/calculator/main.cpp | 13 |
4 files changed, 59 insertions, 16 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,4 +1,2 @@ -DESTDIR = $(OPIEDIR)/bin -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = calculatorimpl.h 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 @@ -120,2 +120,54 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, + // 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); @@ -210,3 +262,3 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, if ( line.contains("STARTTYPE") ) { - captions << line.remove(0,10); + captions << tr( line.remove(0,10) ); ComboBoxFunction->insertItem(captions.last()); @@ -215,3 +267,3 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, if ( line.contains("NAME") ) { - faces << line.remove(0,5); + faces << tr( line.remove(0,5) ); 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 @@ -76,2 +76,4 @@ public: WFlags f = 0 ); + static QString appName() { return QString::fromLatin1("calculator"); } + 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 @@ -23,13 +23,4 @@ #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> ) |