libyui-qt-pkg
YQPackageSelector.h
1 /**************************************************************************
2 Copyright (C) 2000 - 2010 Novell, Inc.
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 **************************************************************************/
20 
21 
22 
23 /*---------------------------------------------------------------------\
24 | |
25 | __ __ ____ _____ ____ |
26 | \ \ / /_ _/ ___|_ _|___ \ |
27 | \ V / _` \___ \ | | __) | |
28 | | | (_| |___) || | / __/ |
29 | |_|\__,_|____/ |_| |_____| |
30 | |
31 | core system |
32 | (C) SuSE GmbH |
33 \----------------------------------------------------------------------/
34 
35  File: YQPackageSelector.h
36 
37  Author: Stefan Hundhammer <shundhammer.de>
38 
39 /-*/
40 
41 
42 #ifndef YQPackageSelector_h
43 #define YQPackageSelector_h
44 
45 #include <QColor>
46 #include <QLabel>
47 #include <QMenu>
48 
49 #include "YQPackageSelectorBase.h"
50 #include "YQPkgObjList.h"
51 
52 class QCheckBox;
53 class QComboBox;
54 class QLabel;
55 class QListWidget;
56 class QProgressBar;
57 class QPushButton;
58 class QSplitter;
59 class QTabWidget;
60 class QMenu;
61 class QMenuBar;
62 
63 class QY2ComboTabWidget;
64 
65 class YQPkgChangeLogView;
68 class YQPkgFileListView;
69 class YQPkgFilterTab;
70 class YQPkgLangList;
71 class YQPkgList;
74 class YQPkgPatchList;
75 class YQPkgPatternList;
78 class YQPkgSelList;
83 class YQPkgVersionsView;
84 
86 {
87  Q_OBJECT
88 
89 public:
90 
91  YQPackageSelector( YWidget * parent, long modeFlags = 0 );
93 
94 
95 public slots:
96 
103 
109 
113  void pkgExport();
114 
118  void pkgImport();
119 
124  void installDevelPkgs();
125 
130  void installDebugInfoPkgs();
131 
136  void installDebugSourcePkgs();
137 
141  void installRecommendedPkgs();
142 
147  void installSubPkgs( const QString & suffix );
148 
154  void pkgExcludeDebugChanged( bool on );
155  void pkgExcludeDevelChanged( bool on );
156 
157 
158  /*
159  * Enable or disable verify system mode of the solver
160  */
161  void pkgVerifySytemModeChanged( bool on );
162 
163  /*
164  * Install recommended packages
165  */
166  void pkgInstallRecommendedChanged( bool on );
167 
168  /*
169  * Enable or disable CleandepsOnRemove of the solver
170  * (= Cleanup when deleting packages)
171  */
172  void pkgCleanDepsOnRemoveChanged( bool on );
173 
174  /*
175  * Enable or disable vendor change allowed of the solver
176  */
177  void pkgAllowVendorChangeChanged( bool on );
178 
179 
180 
184  void help();
185 
189  void symbolHelp();
190 
194  void keyboardHelp();
195 
200 
204  void loadSettings();
205 
209  void saveSettings();
210 
211 
212 signals:
213 
219  void loadData();
220 
226  void refresh();
227 
228 
229 protected slots:
230 
234  void addPatchFilterView();
235 
240 
246  void globalUpdatePkg() { globalUpdatePkg( false ); }
247 
254 
258  void showProducts();
259 
263  void showHistory();
264 
268  void slotRepoUpgradeLabelLinkClicked(const QString &link);
269 
273  void busyCursor();
274 
278  void normalCursor();
279 
280 
281 protected:
282 
283  // Layout methods - create and layout widgets
284 
285  void basicLayout();
286 
287  QWidget * layoutRightPane ( QWidget *parent );
288  void layoutFilters ( QWidget *parent );
289  void layoutPkgList ( QWidget *parent );
290  void layoutDetailsViews ( QWidget *parent );
291  void layoutButtons ( QWidget *parent );
292  void layoutMenuBar ( QWidget *parent );
293 
300  void makeConnections();
301 
308  void addMenus();
309 
318  void connectFilter( QWidget * filter,
319  QWidget * pkgList,
320  bool hasUpdateSignal = true );
321 
325  void connectPatchList();
326 
335  void globalUpdatePkg( bool force );
336 
342  void importSelectable( ZyppSel selectable,
343  bool isWanted,
344  const char * kind );
345 
351 
355  QString symHelp( const QString & imgFileName,
356  const QString & summary,
357  const QString & explanation );
358 
359 
363  QString keyHelp( const QString & key,
364  const QString & summary,
365  const QString & explanation );
366 
370  void loadCommonSettings();
371 
375  void saveCommonSettings();
376 
380  static QString para( const QString & text );
381 
385  static QString listItem( const QString & text );
386 
387 
388  // Data members
389 
390  QAction * _autoDependenciesAction;
391  QPushButton * _checkDependenciesButton;
392  QTabWidget * _detailsViews;
393  YQPkgFilterTab * _filters;
394  YQPkgChangeLogView * _pkgChangeLogView;
395  YQPkgDependenciesView * _pkgDependenciesView;
396  YQPkgDescriptionView * _pkgDescriptionView;
397  YQPkgFileListView * _pkgFileListView;
398  QLabel * _repoUpgradeLabel;
399  QLabel * _repoUpgradingLabel;
400  QWidget * _notificationsContainer;
401  YQPkgRepoFilterView * _repoFilterView;
402  YQPkgServiceFilterView * _serviceFilterView;
403  YQPkgLangList * _langList;
404  YQPkgList * _pkgList;
405  YQPkgPatternList * _patternList;
406  YQPkgClassFilterView * _pkgClassFilterView;
407  YQPkgSearchFilterView * _searchFilterView;
408  YQPkgStatusFilterView * _statusFilterView;
409  YQPkgTechnicalDetailsView * _pkgTechnicalDetailsView;
410  YQPkgUpdateProblemFilterView * _updateProblemFilterView;
411  YQPkgVersionsView * _pkgVersionsView;
412  YQPkgPatchFilterView * _patchFilterView;
413  YQPkgPatchList * _patchList;
414 
415  QMenuBar * _menuBar;
416  QMenu * _fileMenu;
417  QMenu * _pkgMenu;
418  QMenu * _patchMenu;
419  QMenu * _configMenu;
420  QMenu * _dependencyMenu;
421  QMenu * _optionsMenu;
422  QMenu * _extrasMenu;
423  QMenu * _helpMenu;
424 
425  QAction * _showDevelAction;
426  QAction * _showDebugAction;
427  QAction * _verifySystemModeAction;
428  QAction * _installRecommendedAction;
429  QAction * _cleanDepsOnRemoveAction;
430  QAction * _allowVendorChangeAction;
431 
432  YQPkgObjList::ExcludeRule * _excludeDevelPkgs;
433  YQPkgObjList::ExcludeRule * _excludeDebugInfoPkgs;
434 
435  QColor _normalButtonBackground;
436 };
437 
438 
439 
440 #endif // YQPackageSelector_h
Display the description of a ZyppObj derived object along with its name and summary.
Definition: YQPkgDescriptionView.h:55
void addPatchFilterView()
Definition: YQPackageSelector.cc:1146
Definition: YQPackageSelector.h:85
Display a list of zypp::Patch objects.
Definition: YQPkgPatchList.h:74
void globalUpdatePkg()
Definition: YQPackageSelector.h:246
void connectFilter(QWidget *filter, QWidget *pkgList, bool hasUpdateSignal=true)
Definition: YQPackageSelector.cc:946
void normalCursor()
Definition: YQPackageSelector.cc:1903
Definition: YQPkgClassFilterView.h:70
void showProducts()
Definition: YQPackageSelector.cc:1561
void busyCursor()
Definition: YQPackageSelector.cc:1898
Filter view for packages that made problems during update.
Definition: YQPkgUpdateProblemFilterView.h:53
Definition: YQPkgFilterTab.h:87
void loadCommonSettings()
Definition: YQPackageSelector.cc:1815
void importSelectable(ZyppSel selectable, bool isWanted, const char *kind)
Definition: YQPackageSelector.cc:1360
void updateRepositoryUpgradeLabel()
Definition: YQPackageSelector.cc:1476
QString keyHelp(const QString &key, const QString &summary, const QString &explanation)
Definition: YQPackageSelectorHelp.cc:346
QString symHelp(const QString &imgFileName, const QString &summary, const QString &explanation)
Definition: YQPackageSelectorHelp.cc:248
void saveSettings()
Definition: YQPackageSelector.cc:1856
void saveCommonSettings()
Definition: YQPackageSelector.cc:1875
int manualResolvePackageDependencies()
Definition: YQPackageSelector.cc:1119
bool anyRetractedPkgInstalled()
Definition: YQPackageSelector.cc:1775
void keyboardHelp()
Definition: YQPackageSelectorHelp.cc:268
Display a list of zypp::Patch objects and ( below ) details about the currently selected patch...
Definition: YQPkgPatchFilterView.h:61
void slotRepoUpgradeLabelLinkClicked(const QString &link)
Definition: YQPackageSelector.cc:1525
Display a pkg&#39;s file list.
Definition: YQPkgChangeLogView.h:55
Display a list of zypp::Package objects.
Definition: YQPkgList.h:54
Display a list of zypp::Pattern objects.
Definition: YQPkgPatternList.h:55
Filter view for searching within packages.
Definition: YQPkgSearchFilterView.h:63
Definition: YQPkgRepoFilterView.h:49
void symbolHelp()
Definition: YQPackageSelectorHelp.cc:156
void installDebugInfoPkgs()
Definition: YQPackageSelector.cc:1582
void connectPatchList()
Definition: YQPackageSelector.cc:1184
Definition: YQPkgObjList.h:689
Display technical details (very much like &#39;rpm -qi&#39;) for a ZYPP object - the installed instance...
Definition: YQPkgTechnicalDetailsView.h:52
void pkgExport()
Definition: YQPackageSelector.cc:1210
static QString listItem(const QString &text)
Definition: YQPackageSelectorHelp.cc:371
Filter view for packages that made problems during update.
Definition: YQPkgStatusFilterView.h:59
void help()
Definition: YQPackageSelectorHelp.cc:61
Package version selector: Display a list of available versions from all the different installation so...
Definition: YQPkgVersionsView.h:65
void autoResolveDependencies()
Definition: YQPackageSelector.cc:1109
static QString para(const QString &text)
Definition: YQPackageSelectorHelp.cc:364
void addMenus()
Definition: YQPackageSelector.cc:686
Display a list of zypp::Selection objects.
Definition: YQPkgLangList.h:52
void installDevelPkgs()
Definition: YQPackageSelector.cc:1575
void loadSettings()
Definition: YQPackageSelector.cc:1792
Definition: YQPkgServiceFilterView.h:34
void installDebugSourcePkgs()
Definition: YQPackageSelector.cc:1589
Definition: YQPackageSelectorBase.h:65
void hotkeyInsertPatchFilterView()
Definition: YQPackageSelector.cc:1163
void installSubPkgs(const QString &suffix)
Definition: YQPackageSelector.cc:1675
void installRecommendedPkgs()
Definition: YQPackageSelector.cc:1596
void makeConnections()
Definition: YQPackageSelector.cc:1002
Display technical details ( very much like &#39;rpm -qi&#39; ) for a zypp::Package object - the installed ins...
Definition: YQPkgDependenciesView.h:55
void showHistory()
Definition: YQPackageSelector.cc:1568
void pkgImport()
Definition: YQPackageSelector.cc:1266
void pkgExcludeDebugChanged(bool on)
Definition: YQPackageSelector.cc:1617
void globalUpdatePkgForce()
Definition: YQPackageSelector.h:253
Display a pkg&#39;s file list.
Definition: YQPkgFileListView.h:54