Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 5ccd3c3..0141359 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -54,6 +54,9 @@ MainWindow :: MainWindow( QWidget *p, char *name ) | |||
54 | mnuShowUninstalledPkgsId = filter->insertItem( "Show &Uninstalled Packages", this, SLOT(filterUninstalledPackages()), Qt::CTRL+Qt::Key_U ); | 54 | mnuShowUninstalledPkgsId = filter->insertItem( "Show &Uninstalled Packages", this, SLOT(filterUninstalledPackages()), Qt::CTRL+Qt::Key_U ); |
55 | mnuShowInstalledPkgsId = filter->insertItem( "Show In&stalled Packages", this, SLOT(filterInstalledPackages()), Qt::CTRL+Qt::Key_S ); | 55 | mnuShowInstalledPkgsId = filter->insertItem( "Show In&stalled Packages", this, SLOT(filterInstalledPackages()), Qt::CTRL+Qt::Key_S ); |
56 | mnuShowUpgradedPkgsId = filter->insertItem( "Show U&pdated Packages", this, SLOT(filterUpgradedPackages()), Qt::CTRL+Qt::Key_P ); | 56 | mnuShowUpgradedPkgsId = filter->insertItem( "Show U&pdated Packages", this, SLOT(filterUpgradedPackages()), Qt::CTRL+Qt::Key_P ); |
57 | filter->insertSeparator(); | ||
58 | mnuFilterByCategory = filter->insertItem( "Filter By &Category", this, SLOT(filterCategory()), Qt::CTRL+Qt::Key_C ); | ||
59 | mnuSetFilterCategory = filter->insertItem( "Set Filter C&ategory", this, SLOT(setFilterCategory()), Qt::CTRL+Qt::Key_A ); | ||
57 | 60 | ||
58 | // Create the main menu | 61 | // Create the main menu |
59 | menu = menuBar(); //new QMenuBar( this ); | 62 | menu = menuBar(); //new QMenuBar( this ); |
@@ -184,3 +187,23 @@ void MainWindow :: filterUpgradedPackages() | |||
184 | 187 | ||
185 | networkPkgWindow->showUpgradedPackages( val ); | 188 | networkPkgWindow->showUpgradedPackages( val ); |
186 | } | 189 | } |
190 | |||
191 | void MainWindow :: setFilterCategory() | ||
192 | { | ||
193 | if ( networkPkgWindow->setFilterCategory( ) ) | ||
194 | filter->setItemChecked( mnuFilterByCategory, true ); | ||
195 | } | ||
196 | |||
197 | void MainWindow :: filterCategory() | ||
198 | { | ||
199 | if ( filter->isItemChecked( mnuFilterByCategory ) ) | ||
200 | { | ||
201 | networkPkgWindow->filterByCategory( false ); | ||
202 | filter->setItemChecked( mnuFilterByCategory, false ); | ||
203 | } | ||
204 | else | ||
205 | { | ||
206 | if ( networkPkgWindow->filterByCategory( true ) ) | ||
207 | filter->setItemChecked( mnuFilterByCategory, true ); | ||
208 | } | ||
209 | } \ No newline at end of file | ||