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
26 #include "YPackageSelector.h"
30 class QY2ComboTabWidget;
33 class YQPkgConflictDialog;
34 class YQPkgDiskUsageList;
38 * Abstract base class for package selectors.
40 class YQPackageSelectorBase : public Q3VBox, public YPackageSelector
49 * Will initialize package and selection managers and create conflict
52 YQPackageSelectorBase( YWidget * parent, long modeFlags = 0 );
57 virtual ~YQPackageSelectorBase();
62 * Set enabled/disabled state.
64 * Reimplemented from YWidget.
66 virtual void setEnabling( bool enabled );
69 * Preferred width of the widget.
71 * Reimplemented from YWidget.
73 virtual int preferredWidth();
76 * Preferred height of the widget.
78 * Reimplemented from YWidget.
80 virtual int preferredHeight();
83 * Set the new size of the widget.
85 * Reimplemented from YWidget.
87 virtual void setSize( int newWidth, int newHeight );
90 * Accept the keyboard focus.
92 * Reimplemented from YWidget.
94 virtual bool setKeyboardFocus();
100 * Resolve dependencies (unconditionally) for all resolvables.
102 * Returns QDialog::Accepted or QDialog::Rejected.
104 int resolveDependencies();
107 * Verifies dependencies of the currently installed system.
109 * Returns QDialog::Accepted or QDialog::Rejected.
114 * Check for disk overflow and post a warning dialog if necessary.
115 * The user can choose to override this warning.
117 * Returns QDialog::Accepted if no warning is necessary or if the user
118 * wishes to override the warning, QDialog::Rejected otherwise.
120 int checkDiskUsage();
123 * Display a list of automatically selected packages
124 * (excluding packages contained in any selections that are to be installed)
126 void showAutoPkgList();
129 * Close processing and abandon changes
134 * Close processing and accept changes
139 * Inform user about a feature that is not implemented yet.
140 * This should NEVER show up in the final version.
142 void notImplemented();
148 * Emitted when package resolving is started.
149 * This can be used for some kind of "busy display".
151 void resolvingStarted();
154 * Emitted when package resolving is finished.
156 void resolvingFinished();
162 * Reset all previously ignored dependency problems.
164 void resetIgnoredDependencyProblems();
170 * Show all license agreements the user has not confirmed yet
171 * (for all packages that will be installed, and in YOU mode also for
174 * Returns 'true' if all licenses were confirmed, 'false' if one or more
175 * licenses were not confirmed (in which case some packages might be set to
176 * S_TABOO, which might require another resolver run).
178 bool showPendingLicenseAgreements();
181 * Show all license agreements in a resolvable range. To be used with
182 * zyppPkgBegin() and zyppPkgEnd() or with zyppPatchesBegin() and
185 bool showPendingLicenseAgreements( ZyppPoolIterator begin,
186 ZyppPoolIterator end );
189 * Event handler for keyboard input - for debugging and testing.
191 * Reimplemented from QWidget.
193 virtual void keyPressEvent( QKeyEvent * ev );
198 bool _showChangesDialog;
199 YQPkgConflictDialog * _pkgConflictDialog;
200 YQPkgDiskUsageList * _diskUsageList;
201 Q3Action * _actionResetIgnoredDependencyProblems;
206 #endif // YQPackageSelectorBase_h