summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index e489d2d..1a2ac37 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -1,291 +1,291 @@
1/*************************************************************************** 1/***************************************************************************
2 mainwin.cpp - description 2 mainwin.cpp - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 13:32:30 BST 2002 4 begin : Mon Aug 26 13:32:30 BST 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include <iostream> 18#include <iostream>
19using namespace std; 19using namespace std;
20 20
21#include <qpe/qpemenubar.h> 21#include <qpe/qpemenubar.h>
22#include <qpe/qpetoolbar.h> 22#include <qpe/qpetoolbar.h>
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24 24
25#include <qaction.h> 25#include <qaction.h>
26#include <qlineedit.h> 26#include <qlineedit.h>
27#include <qmenubar.h> 27#include <qmenubar.h>
28#include <qmessagebox.h> 28#include <qmessagebox.h>
29#include <qpopupmenu.h> 29#include <qpopupmenu.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qwhatsthis.h> 31#include <qwhatsthis.h>
32#include <qwidgetstack.h> 32#include <qwidgetstack.h>
33 33
34#include "mainwin.h" 34#include "mainwin.h"
35#include "progresswidget.h" 35#include "progresswidget.h"
36#include "datamgr.h" 36#include "datamgr.h"
37#include "networkpkgmgr.h" 37#include "networkpkgmgr.h"
38#include "settingsimpl.h" 38#include "settingsimpl.h"
39#include "helpwindow.h" 39#include "helpwindow.h"
40#include "utils.h" 40#include "utils.h"
41#include "global.h" 41#include "global.h"
42 42
43MainWindow :: MainWindow() 43MainWindow :: MainWindow()
44 :QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) 44 :QMainWindow( 0x0, 0x0, WStyle_ContextHelp )
45{ 45{
46 setCaption( tr( "AQPkg - Package Manager" ) ); 46 setCaption( tr( "AQPkg - Package Manager" ) );
47 47
48 // Create UI widgets 48 // Create UI widgets
49 progressWindow = new ProgressWidget( this ); 49 progressWindow = new ProgressWidget( this );
50 networkPkgWindow = new NetworkPackageManager( this ); 50 networkPkgWindow = new NetworkPackageManager( this );
51 51
52 // Build menu and tool bars 52 // Build menu and tool bars
53 setToolBarsMovable( FALSE ); 53 setToolBarsMovable( FALSE );
54 54
55 QPEToolBar *bar = new QPEToolBar( this ); 55 QPEToolBar *bar = new QPEToolBar( this );
56 bar->setHorizontalStretchable( TRUE ); 56 bar->setHorizontalStretchable( TRUE );
57 QPEMenuBar *mb = new QPEMenuBar( bar ); 57 QPEMenuBar *mb = new QPEMenuBar( bar );
58 mb->setMargin( 0 ); 58 mb->setMargin( 0 );
59 bar = new QPEToolBar( this ); 59 bar = new QPEToolBar( this );
60 60
61 // Find toolbar 61 // Find toolbar
62 findBar = new QPEToolBar( this ); 62 findBar = new QPEToolBar( this );
63 addToolBar( findBar, QMainWindow::Top, true ); 63 addToolBar( findBar, QMainWindow::Top, true );
64 findBar->setHorizontalStretchable( true ); 64 findBar->setHorizontalStretchable( true );
65 findEdit = new QLineEdit( findBar ); 65 findEdit = new QLineEdit( findBar );
66 QWhatsThis::add( findEdit, tr( "Type the text to search for here." ) ); 66 QWhatsThis::add( findEdit, tr( "Type the text to search for here." ) );
67 findBar->setStretchableWidget( findEdit ); 67 findBar->setStretchableWidget( findEdit );
68 connect( findEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( findPackage( const QString & ) ) ); 68 connect( findEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( findPackage( const QString & ) ) );
69 69
70 // Packages menu 70 // Packages menu
71 QPopupMenu *popup = new QPopupMenu( this ); 71 QPopupMenu *popup = new QPopupMenu( this );
72 72
73 QAction *a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 ); 73 QAction *a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 );
74 a->setWhatsThis( tr( "Click here to update package lists from servers." ) ); 74 a->setWhatsThis( tr( "Click here to update package lists from servers." ) );
75 connect( a, SIGNAL( activated() ), networkPkgWindow, SLOT( updateServer() ) ); 75 connect( a, SIGNAL( activated() ), networkPkgWindow, SLOT( updateServer() ) );
76 a->addTo( popup ); 76 a->addTo( popup );
77 a->addTo( bar ); 77 a->addTo( bar );
78 78
79 actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "aqpkg/upgrade" ), QString::null, 0, this, 0 ); 79 actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "aqpkg/upgrade" ), QString::null, 0, this, 0 );
80 actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) ); 80 actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) );
81 connect( actionUpgrade, SIGNAL( activated() ), networkPkgWindow, SLOT( upgradePackages() ) ); 81 connect( actionUpgrade, SIGNAL( activated() ), networkPkgWindow, SLOT( upgradePackages() ) );
82 actionUpgrade->addTo( popup ); 82 actionUpgrade->addTo( popup );
83 actionUpgrade->addTo( bar ); 83 actionUpgrade->addTo( bar );
84 84
85 iconDownload = Resource::loadPixmap( "aqpkg/download" ); 85 iconDownload = Resource::loadPixmap( "aqpkg/download" );
86 iconRemove = Resource::loadPixmap( "aqpkg/remove" ); 86 iconRemove = Resource::loadPixmap( "aqpkg/remove" );
87 actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); 87 actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 );
88 actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) ); 88 actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) );
89 connect( actionDownload, SIGNAL( activated() ), networkPkgWindow, SLOT( downloadPackage() ) ); 89 connect( actionDownload, SIGNAL( activated() ), networkPkgWindow, SLOT( downloadPackage() ) );
90 actionDownload->addTo( popup ); 90 actionDownload->addTo( popup );
91 actionDownload->addTo( bar ); 91 actionDownload->addTo( bar );
92 92
93 a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "aqpkg/apply" ), QString::null, 0, this, 0 ); 93 a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "aqpkg/apply" ), QString::null, 0, this, 0 );
94 a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) ); 94 a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) );
95 connect( a, SIGNAL( activated() ), networkPkgWindow, SLOT( applyChanges() ) ); 95 connect( a, SIGNAL( activated() ), networkPkgWindow, SLOT( applyChanges() ) );
96 a->addTo( popup ); 96 a->addTo( popup );
97 a->addTo( bar ); 97 a->addTo( bar );
98 98
99 mb->insertItem( tr( "Packages" ), popup ); 99 mb->insertItem( tr( "Actions" ), popup );
100 100
101 // View menu 101 // View menu
102 popup = new QPopupMenu( this ); 102 popup = new QPopupMenu( this );
103 103
104 actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); 104 actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 );
105 actionUninstalled->setToggleAction( TRUE ); 105 actionUninstalled->setToggleAction( TRUE );
106 actionUninstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) ); 106 actionUninstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) );
107 connect( actionUninstalled, SIGNAL( activated() ), this, SLOT( filterUninstalledPackages() ) ); 107 connect( actionUninstalled, SIGNAL( activated() ), this, SLOT( filterUninstalledPackages() ) );
108 actionUninstalled->addTo( popup ); 108 actionUninstalled->addTo( popup );
109 109
110 actionInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 ); 110 actionInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 );
111 actionInstalled->setToggleAction( TRUE ); 111 actionInstalled->setToggleAction( TRUE );
112 actionInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) ); 112 actionInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) );
113 connect( actionInstalled, SIGNAL( activated() ), this, SLOT( filterInstalledPackages() ) ); 113 connect( actionInstalled, SIGNAL( activated() ), this, SLOT( filterInstalledPackages() ) );
114 actionInstalled->addTo( popup ); 114 actionInstalled->addTo( popup );
115 115
116 actionUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 ); 116 actionUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 );
117 actionUpdated->setToggleAction( TRUE ); 117 actionUpdated->setToggleAction( TRUE );
118 actionUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) ); 118 actionUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) );
119 connect( actionUpdated, SIGNAL( activated() ), this, SLOT( filterUpgradedPackages() ) ); 119 connect( actionUpdated, SIGNAL( activated() ), this, SLOT( filterUpgradedPackages() ) );
120 actionUpdated->addTo( popup ); 120 actionUpdated->addTo( popup );
121 121
122 popup->insertSeparator(); 122 popup->insertSeparator();
123 123
124 actionFilter = new QAction( tr( "Filter by category" ), Resource::loadPixmap( "aqpkg/filter" ), QString::null, 0, this, 0 ); 124 actionFilter = new QAction( tr( "Filter by category" ), Resource::loadPixmap( "aqpkg/filter" ), QString::null, 0, this, 0 );
125 actionFilter->setToggleAction( TRUE ); 125 actionFilter->setToggleAction( TRUE );
126 actionFilter->setWhatsThis( tr( "Click here to list packages belonging to one category." ) ); 126 actionFilter->setWhatsThis( tr( "Click here to list packages belonging to one category." ) );
127 connect( actionFilter, SIGNAL( activated() ), this, SLOT( filterCategory() ) ); 127 connect( actionFilter, SIGNAL( activated() ), this, SLOT( filterCategory() ) );
128 actionFilter->addTo( popup ); 128 actionFilter->addTo( popup );
129 129
130 a = new QAction( tr( "Set filter category" ), QString::null, 0, this, 0 ); 130 a = new QAction( tr( "Set filter category" ), QString::null, 0, this, 0 );
131 a->setWhatsThis( tr( "Click here to change package category to used filter." ) ); 131 a->setWhatsThis( tr( "Click here to change package category to used filter." ) );
132 connect( a, SIGNAL( activated() ), this, SLOT( setFilterCategory() ) ); 132 connect( a, SIGNAL( activated() ), this, SLOT( setFilterCategory() ) );
133 a->addTo( popup ); 133 a->addTo( popup );
134 134
135 popup->insertSeparator(); 135 popup->insertSeparator();
136 136
137 a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); 137 a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 );
138 a->setWhatsThis( tr( "Click here to search for text in package names." ) ); 138 a->setWhatsThis( tr( "Click here to search for text in package names." ) );
139 connect( a, SIGNAL( activated() ), this, SLOT( displayFindBar() ) ); 139 connect( a, SIGNAL( activated() ), this, SLOT( displayFindBar() ) );
140 a->addTo( popup ); 140 a->addTo( popup );
141 141
142 actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); 142 actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 );
143 actionFindNext->setEnabled( FALSE ); 143 actionFindNext->setEnabled( FALSE );
144 actionFindNext->setWhatsThis( tr( "Click here to find the next package name containing the text you are searching for." ) ); 144 actionFindNext->setWhatsThis( tr( "Click here to find the next package name containing the text you are searching for." ) );
145 connect( actionFindNext, SIGNAL( activated() ), this, SLOT( repeatFind() ) ); 145 connect( actionFindNext, SIGNAL( activated() ), this, SLOT( repeatFind() ) );
146 actionFindNext->addTo( popup ); 146 actionFindNext->addTo( popup );
147 actionFindNext->addTo( findBar ); 147 actionFindNext->addTo( findBar );
148 148
149 mb->insertItem( tr( "View" ), popup ); 149 mb->insertItem( tr( "View" ), popup );
150 150
151 151
152 // Options menu 152 // Options menu
153 popup = new QPopupMenu( this ); 153 popup = new QPopupMenu( this );
154 154
155 a = new QAction( tr( "Configure" ), Resource::loadPixmap( "aqpkg/config" ), QString::null, 0, this, 0 ); 155 a = new QAction( tr( "Configure" ), Resource::loadPixmap( "aqpkg/config" ), QString::null, 0, this, 0 );
156 a->setWhatsThis( tr( "Click here to configure this application." ) ); 156 a->setWhatsThis( tr( "Click here to configure this application." ) );
157 connect( a, SIGNAL( activated() ), this, SLOT( displaySettings() ) ); 157 connect( a, SIGNAL( activated() ), this, SLOT( displaySettings() ) );
158 a->addTo( popup ); 158 a->addTo( popup );
159 159
160 popup->insertSeparator(); 160 popup->insertSeparator();
161 161
162 a = new QAction( tr( "Help" ), Resource::loadPixmap( "help_icon" ), QString::null, 0, this, 0 ); 162 a = new QAction( tr( "Help" ), Resource::loadPixmap( "help_icon" ), QString::null, 0, this, 0 );
163 a->setWhatsThis( tr( "Click here for help." ) ); 163 a->setWhatsThis( tr( "Click here for help." ) );
164 connect( a, SIGNAL( activated() ), this, SLOT( displayHelp() ) ); 164 connect( a, SIGNAL( activated() ), this, SLOT( displayHelp() ) );
165 a->addTo( popup ); 165 a->addTo( popup );
166 166
167 a = new QAction( tr( "About" ), Resource::loadPixmap( "UtilsIcon" ), QString::null, 0, this, 0 ); 167 a = new QAction( tr( "About" ), Resource::loadPixmap( "UtilsIcon" ), QString::null, 0, this, 0 );
168 a->setWhatsThis( tr( "Click here for software version information." ) ); 168 a->setWhatsThis( tr( "Click here for software version information." ) );
169 connect( a, SIGNAL( activated() ), this, SLOT( displayAbout() ) ); 169 connect( a, SIGNAL( activated() ), this, SLOT( displayAbout() ) );
170 a->addTo( popup ); 170 a->addTo( popup );
171 171
172 mb->insertItem( tr( "Options" ), popup ); 172 mb->insertItem( tr( "Options" ), popup );
173 173
174 // Finish find toolbar creation 174 // Finish find toolbar creation
175 a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 175 a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
176 a->setWhatsThis( tr( "Click here to hide the find toolbar." ) ); 176 a->setWhatsThis( tr( "Click here to hide the find toolbar." ) );
177 connect( a, SIGNAL( activated() ), this, SLOT( hideFindBar() ) ); 177 connect( a, SIGNAL( activated() ), this, SLOT( hideFindBar() ) );
178 a->addTo( findBar ); 178 a->addTo( findBar );
179 findBar->hide(); 179 findBar->hide();
180 180
181 181
182 // Create widget stack and add UI widgets 182 // Create widget stack and add UI widgets
183 stack = new QWidgetStack( this ); 183 stack = new QWidgetStack( this );
184 stack->addWidget( progressWindow, 2 ); 184 stack->addWidget( progressWindow, 2 );
185 stack->addWidget( networkPkgWindow, 1 ); 185 stack->addWidget( networkPkgWindow, 1 );
186 setCentralWidget( stack ); 186 setCentralWidget( stack );
187 stack->raiseWidget( progressWindow ); 187 stack->raiseWidget( progressWindow );
188 188
189 // Delayed call to finish initialization 189 // Delayed call to finish initialization
190 QTimer::singleShot( 100, this, SLOT( init() ) ); 190 QTimer::singleShot( 100, this, SLOT( init() ) );
191} 191}
192 192
193MainWindow :: ~MainWindow() 193MainWindow :: ~MainWindow()
194{ 194{
195 delete mgr; 195 delete mgr;
196} 196}
197 197
198void MainWindow :: init() 198void MainWindow :: init()
199{ 199{
200 stack->raiseWidget( progressWindow ); 200 stack->raiseWidget( progressWindow );
201 201
202 mgr = new DataManager(); 202 mgr = new DataManager();
203 connect( mgr, SIGNAL( progressSetSteps( int ) ), progressWindow, SLOT( setSteps( int ) ) ); 203 connect( mgr, SIGNAL( progressSetSteps( int ) ), progressWindow, SLOT( setSteps( int ) ) );
204 connect( mgr, SIGNAL( progressSetMessage( const QString & ) ), 204 connect( mgr, SIGNAL( progressSetMessage( const QString & ) ),
205 progressWindow, SLOT( setMessage( const QString & ) ) ); 205 progressWindow, SLOT( setMessage( const QString & ) ) );
206 connect( mgr, SIGNAL( progressUpdate( int ) ), progressWindow, SLOT( update( int ) ) ); 206 connect( mgr, SIGNAL( progressUpdate( int ) ), progressWindow, SLOT( update( int ) ) );
207 mgr->loadServers(); 207 mgr->loadServers();
208 208
209 networkPkgWindow->setDataManager( mgr ); 209 networkPkgWindow->setDataManager( mgr );
210 networkPkgWindow->updateData(); 210 networkPkgWindow->updateData();
211 connect( networkPkgWindow, SIGNAL( appRaiseMainWidget() ), this, SLOT( raiseMainWidget() ) ); 211 connect( networkPkgWindow, SIGNAL( appRaiseMainWidget() ), this, SLOT( raiseMainWidget() ) );
212 connect( networkPkgWindow, SIGNAL( appRaiseProgressWidget() ), this, SLOT( raiseProgressWidget() ) ); 212 connect( networkPkgWindow, SIGNAL( appRaiseProgressWidget() ), this, SLOT( raiseProgressWidget() ) );
213 connect( networkPkgWindow, SIGNAL( appEnableUpgrade( bool ) ), this, SLOT( enableUpgrade( bool ) ) ); 213 connect( networkPkgWindow, SIGNAL( appEnableUpgrade( bool ) ), this, SLOT( enableUpgrade( bool ) ) );
214 connect( networkPkgWindow, SIGNAL( appEnableDownload( bool ) ), this, SLOT( enableDownload( bool ) ) ); 214 connect( networkPkgWindow, SIGNAL( appEnableDownload( bool ) ), this, SLOT( enableDownload( bool ) ) );
215 connect( networkPkgWindow, SIGNAL( progressSetSteps( int ) ), progressWindow, SLOT( setSteps( int ) ) ); 215 connect( networkPkgWindow, SIGNAL( progressSetSteps( int ) ), progressWindow, SLOT( setSteps( int ) ) );
216 connect( networkPkgWindow, SIGNAL( progressSetMessage( const QString & ) ), 216 connect( networkPkgWindow, SIGNAL( progressSetMessage( const QString & ) ),
217 progressWindow, SLOT( setMessage( const QString & ) ) ); 217 progressWindow, SLOT( setMessage( const QString & ) ) );
218 connect( networkPkgWindow, SIGNAL( progressUpdate( int ) ), progressWindow, SLOT( update( int ) ) ); 218 connect( networkPkgWindow, SIGNAL( progressUpdate( int ) ), progressWindow, SLOT( update( int ) ) );
219 219
220 stack->raiseWidget( networkPkgWindow ); 220 stack->raiseWidget( networkPkgWindow );
221} 221}
222 222
223void MainWindow :: setDocument( const QString &doc ) 223void MainWindow :: setDocument( const QString &doc )
224{ 224{
225 // Remove path from package 225 // Remove path from package
226 QString package = Utils::getPackageNameFromIpkFilename( doc ); 226 QString package = Utils::getPackageNameFromIpkFilename( doc );
227 std::cout << "Selecting package " << package << std::endl; 227 std::cout << "Selecting package " << package << std::endl;
228 networkPkgWindow->selectLocalPackage( package ); 228 networkPkgWindow->selectLocalPackage( package );
229} 229}
230 230
231void MainWindow :: displaySettings() 231void MainWindow :: displaySettings()
232{ 232{
233 SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true ); 233 SettingsImpl *dlg = new SettingsImpl( mgr, this, "Settings", true );
234 if ( dlg->showDlg( 0 ) ) 234 if ( dlg->showDlg( 0 ) )
235 networkPkgWindow->updateData(); 235 networkPkgWindow->updateData();
236 delete dlg; 236 delete dlg;
237} 237}
238 238
239void MainWindow :: displayHelp() 239void MainWindow :: displayHelp()
240{ 240{
241 HelpWindow *dlg = new HelpWindow( this ); 241 HelpWindow *dlg = new HelpWindow( this );
242 dlg->exec(); 242 dlg->exec();
243 delete dlg; 243 delete dlg;
244} 244}
245 245
246void MainWindow :: displayFindBar() 246void MainWindow :: displayFindBar()
247{ 247{
248 findBar->show(); 248 findBar->show();
249 findEdit->setFocus(); 249 findEdit->setFocus();
250} 250}
251 251
252void MainWindow :: repeatFind() 252void MainWindow :: repeatFind()
253{ 253{
254 networkPkgWindow->searchForPackage( findEdit->text() ); 254 networkPkgWindow->searchForPackage( findEdit->text() );
255} 255}
256 256
257void MainWindow :: findPackage( const QString &text ) 257void MainWindow :: findPackage( const QString &text )
258{ 258{
259 actionFindNext->setEnabled( !text.isEmpty() ); 259 actionFindNext->setEnabled( !text.isEmpty() );
260 networkPkgWindow->searchForPackage( text ); 260 networkPkgWindow->searchForPackage( text );
261} 261}
262 262
263void MainWindow :: hideFindBar() 263void MainWindow :: hideFindBar()
264{ 264{
265 findBar->hide(); 265 findBar->hide();
266} 266}
267 267
268void MainWindow :: displayAbout() 268void MainWindow :: displayAbout()
269{ 269{
270 QMessageBox::about( this, tr( "About AQPkg" ), tr( VERSION_TEXT ) ); 270 QMessageBox::about( this, tr( "About AQPkg" ), tr( VERSION_TEXT ) );
271} 271}
272 272
273void MainWindow :: filterUninstalledPackages() 273void MainWindow :: filterUninstalledPackages()
274{ 274{
275 networkPkgWindow->showOnlyUninstalledPackages( actionUninstalled->isOn() ); 275 networkPkgWindow->showOnlyUninstalledPackages( actionUninstalled->isOn() );
276 actionInstalled->setOn( FALSE ); 276 actionInstalled->setOn( FALSE );
277 actionUpdated->setOn( FALSE ); 277 actionUpdated->setOn( FALSE );
278} 278}
279 279
280void MainWindow :: filterInstalledPackages() 280void MainWindow :: filterInstalledPackages()
281{ 281{
282 actionUninstalled->setOn( FALSE ); 282 actionUninstalled->setOn( FALSE );
283 networkPkgWindow->showOnlyInstalledPackages( actionInstalled->isOn() ); 283 networkPkgWindow->showOnlyInstalledPackages( actionInstalled->isOn() );
284 actionUpdated->setOn( FALSE ); 284 actionUpdated->setOn( FALSE );
285} 285}
286 286
287void MainWindow :: filterUpgradedPackages() 287void MainWindow :: filterUpgradedPackages()
288{ 288{
289 actionUninstalled->setOn( FALSE ); 289 actionUninstalled->setOn( FALSE );
290 actionInstalled->setOn( FALSE ); 290 actionInstalled->setOn( FALSE );
291 networkPkgWindow->showUpgradedPackages( actionUpdated->isOn() ); 291 networkPkgWindow->showUpgradedPackages( actionUpdated->isOn() );