summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/calculator/calculator.pro4
-rw-r--r--noncore/tools/calculator/calculatorimpl.cpp56
-rw-r--r--noncore/tools/calculator/calculatorimpl.h4
-rw-r--r--noncore/tools/calculator/main.cpp13
-rw-r--r--noncore/tools/clock/clock.h3
-rw-r--r--noncore/tools/clock/clock.pro5
-rw-r--r--noncore/tools/clock/main.cpp11
-rw-r--r--noncore/tools/euroconv/euroconv.pro5
-rw-r--r--noncore/tools/euroconv/main.cpp30
-rw-r--r--noncore/tools/formatter/formatter.cpp2
-rw-r--r--noncore/tools/formatter/formatter.h3
-rw-r--r--noncore/tools/formatter/formatter.pro4
-rw-r--r--noncore/tools/formatter/main.cpp10
-rw-r--r--noncore/tools/opie-sh/opie-sh.control2
-rw-r--r--noncore/tools/remote/opie-remote.control2
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,5 +1,3 @@
-DESTDIR = $(OPIEDIR)/bin
-TEMPLATE = app
-CONFIG = qt warn_on release
+CONFIG = qt warn_on release quick-app
HEADERS = calculatorimpl.h
SOURCES = calculatorimpl.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
@@ -119,4 +119,56 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
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);
@@ -209,10 +261,10 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
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);
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
@@ -74,5 +74,7 @@ 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:
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
@@ -22,14 +22,5 @@
#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
@@ -43,4 +43,5 @@ public:
void display( const QTime& time );
+
protected:
void drawContents( QPainter *p );
@@ -68,4 +69,6 @@ public:
bool bSound;
int hour, minute, snoozeTime;
+ static QString appName() { return QString::fromLatin1("clock"); }
+
private slots:
void slotSet();
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,5 +1,3 @@
-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 \
@@ -8,5 +6,4 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie -lpthread
-INTERFACES =
TARGET = clock
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
@@ -22,13 +22,6 @@
#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,4 +1,3 @@
-TEMPLATE = app
-CONFIG = qt warn_on release
+CONFIG = qt warn_on release quick-app
HEADERS = calcdisplay.h \
calckeypad.h
@@ -9,6 +8,6 @@ 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
@@ -10,5 +10,4 @@
* Requirements: Qt
*
- * $Id$
*
***************************************************************************/
@@ -16,24 +15,23 @@
#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
@@ -55,5 +55,5 @@
/*
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
@@ -31,5 +31,6 @@ class FormatterApp : public QMainWindow
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();
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,8 +1,6 @@
-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
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
@@ -15,11 +15,5 @@
#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,4 +1,4 @@
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
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,4 +1,4 @@
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