author | mickeyl <mickeyl> | 2003-10-27 19:51:32 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-27 19:51:32 (UTC) |
commit | 951d1d4125a80dc814f95d2956853bf53ca52e9a (patch) (unidiff) | |
tree | 46c7a70b80a7eebb54cd59c46204c28335f3821c /noncore/settings/aqpkg | |
parent | f0a15a9866f9eddfe10596e63a1e6300b92b9e3f (diff) | |
download | opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.zip opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.tar.gz opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.tar.bz2 |
merge noncore/apps/* except
- advancedfm (ljp, please...)
- odict (tille, please...)
-rw-r--r-- | noncore/settings/aqpkg/.cvsignore | 1 | ||||
-rw-r--r-- | noncore/settings/aqpkg/aqpkg.pro | 26 | ||||
-rw-r--r-- | noncore/settings/aqpkg/main.cpp | 44 | ||||
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 31 | ||||
-rw-r--r-- | noncore/settings/aqpkg/mainwin.h | 5 |
5 files changed, 27 insertions, 80 deletions
diff --git a/noncore/settings/aqpkg/.cvsignore b/noncore/settings/aqpkg/.cvsignore index 2888d4a..4183697 100644 --- a/noncore/settings/aqpkg/.cvsignore +++ b/noncore/settings/aqpkg/.cvsignore | |||
@@ -1,2 +1,3 @@ | |||
1 | Makefile* | 1 | Makefile* |
2 | moc* | 2 | moc* |
3 | .moc* | ||
diff --git a/noncore/settings/aqpkg/aqpkg.pro b/noncore/settings/aqpkg/aqpkg.pro index d241d1b..882cfd4 100644 --- a/noncore/settings/aqpkg/aqpkg.pro +++ b/noncore/settings/aqpkg/aqpkg.pro | |||
@@ -1,4 +1,3 @@ | |||
1 | TEMPLATE= app | 1 | CONFIG = qt warn_on release quick-app |
2 | CONFIG = qt warn_on release | ||
3 | HEADERS = global.h \ | 2 | HEADERS = global.h \ |
4 | mainwin.h \ | 3 | mainwin.h \ |
@@ -33,30 +32,9 @@ SOURCES = mainwin.cpp \ | |||
33 | version.cpp \ | 32 | version.cpp \ |
34 | categoryfilterimpl.cpp | 33 | categoryfilterimpl.cpp |
35 | INTERFACES= | ||
36 | TARGET = aqpkg | 34 | TARGET = aqpkg |
37 | INCLUDEPATH += $(OPIEDIR)/include | 35 | INCLUDEPATH += $(OPIEDIR)/include |
38 | DEPENDPATH += $(OPIEDIR)/include | 36 | DEPENDPATH += $(OPIEDIR)/include |
39 | LIBS += -lqpe -lopie -lstdc++ | 37 | LIBS += -lqpe -lopie -lstdc++ |
40 | DESTDIR = $(OPIEDIR)/bin | ||
41 | |||
42 | TRANSLATIONS = ../../../i18n/de/aqpkg.ts \ | ||
43 | ../../../i18n/nl/aqpkg.ts \ | ||
44 | ../../../i18n/xx/aqpkg.ts \ | ||
45 | ../../../i18n/en/aqpkg.ts \ | ||
46 | ../../../i18n/es/aqpkg.ts \ | ||
47 | ../../../i18n/fr/aqpkg.ts \ | ||
48 | ../../../i18n/hu/aqpkg.ts \ | ||
49 | ../../../i18n/ja/aqpkg.ts \ | ||
50 | ../../../i18n/ko/aqpkg.ts \ | ||
51 | ../../../i18n/no/aqpkg.ts \ | ||
52 | ../../../i18n/pl/aqpkg.ts \ | ||
53 | ../../../i18n/pt/aqpkg.ts \ | ||
54 | ../../../i18n/pt_BR/aqpkg.ts \ | ||
55 | ../../../i18n/sl/aqpkg.ts \ | ||
56 | ../../../i18n/zh_CN/aqpkg.ts \ | ||
57 | ../../../i18n/zh_TW/aqpkg.ts \ | ||
58 | ../../../i18n/it/aqpkg.ts \ | ||
59 | ../../../i18n/da/aqpkg.ts | ||
60 | |||
61 | 38 | ||
62 | include ( $(OPIEDIR)/include.pro ) | 39 | include ( $(OPIEDIR)/include.pro ) |
40 | |||
diff --git a/noncore/settings/aqpkg/main.cpp b/noncore/settings/aqpkg/main.cpp index b7f8b7b..179f8b7 100644 --- a/noncore/settings/aqpkg/main.cpp +++ b/noncore/settings/aqpkg/main.cpp | |||
@@ -28,18 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifdef QWS | ||
31 | #include <qpe/qpeapplication.h> | ||
32 | #include <qpe/qcopenvelope_qws.h> | ||
33 | #else | ||
34 | #include <qapplication.h> | ||
35 | #endif | ||
36 | |||
37 | #include <qobjectdefs.h> | ||
38 | |||
39 | #include "mainwin.h" | 30 | #include "mainwin.h" |
40 | #include "server.h" | ||
41 | |||
42 | #include "global.h" | ||
43 | 31 | ||
32 | #include <opie/oapplicationfactory.h> | ||
44 | 33 | ||
45 | /* be less intrusive for translation -zecke */ | 34 | /* be less intrusive for translation -zecke */ |
@@ -47,32 +36,3 @@ extern QString LOCAL_SERVER; | |||
47 | extern QString LOCAL_IPKGS; | 36 | extern QString LOCAL_IPKGS; |
48 | 37 | ||
49 | int main(int argc, char *argv[]) | 38 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) |
50 | { | ||
51 | #ifdef QWS | ||
52 | QPEApplication a( argc, argv ); | ||
53 | #else | ||
54 | QApplication a( argc, argv ); | ||
55 | #endif | ||
56 | |||
57 | #ifdef QWS | ||
58 | // Disable suspend mode | ||
59 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; | ||
60 | #endif | ||
61 | |||
62 | LOCAL_SERVER = QObject::tr( "Installed packages" ); | ||
63 | LOCAL_IPKGS = QObject::tr( "Local packages" ); | ||
64 | |||
65 | MainWindow *win = new MainWindow(); | ||
66 | a.setMainWidget(win); | ||
67 | win->showMaximized(); | ||
68 | |||
69 | a.exec(); | ||
70 | |||
71 | #ifdef QWS | ||
72 | // Reenable suspend mode | ||
73 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | ||
74 | #endif | ||
75 | #ifdef _DEBUG | ||
76 | DumpUnfreed(); | ||
77 | #endif | ||
78 | } | ||
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 42093cf..dbe694e 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | 3 | ||
4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | .=l. Dan Williams <drw@handhelds.org> | 5 | .=l. Dan Williams <drw@handhelds.org> |
@@ -67,7 +67,13 @@ | |||
67 | extern int compareVersions( const char *v1, const char *v2 ); | 67 | extern int compareVersions( const char *v1, const char *v2 ); |
68 | 68 | ||
69 | MainWindow :: MainWindow() | 69 | MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) |
70 | :QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) | 70 | :QMainWindow( parent, name, fl || WStyle_ContextHelp ) |
71 | { | 71 | { |
72 | // Disable suspend mode | ||
73 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; | ||
74 | |||
75 | LOCAL_SERVER = QObject::tr( "Installed packages" ); | ||
76 | LOCAL_IPKGS = QObject::tr( "Local packages" ); | ||
77 | |||
72 | setCaption( tr( "AQPkg - Package Manager" ) ); | 78 | setCaption( tr( "AQPkg - Package Manager" ) ); |
73 | 79 | ||
@@ -235,4 +241,7 @@ MainWindow :: ~MainWindow() | |||
235 | { | 241 | { |
236 | delete mgr; | 242 | delete mgr; |
243 | |||
244 | // Reenable suspend mode | ||
245 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | ||
237 | } | 246 | } |
238 | 247 | ||
@@ -1013,5 +1022,4 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1013 | InstallData *newitem = new InstallData(); | 1022 | InstallData *newitem = new InstallData(); |
1014 | newitem->option = "D"; | 1023 | newitem->option = "D"; |
1015 | |||
1016 | // If local file, remove using package name, not filename | 1024 | // If local file, remove using package name, not filename |
1017 | if ( p->isPackageStoredLocally() ) | 1025 | if ( p->isPackageStoredLocally() ) |
@@ -1047,5 +1055,4 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1047 | // Version available is older - remove only | 1055 | // Version available is older - remove only |
1048 | newitem->option = "D"; | 1056 | newitem->option = "D"; |
1049 | |||
1050 | // If local file, remove using package name, not filename | 1057 | // If local file, remove using package name, not filename |
1051 | if ( p->isPackageStoredLocally() ) | 1058 | if ( p->isPackageStoredLocally() ) |
@@ -1190,19 +1197,19 @@ QuestionDlg::QuestionDlg( const QString &caption, const QString &text, const QSt | |||
1190 | setCaption( caption ); | 1197 | setCaption( caption ); |
1191 | resize( 175, 100 ); | 1198 | resize( 175, 100 ); |
1192 | 1199 | ||
1193 | QGridLayout *layout = new QGridLayout( this ); | 1200 | QGridLayout *layout = new QGridLayout( this ); |
1194 | 1201 | ||
1195 | QLabel *l = new QLabel( text, this ); | 1202 | QLabel *l = new QLabel( text, this ); |
1196 | l->setAlignment( AlignCenter | WordBreak ); | 1203 | l->setAlignment( AlignCenter | WordBreak ); |
1197 | layout->addMultiCellWidget( l, 0, 0, 0, 1 ); | 1204 | layout->addMultiCellWidget( l, 0, 0, 0, 1 ); |
1198 | 1205 | ||
1199 | btn1 = new QPushButton( tr( "Remove" ), this ); | 1206 | btn1 = new QPushButton( tr( "Remove" ), this ); |
1200 | connect( btn1, SIGNAL(clicked()), this, SLOT(slotButtonPressed()) ); | 1207 | connect( btn1, SIGNAL(clicked()), this, SLOT(slotButtonPressed()) ); |
1201 | layout->addWidget( btn1, 1, 0 ); | 1208 | layout->addWidget( btn1, 1, 0 ); |
1202 | 1209 | ||
1203 | btn2 = new QPushButton( secondbtn, this ); | 1210 | btn2 = new QPushButton( secondbtn, this ); |
1204 | connect( btn2, SIGNAL(clicked()), this, SLOT(slotButtonPressed()) ); | 1211 | connect( btn2, SIGNAL(clicked()), this, SLOT(slotButtonPressed()) ); |
1205 | layout->addWidget( btn2, 1, 1 ); | 1212 | layout->addWidget( btn2, 1, 1 ); |
1206 | 1213 | ||
1207 | executing = FALSE; | 1214 | executing = FALSE; |
1208 | } | 1215 | } |
@@ -1217,5 +1224,5 @@ int QuestionDlg::exec() | |||
1217 | qApp->enter_loop(); | 1224 | qApp->enter_loop(); |
1218 | } | 1225 | } |
1219 | 1226 | ||
1220 | return buttonpressed; | 1227 | return buttonpressed; |
1221 | } | 1228 | } |
@@ -1229,5 +1236,5 @@ void QuestionDlg::slotButtonPressed() | |||
1229 | else | 1236 | else |
1230 | buttonpressed = 0; | 1237 | buttonpressed = 0; |
1231 | 1238 | ||
1232 | qApp->exit_loop(); | 1239 | qApp->exit_loop(); |
1233 | } | 1240 | } |
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h index 615ff8b..b8e1c98 100644 --- a/noncore/settings/aqpkg/mainwin.h +++ b/noncore/settings/aqpkg/mainwin.h | |||
@@ -52,9 +52,10 @@ class QWidgetStack; | |||
52 | class MainWindow :public QMainWindow | 52 | class MainWindow :public QMainWindow |
53 | { | 53 | { |
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | public: | 55 | public: |
56 | 56 | ||
57 | MainWindow(); | 57 | MainWindow( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
58 | ~MainWindow(); | 58 | ~MainWindow(); |
59 | static QString appName() { return QString::fromLatin1( "aqpkg" ); }; | ||
59 | 60 | ||
60 | protected: | 61 | protected: |