author | drw <drw> | 2005-06-05 22:41:15 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-05 22:41:15 (UTC) |
commit | 56b8917e2cca3715e9a19941965ddd73e6bba5d4 (patch) (unidiff) | |
tree | 77f19a696d1cc4568083f38467390b59c5270da2 /noncore/settings/packagemanager/installdlg.cpp | |
parent | 31e8d6aad8220f747113870cfa10261435a2a162 (diff) | |
download | opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.zip opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.tar.gz opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'noncore/settings/packagemanager/installdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/installdlg.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp index 205d7ed..15d88ad 100644 --- a/noncore/settings/packagemanager/installdlg.cpp +++ b/noncore/settings/packagemanager/installdlg.cpp | |||
@@ -28,15 +28,15 @@ | |||
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "installdlg.h" | 31 | #include "installdlg.h" |
32 | 32 | ||
33 | #include <opie2/ofiledialog.h> | 33 | #include <opie2/ofiledialog.h> |
34 | #include <opie2/oresource.h> | ||
34 | 35 | ||
35 | #include <qpe/fileselector.h> | 36 | #include <qpe/fileselector.h> |
36 | #include <qpe/resource.h> | ||
37 | #include <qpe/storage.h> | 37 | #include <qpe/storage.h> |
38 | 38 | ||
39 | #include <qapplication.h> | 39 | #include <qapplication.h> |
40 | #include <qcombobox.h> | 40 | #include <qcombobox.h> |
41 | #include <qfileinfo.h> | 41 | #include <qfileinfo.h> |
42 | #include <qgroupbox.h> | 42 | #include <qgroupbox.h> |
@@ -127,21 +127,20 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
127 | QVBoxLayout *groupBoxLayout = new QVBoxLayout( groupBox->layout() ); | 127 | QVBoxLayout *groupBoxLayout = new QVBoxLayout( groupBox->layout() ); |
128 | m_output = new QMultiLineEdit( groupBox ); | 128 | m_output = new QMultiLineEdit( groupBox ); |
129 | m_output->setReadOnly( true ); | 129 | m_output->setReadOnly( true ); |
130 | groupBoxLayout->addWidget( m_output ); | 130 | groupBoxLayout->addWidget( m_output ); |
131 | layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 ); | 131 | layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 ); |
132 | 132 | ||
133 | QPixmap pic; | 133 | m_btnStart = new QPushButton( Opie::Core::OResource::loadPixmap( "packagemanager/apply", |
134 | pic.convertFromImage( Resource::loadImage( "packagemanager/apply" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 134 | Opie::Core::OResource::SmallIcon ), tr( "Start" ), this ); |
135 | m_btnStart = new QPushButton( pic, tr( "Start" ), this ); | ||
136 | m_btnStart->setMinimumHeight( AppLnk::smallIconSize() ); | 135 | m_btnStart->setMinimumHeight( AppLnk::smallIconSize() ); |
137 | layout->addWidget( m_btnStart, 3, 0 ); | 136 | layout->addWidget( m_btnStart, 3, 0 ); |
138 | connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) ); | 137 | connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) ); |
139 | 138 | ||
140 | pic.convertFromImage( Resource::loadImage( "SettingsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 139 | m_btnOptions = new QPushButton( Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), |
141 | m_btnOptions = new QPushButton( pic, tr( "Options" ), this ); | 140 | tr( "Options" ), this ); |
142 | m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() ); | 141 | m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() ); |
143 | layout->addWidget( m_btnOptions, 3, 1 ); | 142 | layout->addWidget( m_btnOptions, 3, 1 ); |
144 | connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) ); | 143 | connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) ); |
145 | 144 | ||
146 | // Display packages being acted upon in output widget | 145 | // Display packages being acted upon in output widget |
147 | for( int i = 0; i < m_numCommands; i++ ) | 146 | for( int i = 0; i < m_numCommands; i++ ) |
@@ -220,15 +219,13 @@ void InstallDlg::slotBtnStart() | |||
220 | { | 219 | { |
221 | // Prevent unexecuted commands from executing | 220 | // Prevent unexecuted commands from executing |
222 | m_currCommand = 999; | 221 | m_currCommand = 999; |
223 | 222 | ||
224 | // Allow user to close dialog | 223 | // Allow user to close dialog |
225 | m_btnStart->setText( tr( "Close" ) ); | 224 | m_btnStart->setText( tr( "Close" ) ); |
226 | QPixmap pic; | 225 | m_btnStart->setIconSet( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) ); |
227 | pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
228 | m_btnStart->setIconSet( pic ); | ||
229 | return; | 226 | return; |
230 | } | 227 | } |
231 | else if ( btnText == tr( "Close" ) ) | 228 | else if ( btnText == tr( "Close" ) ) |
232 | { | 229 | { |
233 | // TODO - force reload of package data | 230 | // TODO - force reload of package data |
234 | emit closeInstallDlg(); | 231 | emit closeInstallDlg(); |
@@ -244,15 +241,13 @@ void InstallDlg::slotBtnStart() | |||
244 | } | 241 | } |
245 | 242 | ||
246 | m_btnOptions->setEnabled( false ); | 243 | m_btnOptions->setEnabled( false ); |
247 | if ( m_numCommands > 1 ) | 244 | if ( m_numCommands > 1 ) |
248 | { | 245 | { |
249 | m_btnStart->setText( tr( "Abort" ) ); | 246 | m_btnStart->setText( tr( "Abort" ) ); |
250 | QPixmap pic; | 247 | m_btnStart->setIconSet( Opie::Core::OResource::loadPixmap( "reset", Opie::Core::OResource::SmallIcon ) ); |
251 | pic.convertFromImage( Resource::loadImage( "reset" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
252 | m_btnStart->setIconSet( pic ); | ||
253 | } | 248 | } |
254 | else | 249 | else |
255 | { | 250 | { |
256 | m_btnStart->setEnabled( false ); | 251 | m_btnStart->setEnabled( false ); |
257 | } | 252 | } |
258 | 253 | ||
@@ -263,20 +258,17 @@ void InstallDlg::slotBtnStart() | |||
263 | this, SLOT(slotOutput(const QString &)), true ); | 258 | this, SLOT(slotOutput(const QString &)), true ); |
264 | } | 259 | } |
265 | 260 | ||
266 | // All commands executed, allow user to close dialog | 261 | // All commands executed, allow user to close dialog |
267 | m_btnStart->setEnabled( true ); | 262 | m_btnStart->setEnabled( true ); |
268 | m_btnStart->setText( tr( "Close" ) ); | 263 | m_btnStart->setText( tr( "Close" ) ); |
269 | QPixmap pic; | 264 | m_btnStart->setIconSet( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) ); |
270 | pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
271 | m_btnStart->setIconSet( pic ); | ||
272 | 265 | ||
273 | m_btnOptions->setEnabled( true ); | 266 | m_btnOptions->setEnabled( true ); |
274 | m_btnOptions->setText( tr( "Save output" ) ); | 267 | m_btnOptions->setText( tr( "Save output" ) ); |
275 | pic.convertFromImage( Resource::loadImage( "save" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 268 | m_btnOptions->setIconSet( Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ) ); |
276 | m_btnOptions->setIconSet( pic ); | ||
277 | } | 269 | } |
278 | 270 | ||
279 | void InstallDlg::slotBtnOptions() | 271 | void InstallDlg::slotBtnOptions() |
280 | { | 272 | { |
281 | QString btnText = m_btnOptions->text(); | 273 | QString btnText = m_btnOptions->text(); |
282 | if ( btnText == tr( "Options" ) ) | 274 | if ( btnText == tr( "Options" ) ) |