Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 8ae5815..392d04d 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -34,25 +34,24 @@ | |||
34 | #include <qlistview.h> | 34 | #include <qlistview.h> |
35 | #include <qmenubar.h> | 35 | #include <qmenubar.h> |
36 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
37 | #include <qpopupmenu.h> | 37 | #include <qpopupmenu.h> |
38 | #include <qprogressbar.h> | 38 | #include <qprogressbar.h> |
39 | #include <qtimer.h> | 39 | #include <qtimer.h> |
40 | #include <qwhatsthis.h> | 40 | #include <qwhatsthis.h> |
41 | #include <qwidgetstack.h> | 41 | #include <qwidgetstack.h> |
42 | 42 | ||
43 | #include "categoryfilterimpl.h" | 43 | #include "categoryfilterimpl.h" |
44 | #include "datamgr.h" | 44 | #include "datamgr.h" |
45 | #include "global.h" | 45 | #include "global.h" |
46 | #include "helpwindow.h" | ||
47 | #include "inputdlg.h" | 46 | #include "inputdlg.h" |
48 | #include "ipkg.h" | 47 | #include "ipkg.h" |
49 | #include "installdlgimpl.h" | 48 | #include "installdlgimpl.h" |
50 | #include "letterpushbutton.h" | 49 | #include "letterpushbutton.h" |
51 | #include "mainwin.h" | 50 | #include "mainwin.h" |
52 | #include "settingsimpl.h" | 51 | #include "settingsimpl.h" |
53 | #include "utils.h" | 52 | #include "utils.h" |
54 | 53 | ||
55 | extern int compareVersions( const char *v1, const char *v2 ); | 54 | extern int compareVersions( const char *v1, const char *v2 ); |
56 | 55 | ||
57 | MainWindow :: MainWindow() | 56 | MainWindow :: MainWindow() |
58 | :QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) | 57 | :QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) |
@@ -195,36 +194,24 @@ MainWindow :: MainWindow() | |||
195 | 194 | ||
196 | mb->insertItem( tr( "View" ), popup ); | 195 | mb->insertItem( tr( "View" ), popup ); |
197 | 196 | ||
198 | 197 | ||
199 | // Options menu | 198 | // Options menu |
200 | popup = new QPopupMenu( this ); | 199 | popup = new QPopupMenu( this ); |
201 | 200 | ||
202 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "aqpkg/config" ), QString::null, 0, this, 0 ); | 201 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "aqpkg/config" ), QString::null, 0, this, 0 ); |
203 | a->setWhatsThis( tr( "Click here to configure this application." ) ); | 202 | a->setWhatsThis( tr( "Click here to configure this application." ) ); |
204 | connect( a, SIGNAL( activated() ), this, SLOT( displaySettings() ) ); | 203 | connect( a, SIGNAL( activated() ), this, SLOT( displaySettings() ) ); |
205 | a->addTo( popup ); | 204 | a->addTo( popup ); |
206 | 205 | ||
207 | popup->insertSeparator(); | ||
208 | |||
209 | a = new QAction( tr( "Help" ), Resource::loadPixmap( "help_icon" ), QString::null, 0, this, 0 ); | ||
210 | a->setWhatsThis( tr( "Click here for help." ) ); | ||
211 | connect( a, SIGNAL( activated() ), this, SLOT( displayHelp() ) ); | ||
212 | a->addTo( popup ); | ||
213 | |||
214 | a = new QAction( tr( "About" ), Resource::loadPixmap( "UtilsIcon" ), QString::null, 0, this, 0 ); | ||
215 | a->setWhatsThis( tr( "Click here for software version information." ) ); | ||
216 | connect( a, SIGNAL( activated() ), this, SLOT( displayAbout() ) ); | ||
217 | a->addTo( popup ); | ||
218 | |||
219 | mb->insertItem( tr( "Options" ), popup ); | 206 | mb->insertItem( tr( "Options" ), popup ); |
220 | 207 | ||
221 | // Finish find toolbar creation | 208 | // Finish find toolbar creation |
222 | a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 209 | a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
223 | a->setWhatsThis( tr( "Click here to hide the find toolbar." ) ); | 210 | a->setWhatsThis( tr( "Click here to hide the find toolbar." ) ); |
224 | connect( a, SIGNAL( activated() ), this, SLOT( hideFindBar() ) ); | 211 | connect( a, SIGNAL( activated() ), this, SLOT( hideFindBar() ) ); |
225 | a->addTo( findBar ); | 212 | a->addTo( findBar ); |
226 | findBar->hide(); | 213 | findBar->hide(); |
227 | 214 | ||
228 | // Create widget stack and add UI widgets | 215 | // Create widget stack and add UI widgets |
229 | stack = new QWidgetStack( this ); | 216 | stack = new QWidgetStack( this ); |
230 | stack->addWidget( progressWindow, 2 ); | 217 | stack->addWidget( progressWindow, 2 ); |
@@ -345,31 +332,24 @@ void MainWindow :: setDocument( const QString &doc ) | |||
345 | void MainWindow :: displaySettings() | 332 | void MainWindow :: displaySettings() |
346 | { | 333 | { |
347 | SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true ); | 334 | SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true ); |
348 | if ( dlg->showDlg() ) | 335 | if ( dlg->showDlg() ) |
349 | { | 336 | { |
350 | stack->raiseWidget( progressWindow ); | 337 | stack->raiseWidget( progressWindow ); |
351 | updateData(); | 338 | updateData(); |
352 | stack->raiseWidget( networkPkgWindow ); | 339 | stack->raiseWidget( networkPkgWindow ); |
353 | } | 340 | } |
354 | delete dlg; | 341 | delete dlg; |
355 | } | 342 | } |
356 | 343 | ||
357 | void MainWindow :: displayHelp() | ||
358 | { | ||
359 | HelpWindow *dlg = new HelpWindow( this ); | ||
360 | dlg->exec(); | ||
361 | delete dlg; | ||
362 | } | ||
363 | |||
364 | void MainWindow :: displayFindBar() | 344 | void MainWindow :: displayFindBar() |
365 | { | 345 | { |
366 | findBar->show(); | 346 | findBar->show(); |
367 | findEdit->setFocus(); | 347 | findEdit->setFocus(); |
368 | } | 348 | } |
369 | 349 | ||
370 | void MainWindow :: displayJumpBar() | 350 | void MainWindow :: displayJumpBar() |
371 | { | 351 | { |
372 | jumpBar->show(); | 352 | jumpBar->show(); |
373 | } | 353 | } |
374 | 354 | ||
375 | void MainWindow :: repeatFind() | 355 | void MainWindow :: repeatFind() |
@@ -384,29 +364,24 @@ void MainWindow :: findPackage( const QString &text ) | |||
384 | } | 364 | } |
385 | 365 | ||
386 | void MainWindow :: hideFindBar() | 366 | void MainWindow :: hideFindBar() |
387 | { | 367 | { |
388 | findBar->hide(); | 368 | findBar->hide(); |
389 | } | 369 | } |
390 | 370 | ||
391 | void MainWindow :: hideJumpBar() | 371 | void MainWindow :: hideJumpBar() |
392 | { | 372 | { |
393 | jumpBar->hide(); | 373 | jumpBar->hide(); |
394 | } | 374 | } |
395 | 375 | ||
396 | void MainWindow :: displayAbout() | ||
397 | { | ||
398 | QMessageBox::about( this, tr( "About AQPkg" ), tr( VERSION_TEXT ) ); | ||
399 | } | ||
400 | |||
401 | void MainWindow :: filterUninstalledPackages() | 376 | void MainWindow :: filterUninstalledPackages() |
402 | { | 377 | { |
403 | showUninstalledPkgs = actionUninstalled->isOn(); | 378 | showUninstalledPkgs = actionUninstalled->isOn(); |
404 | if ( showUninstalledPkgs ) | 379 | if ( showUninstalledPkgs ) |
405 | { | 380 | { |
406 | showInstalledPkgs = FALSE; | 381 | showInstalledPkgs = FALSE; |
407 | showUpgradedPkgs = FALSE; | 382 | showUpgradedPkgs = FALSE; |
408 | } | 383 | } |
409 | serverSelected( -1 ); | 384 | serverSelected( -1 ); |
410 | 385 | ||
411 | actionInstalled->setOn( FALSE ); | 386 | actionInstalled->setOn( FALSE ); |
412 | actionUpdated->setOn( FALSE ); | 387 | actionUpdated->setOn( FALSE ); |