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,9 +1,7 @@
-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
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe
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
@@ -115,12 +115,64 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
PushButtonMR->setEnabled( FALSE );
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);
bgr_command.insert( PushButtonCE);
connect( &bgr_command, SIGNAL(clicked(int) ), this, SLOT(command_buttons(int)));
@@ -205,18 +257,18 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
// second pass, read in values
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();
line2.remove(0,7);
preoffset_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
@@ -70,13 +70,15 @@ class QLabel;
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);
void std_buttons(int);
void std_funcs(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
@@ -18,18 +18,9 @@
**
**********************************************************************/
#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
@@ -39,12 +39,13 @@ public:
AnalogClock( QWidget * parent = 0, const char * name = 0 );
QSizePolicy sizePolicy() const;
void display( const QTime& time );
+
protected:
void drawContents( QPainter *p );
private:
QPixmap bg;
@@ -64,12 +65,14 @@ class Clock : public QVBox
public:
Clock( QWidget * parent = 0, const char * name = 0, WFlags f=0 );
~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);
void updateClock();
void changeClock( bool );
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,16 +1,13 @@
-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 \
../../../i18n/xx/clock.ts \
../../../i18n/en/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
@@ -18,17 +18,10 @@
**
**********************************************************************/
#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
@@ -6,34 +6,32 @@
*
*
* 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
@@ -51,13 +51,13 @@
#define BLANK ' '
#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 )
setName( "FormatterApp" );
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
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
@@ -27,13 +27,14 @@ class QStringList;
class FormatterApp : public QMainWindow
//public QDialog
{
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;;
QLabel *TextLabel1, *TextLabel2, *TextLabel3, *TextLabel4, *TextLabel5;
QComboBox *storageComboBox, *fileSystemsCombo, *deviceComboBox;
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,12 +1,10 @@
-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
TRANSLATIONS = ../../../i18n/de/formatter.ts \
../../../i18n/nl/formatter.ts \
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
@@ -11,15 +11,9 @@
* (at your option) any later version. *
***************************************************************************/
#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,8 +1,8 @@
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
Version: 0.5-$SUB_VERSION
Depends: task-opie-minimal
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,8 +1,8 @@
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
Version: $QPE_VERSION$EXTRAVERSION
Depends: task-opie-minimal, lirc