author | drw <drw> | 2003-02-01 02:07:22 (UTC) |
---|---|---|
committer | drw <drw> | 2003-02-01 02:07:22 (UTC) |
commit | 766f09a89eef17808e77836f76371aab8ebc4c1c (patch) (unidiff) | |
tree | 3a298c40d5b688dc409a0e6d251a514d88eada48 /noncore/settings/aqpkg | |
parent | 266feac1ac442947651bf169dbf993c4d46d56ea (diff) | |
download | opie-766f09a89eef17808e77836f76371aab8ebc4c1c.zip opie-766f09a89eef17808e77836f76371aab8ebc4c1c.tar.gz opie-766f09a89eef17808e77836f76371aab8ebc4c1c.tar.bz2 |
Many updates to install dialog
-rw-r--r-- | noncore/settings/aqpkg/.cvsignore | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/aqpkg.pro | 1 | ||||
-rw-r--r-- | noncore/settings/aqpkg/install.ui | 147 | ||||
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 128 | ||||
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.h | 32 | ||||
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 84 | ||||
-rw-r--r-- | noncore/settings/aqpkg/mainwin.h | 3 |
7 files changed, 157 insertions, 240 deletions
diff --git a/noncore/settings/aqpkg/.cvsignore b/noncore/settings/aqpkg/.cvsignore index ef0e27f..751040e 100644 --- a/noncore/settings/aqpkg/.cvsignore +++ b/noncore/settings/aqpkg/.cvsignore | |||
@@ -1,4 +1,2 @@ | |||
1 | Makefile* | 1 | Makefile* |
2 | install.cpp | ||
3 | install.h | ||
4 | instoptions.cpp | 2 | instoptions.cpp |
diff --git a/noncore/settings/aqpkg/aqpkg.pro b/noncore/settings/aqpkg/aqpkg.pro index d8eee6a..d3f898b 100644 --- a/noncore/settings/aqpkg/aqpkg.pro +++ b/noncore/settings/aqpkg/aqpkg.pro | |||
@@ -35,3 +35,2 @@ SOURCES = mainwin.cpp \ | |||
35 | INTERFACES= settings.ui \ | 35 | INTERFACES= settings.ui \ |
36 | install.ui \ | ||
37 | instoptions.ui \ | 36 | instoptions.ui \ |
diff --git a/noncore/settings/aqpkg/install.ui b/noncore/settings/aqpkg/install.ui deleted file mode 100644 index 53622dd..0000000 --- a/noncore/settings/aqpkg/install.ui +++ b/dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>InstallDlg</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>InstallDlg</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>196</width> | ||
15 | <height>278</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Install</string> | ||
21 | </property> | ||
22 | <grid> | ||
23 | <property stdset="1"> | ||
24 | <name>margin</name> | ||
25 | <number>11</number> | ||
26 | </property> | ||
27 | <property stdset="1"> | ||
28 | <name>spacing</name> | ||
29 | <number>6</number> | ||
30 | </property> | ||
31 | <widget row="0" column="1" > | ||
32 | <class>QComboBox</class> | ||
33 | <property stdset="1"> | ||
34 | <name>name</name> | ||
35 | <cstring>destination</cstring> | ||
36 | </property> | ||
37 | </widget> | ||
38 | <widget row="3" column="0" > | ||
39 | <class>QPushButton</class> | ||
40 | <property stdset="1"> | ||
41 | <name>name</name> | ||
42 | <cstring>btnInstall</cstring> | ||
43 | </property> | ||
44 | <property stdset="1"> | ||
45 | <name>text</name> | ||
46 | <string>Start</string> | ||
47 | </property> | ||
48 | </widget> | ||
49 | <widget row="3" column="1" > | ||
50 | <class>QPushButton</class> | ||
51 | <property stdset="1"> | ||
52 | <name>name</name> | ||
53 | <cstring>btnOptions</cstring> | ||
54 | </property> | ||
55 | <property stdset="1"> | ||
56 | <name>text</name> | ||
57 | <string>Options</string> | ||
58 | </property> | ||
59 | </widget> | ||
60 | <widget row="2" column="0" rowspan="1" colspan="2" > | ||
61 | <class>QGroupBox</class> | ||
62 | <property stdset="1"> | ||
63 | <name>name</name> | ||
64 | <cstring>GroupBox2</cstring> | ||
65 | </property> | ||
66 | <property stdset="1"> | ||
67 | <name>title</name> | ||
68 | <string>Output</string> | ||
69 | </property> | ||
70 | <grid> | ||
71 | <property stdset="1"> | ||
72 | <name>margin</name> | ||
73 | <number>11</number> | ||
74 | </property> | ||
75 | <property stdset="1"> | ||
76 | <name>spacing</name> | ||
77 | <number>6</number> | ||
78 | </property> | ||
79 | <widget row="0" column="0" > | ||
80 | <class>QMultiLineEdit</class> | ||
81 | <property stdset="1"> | ||
82 | <name>name</name> | ||
83 | <cstring>output</cstring> | ||
84 | </property> | ||
85 | </widget> | ||
86 | </grid> | ||
87 | </widget> | ||
88 | <widget row="0" column="0" > | ||
89 | <class>QLabel</class> | ||
90 | <property stdset="1"> | ||
91 | <name>name</name> | ||
92 | <cstring>TextLabel1</cstring> | ||
93 | </property> | ||
94 | <property stdset="1"> | ||
95 | <name>text</name> | ||
96 | <string>Destination</string> | ||
97 | </property> | ||
98 | </widget> | ||
99 | <widget row="1" column="0" > | ||
100 | <class>QLabel</class> | ||
101 | <property stdset="1"> | ||
102 | <name>name</name> | ||
103 | <cstring>TextLabel3</cstring> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>text</name> | ||
107 | <string>Space Avail</string> | ||
108 | </property> | ||
109 | </widget> | ||
110 | <widget row="1" column="1" > | ||
111 | <class>QLabel</class> | ||
112 | <property stdset="1"> | ||
113 | <name>name</name> | ||
114 | <cstring>txtAvailableSpace</cstring> | ||
115 | </property> | ||
116 | <property stdset="1"> | ||
117 | <name>text</name> | ||
118 | <string></string> | ||
119 | </property> | ||
120 | </widget> | ||
121 | </grid> | ||
122 | </widget> | ||
123 | <connections> | ||
124 | <connection> | ||
125 | <sender>btnOptions</sender> | ||
126 | <signal>clicked()</signal> | ||
127 | <receiver>InstallDlg</receiver> | ||
128 | <slot>optionsSelected()</slot> | ||
129 | </connection> | ||
130 | <connection> | ||
131 | <sender>btnInstall</sender> | ||
132 | <signal>clicked()</signal> | ||
133 | <receiver>InstallDlg</receiver> | ||
134 | <slot>installSelected()</slot> | ||
135 | </connection> | ||
136 | <connection> | ||
137 | <sender>destination</sender> | ||
138 | <signal>highlighted(const QString&)</signal> | ||
139 | <receiver>InstallDlg</receiver> | ||
140 | <slot>displayAvailableSpace( const QString& )</slot> | ||
141 | </connection> | ||
142 | <slot access="public">displayAvailableSpace( const QString& )</slot> | ||
143 | <slot access="public">installSelected()</slot> | ||
144 | <slot access="public">displayText( const QString & )</slot> | ||
145 | <slot access="public">optionsSelected()</slot> | ||
146 | </connections> | ||
147 | </UI> | ||
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp index 75ce1a1..65aaa32 100644 --- a/noncore/settings/aqpkg/installdlgimpl.cpp +++ b/noncore/settings/aqpkg/installdlgimpl.cpp | |||
@@ -17,2 +17,4 @@ | |||
17 | 17 | ||
18 | #include <stdio.h> | ||
19 | |||
18 | #ifdef QWS | 20 | #ifdef QWS |
@@ -20,2 +22,3 @@ | |||
20 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/resource.h> | ||
21 | #include <qpe/storage.h> | 24 | #include <qpe/storage.h> |
@@ -23,14 +26,16 @@ | |||
23 | 26 | ||
24 | #include <qmultilineedit.h> | ||
25 | #include <qdialog.h> | ||
26 | #include <qcombobox.h> | ||
27 | #include <qcheckbox.h> | 27 | #include <qcheckbox.h> |
28 | #include <qpushbutton.h> | 28 | #include <qcombobox.h> |
29 | #include <qdialog.h> | ||
30 | #include <qgroupbox.h> | ||
31 | #include <qmultilineedit.h> | ||
29 | #include <qlabel.h> | 32 | #include <qlabel.h> |
30 | 33 | #include <qlayout.h> | |
34 | #include <qpushbutton.h> | ||
31 | 35 | ||
32 | #include "datamgr.h" | 36 | #include "datamgr.h" |
33 | #include "instoptionsimpl.h" | ||
34 | #include "destination.h" | 37 | #include "destination.h" |
38 | #include "instoptionsimpl.h" | ||
35 | #include "installdlgimpl.h" | 39 | #include "installdlgimpl.h" |
40 | #include "ipkg.h" | ||
36 | #include "utils.h" | 41 | #include "utils.h" |
@@ -38,5 +43,8 @@ | |||
38 | 43 | ||
39 | InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) | 44 | InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, const char *title = 0 ) |
40 | : InstallDlg( parent, name, modal, fl ) | 45 | : QWidget( 0, 0, 0 ) |
41 | { | 46 | { |
47 | setCaption( title ); | ||
48 | init( TRUE ); | ||
49 | |||
42 | pIpkg = 0; | 50 | pIpkg = 0; |
@@ -60,5 +68,5 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
60 | output->setReadOnly( true ); | 68 | output->setReadOnly( true ); |
61 | QFont f( "helvetica" ); | 69 | //QFont f( "helvetica" ); |
62 | f.setPointSize( 10 ); | 70 | //f.setPointSize( 10 ); |
63 | output->setFont( f ); | 71 | //output->setFont( f ); |
64 | 72 | ||
@@ -79,5 +87,5 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
79 | // setup package data | 87 | // setup package data |
80 | QString remove = "Remove\n"; | 88 | QString remove = tr( "Remove\n" ); |
81 | QString install = "\nInstall\n"; | 89 | QString install = tr( "Install\n" ); |
82 | QString upgrade = "\nUpgrade\n"; | 90 | QString upgrade = tr( "Upgrade\n" ); |
83 | for ( it = packageList.begin() ; it != packageList.end() ; ++it ) | 91 | for ( it = packageList.begin() ; it != packageList.end() ; ++it ) |
@@ -88,3 +96,3 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
88 | installList.push_back( item ); | 96 | installList.push_back( item ); |
89 | install += " " + item.packageName + "\n"; | 97 | install.append( QString( " %1\n" ).arg( item.packageName ) ); |
90 | } | 98 | } |
@@ -93,3 +101,3 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
93 | removeList.push_back( item ); | 101 | removeList.push_back( item ); |
94 | remove += " " + item.packageName + "\n"; | 102 | remove.append( QString( " %1\n" ).arg( item.packageName ) ); |
95 | } | 103 | } |
@@ -98,6 +106,8 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
98 | updateList.push_back( item ); | 106 | updateList.push_back( item ); |
99 | QString type = " (Upgrade)"; | 107 | QString type; |
100 | if ( item.option == "R" ) | 108 | if ( item.option == "R" ) |
101 | type = " (ReInstall)"; | 109 | type = tr( "(ReInstall)" ); |
102 | upgrade += " " + item.packageName + type + "\n"; | 110 | else |
111 | type = tr( "(Upgrade)" ); | ||
112 | upgrade.append( QString( " %1 %2\n" ).arg( item.packageName ).arg( type ) ); | ||
103 | } | 113 | } |
@@ -105,3 +115,3 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
105 | 115 | ||
106 | output->setText( remove + install + upgrade ); | 116 | output->setText( QString( "%1\n%2\n%3\n" ).arg( remove ).arg( install ).arg( upgrade ) ); |
107 | 117 | ||
@@ -110,5 +120,7 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
110 | 120 | ||
111 | InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, QWidget *parent, const char *name, bool modal, WFlags fl ) | 121 | InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, const char *title = 0 ) |
112 | : InstallDlg( parent, name, modal, fl ) | 122 | : QWidget( 0, 0, 0 ) |
113 | { | 123 | { |
124 | setCaption( title ); | ||
125 | init( FALSE ); | ||
114 | pIpkg = ipkg; | 126 | pIpkg = ipkg; |
@@ -120,10 +132,48 @@ InstallDlgImpl::~InstallDlgImpl() | |||
120 | { | 132 | { |
133 | if ( pIpkg ) | ||
134 | delete pIpkg; | ||
121 | } | 135 | } |
122 | 136 | ||
123 | bool InstallDlgImpl :: showDlg() | 137 | void InstallDlgImpl :: init( bool displayextrainfo ) |
138 | { | ||
139 | QGridLayout *layout = new QGridLayout( this ); | ||
140 | layout->setSpacing( 4 ); | ||
141 | layout->setMargin( 4 ); | ||
142 | |||
143 | if ( displayextrainfo ) | ||
144 | { | ||
145 | QLabel *label = new QLabel( tr( "Destination" ), this ); | ||
146 | layout->addWidget( label, 0, 0 ); | ||
147 | destination = new QComboBox( FALSE, this ); | ||
148 | layout->addWidget( destination, 0, 1 ); | ||
149 | connect( destination, SIGNAL( highlighted( const QString & ) ), | ||
150 | this, SLOT( displayAvailableSpace( const QString & ) ) ); | ||
151 | |||
152 | QLabel *label2 = new QLabel( tr( "Space Avail" ), this ); | ||
153 | layout->addWidget( label2, 1, 0 ); | ||
154 | txtAvailableSpace = new QLabel( "", this ); | ||
155 | layout->addWidget( txtAvailableSpace, 1, 1 ); | ||
156 | } | ||
157 | else | ||
124 | { | 158 | { |
125 | showMaximized(); | 159 | destination = 0x0; |
126 | bool ret = exec(); | 160 | txtAvailableSpace = 0x0; |
161 | } | ||
162 | |||
163 | QGroupBox *GroupBox2 = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this ); | ||
164 | GroupBox2->layout()->setSpacing( 0 ); | ||
165 | GroupBox2->layout()->setMargin( 4 ); | ||
166 | |||
167 | QVBoxLayout *GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() ); | ||
168 | output = new QMultiLineEdit( GroupBox2 ); | ||
169 | GroupBox2Layout->addWidget( output ); | ||
170 | layout->addMultiCellWidget( GroupBox2, 2, 2, 0, 1 ); | ||
171 | |||
172 | btnInstall = new QPushButton( Resource::loadPixmap( "aqpkg/apply" ), tr( "Start" ), this ); | ||
173 | layout->addWidget( btnInstall, 3, 0 ); | ||
174 | connect( btnInstall, SIGNAL( clicked() ), this, SLOT( installSelected() ) ); | ||
127 | 175 | ||
128 | return ret; | 176 | btnOptions = new QPushButton( Resource::loadPixmap( "aqpkg/config" ), tr( "Options" ), this ); |
177 | layout->addWidget( btnOptions, 3, 1 ); | ||
178 | connect( btnOptions, SIGNAL( clicked() ), this, SLOT( optionsSelected() ) ); | ||
129 | } | 179 | } |
@@ -147,3 +197,3 @@ void InstallDlgImpl :: installSelected() | |||
147 | { | 197 | { |
148 | if ( btnInstall->text() == "Abort" ) | 198 | if ( btnInstall->text() == tr( "Abort" ) ) |
149 | { | 199 | { |
@@ -151,5 +201,5 @@ void InstallDlgImpl :: installSelected() | |||
151 | { | 201 | { |
152 | displayText( "\n**** User Clicked ABORT ***" ); | 202 | displayText( tr( "\n**** User Clicked ABORT ***" ) ); |
153 | pIpkg->abort(); | 203 | pIpkg->abort(); |
154 | displayText( "**** Process Aborted ****" ); | 204 | displayText( tr( "**** Process Aborted ****" ) ); |
155 | } | 205 | } |
@@ -157,2 +207,3 @@ void InstallDlgImpl :: installSelected() | |||
157 | btnInstall->setText( tr( "Close" ) ); | 207 | btnInstall->setText( tr( "Close" ) ); |
208 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); | ||
158 | return; | 209 | return; |
@@ -161,3 +212,3 @@ void InstallDlgImpl :: installSelected() | |||
161 | { | 212 | { |
162 | done( 1 ); | 213 | emit reloadData( this ); |
163 | return; | 214 | return; |
@@ -169,4 +220,4 @@ void InstallDlgImpl :: installSelected() | |||
169 | 220 | ||
170 | btnInstall->setText( "Abort" ); | 221 | btnInstall->setText( tr( "Abort" ) ); |
171 | 222 | btnInstall->setIconSet( Resource::loadPixmap( "close" ) ); | |
172 | if ( pIpkg ) | 223 | if ( pIpkg ) |
@@ -174,3 +225,2 @@ void InstallDlgImpl :: installSelected() | |||
174 | output->setText( "" ); | 225 | output->setText( "" ); |
175 | |||
176 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); | 226 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); |
@@ -244,2 +294,3 @@ void InstallDlgImpl :: installSelected() | |||
244 | delete pIpkg; | 294 | delete pIpkg; |
295 | pIpkg = 0; | ||
245 | } | 296 | } |
@@ -249,4 +300,5 @@ void InstallDlgImpl :: installSelected() | |||
249 | btnInstall->setText( tr( "Close" ) ); | 300 | btnInstall->setText( tr( "Close" ) ); |
301 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); | ||
250 | 302 | ||
251 | if ( destination->currentText() != 0 && destination->currentText() != "" ) | 303 | if ( destination && destination->currentText() != 0 && destination->currentText() != "" ) |
252 | displayAvailableSpace( destination->currentText() ); | 304 | displayAvailableSpace( destination->currentText() ); |
@@ -257,4 +309,5 @@ void InstallDlgImpl :: displayText(const QString &text ) | |||
257 | { | 309 | { |
258 | QString t = output->text() + "\n" + text; | 310 | //output->setText( QString( "%1\n%2" ).arg( output->text() ).arg( text ) ); |
259 | output->setText( t ); | 311 | QString newtext = QString( "%1\n%2" ).arg( output->text() ).arg( text ); |
312 | output->setText( newtext ); | ||
260 | output->setCursorPosition( output->numLines(), 0 ); | 313 | output->setCursorPosition( output->numLines(), 0 ); |
@@ -286,4 +339,5 @@ void InstallDlgImpl :: displayAvailableSpace( const QString &text ) | |||
286 | else | 339 | else |
287 | space = "Unknown"; | 340 | space = tr( "Unknown" ); |
288 | 341 | ||
342 | if ( txtAvailableSpace ) | ||
289 | txtAvailableSpace->setText( space ); | 343 | txtAvailableSpace->setText( space ); |
diff --git a/noncore/settings/aqpkg/installdlgimpl.h b/noncore/settings/aqpkg/installdlgimpl.h index 2f80f08..4c9f087 100644 --- a/noncore/settings/aqpkg/installdlgimpl.h +++ b/noncore/settings/aqpkg/installdlgimpl.h | |||
@@ -22,6 +22,13 @@ using namespace std; | |||
22 | 22 | ||
23 | #include <qwidget.h> | ||
23 | #include <qstring.h> | 24 | #include <qstring.h> |
24 | 25 | ||
25 | #include "ipkg.h" | 26 | class QComboBox; |
26 | #include "install.h" | 27 | class QLabel; |
28 | class QMultiLineEdit; | ||
29 | class QPushButton; | ||
30 | |||
31 | class DataManager; | ||
32 | class Destination; | ||
33 | class Ipkg; | ||
27 | 34 | ||
@@ -36,13 +43,12 @@ public: | |||
36 | 43 | ||
37 | class InstallDlgImpl : public InstallDlg | 44 | class InstallDlgImpl : public QWidget |
38 | { | 45 | { |
46 | Q_OBJECT | ||
39 | public: | 47 | public: |
40 | InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, QWidget * parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); | 48 | InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, const char *title = 0 ); |
41 | InstallDlgImpl( Ipkg *ipkg, QString initialText, QWidget * parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); | 49 | InstallDlgImpl( Ipkg *ipkg, QString initialText, const char *title = 0 ); |
42 | ~InstallDlgImpl(); | 50 | ~InstallDlgImpl(); |
43 | 51 | ||
44 | bool showDlg(); | ||
45 | bool upgradeServer( QString &server ); | 52 | bool upgradeServer( QString &server ); |
46 | 53 | ||
47 | |||
48 | protected: | 54 | protected: |
@@ -58,4 +64,16 @@ private: | |||
58 | 64 | ||
65 | QComboBox *destination; | ||
66 | QPushButton *btnInstall; | ||
67 | QPushButton *btnOptions; | ||
68 | QMultiLineEdit *output; | ||
69 | QLabel *txtAvailableSpace; | ||
70 | |||
71 | void init( bool ); | ||
72 | |||
59 | bool runIpkg( QString &option, const QString& package, const QString& dest, int flags ); | 73 | bool runIpkg( QString &option, const QString& package, const QString& dest, int flags ); |
60 | 74 | ||
75 | signals: | ||
76 | void reloadData( InstallDlgImpl * ); | ||
77 | |||
78 | public slots: | ||
61 | void optionsSelected(); | 79 | void optionsSelected(); |
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index a25f5a7..947aace 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -47,2 +47,3 @@ | |||
47 | #include "inputdlg.h" | 47 | #include "inputdlg.h" |
48 | #include "ipkg.h" | ||
48 | #include "installdlgimpl.h" | 49 | #include "installdlgimpl.h" |
@@ -90,5 +91,2 @@ MainWindow :: MainWindow() | |||
90 | QGridLayout *layout = new QGridLayout( w ); | 91 | QGridLayout *layout = new QGridLayout( w ); |
91 | //QVBoxLayout *vbox = new QVBoxLayout( w, 0, -1 ); | ||
92 | //QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1 ); | ||
93 | //QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1 ); | ||
94 | 92 | ||
@@ -102,8 +100,2 @@ MainWindow :: MainWindow() | |||
102 | layout->addWidget( b, i / 13, i % 13); | 100 | layout->addWidget( b, i / 13, i % 13); |
103 | /* | ||
104 | if ( i < 13 ) | ||
105 | hbox3->addWidget( b ); | ||
106 | else | ||
107 | hbox4->addWidget( b ); | ||
108 | */ | ||
109 | } | 101 | } |
@@ -800,9 +792,9 @@ void MainWindow :: updateServer() | |||
800 | 792 | ||
801 | Ipkg ipkg; | 793 | Ipkg *ipkg = new Ipkg; |
802 | ipkg.setOption( "update" ); | 794 | ipkg->setOption( "update" ); |
803 | |||
804 | InstallDlgImpl dlg( &ipkg, tr( "Refreshing server package lists" ), this, tr( "Upgrade" ), true ); | ||
805 | dlg.showDlg(); | ||
806 | 795 | ||
807 | reloadData(); | 796 | InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Refreshing server package lists" ), |
797 | tr( "Update lists" ) ); | ||
798 | connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) ); | ||
799 | dlg->showMaximized(); | ||
808 | 800 | ||
@@ -829,11 +821,12 @@ void MainWindow :: upgradePackages() | |||
829 | // Now run upgrade | 821 | // Now run upgrade |
830 | Ipkg ipkg; | 822 | Ipkg *ipkg = new Ipkg; |
831 | ipkg.setOption( "upgrade" ); | 823 | ipkg->setOption( "upgrade" ); |
832 | |||
833 | InstallDlgImpl dlg( &ipkg, tr( "Upgrading installed packages" ), this, tr( "Upgrade" ), true ); | ||
834 | dlg.showDlg(); | ||
835 | 824 | ||
836 | reloadData(); | 825 | InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Upgrading installed packages" ), |
826 | tr ( "Upgrade" ) ); | ||
827 | connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) ); | ||
828 | dlg->showMaximized(); | ||
837 | } | 829 | } |
838 | } | 830 | } |
831 | |||
839 | void MainWindow :: downloadPackage() | 832 | void MainWindow :: downloadPackage() |
@@ -900,3 +893,3 @@ void MainWindow :: upgradePackages() | |||
900 | { | 893 | { |
901 | reloadData(); | 894 | reloadData( 0x0 ); |
902 | } | 895 | } |
@@ -972,13 +965,5 @@ void MainWindow :: downloadRemotePackage() | |||
972 | 965 | ||
973 | InstallDlgImpl dlg2( workingPackages, mgr, this, "Install", true ); | 966 | InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Download" ) ); |
974 | dlg2.showDlg(); | 967 | connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) ); |
975 | 968 | dlg->showMaximized(); | |
976 | reloadData(); | ||
977 | |||
978 | #ifdef QWS | ||
979 | // Finally let the main system update itself | ||
980 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | ||
981 | QString lf = QString::null; | ||
982 | e << lf; | ||
983 | #endif | ||
984 | } | 969 | } |
@@ -1018,13 +1003,5 @@ void MainWindow :: applyChanges() | |||
1018 | // do the stuff | 1003 | // do the stuff |
1019 | InstallDlgImpl dlg( workingPackages, mgr, this, "Install", true ); | 1004 | InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Apply changes" ) ); |
1020 | dlg.showDlg(); | 1005 | connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) ); |
1021 | 1006 | dlg->showMaximized(); | |
1022 | reloadData(); | ||
1023 | |||
1024 | #ifdef QWS | ||
1025 | // Finally let the main system update itself | ||
1026 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | ||
1027 | QString lf = QString::null; | ||
1028 | e << lf; | ||
1029 | #endif | ||
1030 | } | 1007 | } |
@@ -1152,7 +1129,24 @@ InstallData MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1152 | 1129 | ||
1153 | void MainWindow :: reloadData() | 1130 | void MainWindow :: reloadData( InstallDlgImpl *dlg ) |
1154 | { | 1131 | { |
1155 | stack->raiseWidget( progressWindow ); | 1132 | stack->raiseWidget( progressWindow ); |
1133 | |||
1134 | if ( dlg ) | ||
1135 | { | ||
1136 | dlg->close(); | ||
1137 | delete dlg; | ||
1138 | } | ||
1139 | |||
1156 | mgr->reloadServerData(); | 1140 | mgr->reloadServerData(); |
1157 | serverSelected( -1, FALSE ); | 1141 | serverSelected( -1, FALSE ); |
1142 | |||
1143 | #ifdef QWS | ||
1144 | m_status->setText( tr( "Updating Launcher..." ) ); | ||
1145 | |||
1146 | // Finally let the main system update itself | ||
1147 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | ||
1148 | QString lf = QString::null; | ||
1149 | e << lf; | ||
1150 | #endif | ||
1151 | |||
1158 | stack->raiseWidget( networkPkgWindow ); | 1152 | stack->raiseWidget( networkPkgWindow ); |
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h index b49c819..d0777fb 100644 --- a/noncore/settings/aqpkg/mainwin.h +++ b/noncore/settings/aqpkg/mainwin.h | |||
@@ -25,2 +25,3 @@ class DataManager; | |||
25 | class InstallData; | 25 | class InstallData; |
26 | class InstallDlgImpl; | ||
26 | 27 | ||
@@ -94,3 +95,2 @@ private: | |||
94 | InstallData dealWithItem( QCheckListItem *item ); | 95 | InstallData dealWithItem( QCheckListItem *item ); |
95 | void reloadData(); | ||
96 | 96 | ||
@@ -123,2 +123,3 @@ public slots: | |||
123 | void enableDownload( bool ); | 123 | void enableDownload( bool ); |
124 | void reloadData( InstallDlgImpl * ); | ||
124 | 125 | ||