1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQPackageSelectorBase.h
15 Author: Stefan Hundhammer <sh@suse.de>
20 #ifndef YQPackageSelectorBase_h
21 #define YQPackageSelectorBase_h
24 #include "YPackageSelector.h"
28 class QY2ComboTabWidget;
31 class YQPkgConflictDialog;
32 class YQPkgDiskUsageList;
36 * Abstract base class for package selectors.
38 class YQPackageSelectorBase : public QVBox, public YPackageSelector
47 * Will initialize package and selection managers and create conflict
50 YQPackageSelectorBase( YWidget * parent, long modeFlags = 0 );
55 virtual ~YQPackageSelectorBase();
60 * Set enabled/disabled state.
62 * Reimplemented from YWidget.
64 virtual void setEnabling( bool enabled );
67 * Preferred width of the widget.
69 * Reimplemented from YWidget.
71 virtual int preferredWidth();
74 * Preferred height of the widget.
76 * Reimplemented from YWidget.
78 virtual int preferredHeight();
81 * Set the new size of the widget.
83 * Reimplemented from YWidget.
85 virtual void setSize( int newWidth, int newHeight );
88 * Accept the keyboard focus.
90 * Reimplemented from YWidget.
92 virtual bool setKeyboardFocus();
98 * Resolve dependencies (unconditionally) for all resolvables.
100 * Returns QDialog::Accepted or QDialog::Rejected.
102 int resolveDependencies();
105 * Verifies dependencies of the currently installed system.
107 * Returns QDialog::Accepted or QDialog::Rejected.
112 * Check for disk overflow and post a warning dialog if necessary.
113 * The user can choose to override this warning.
115 * Returns QDialog::Accepted if no warning is necessary or if the user
116 * wishes to override the warning, QDialog::Rejected otherwise.
118 int checkDiskUsage();
121 * Display a list of automatically selected packages
122 * (excluding packages contained in any selections that are to be installed)
124 void showAutoPkgList();
127 * Close processing and abandon changes
132 * Close processing and accept changes
137 * Inform user about a feature that is not implemented yet.
138 * This should NEVER show up in the final version.
140 void notImplemented();
146 * Emitted when package resolving is started.
147 * This can be used for some kind of "busy display".
149 void resolvingStarted();
152 * Emitted when package resolving is finished.
154 void resolvingFinished();
160 * Reset all previously ignored dependency problems.
162 void resetIgnoredDependencyProblems();
168 * Show all license agreements the user has not confirmed yet
169 * (for all packages that will be installed, and in YOU mode also for
172 * Returns 'true' if all licenses were confirmed, 'false' if one or more
173 * licenses were not confirmed (in which case some packages might be set to
174 * S_TABOO, which might require another resolver run).
176 bool showPendingLicenseAgreements();
179 * Show all license agreements in a resolvable range. To be used with
180 * zyppPkgBegin() and zyppPkgEnd() or with zyppPatchesBegin() and
183 bool showPendingLicenseAgreements( ZyppPoolIterator begin,
184 ZyppPoolIterator end );
187 * Event handler for keyboard input - for debugging and testing.
189 * Reimplemented from QWidget.
191 virtual void keyPressEvent( QKeyEvent * ev );
196 bool _showChangesDialog;
197 YQPkgConflictDialog * _pkgConflictDialog;
198 YQPkgDiskUsageList * _diskUsageList;
199 QAction * _actionResetIgnoredDependencyProblems;
204 #endif // YQPackageSelectorBase_h