41 #ifndef NCPackageSelector_h
42 #define NCPackageSelector_h
46 #define YUILogComponent "ncurses-pkg"
49 #include "YNCursesUI.h"
50 #include "NCPkgStrings.h"
56 #include <YRpmGroupsTree.h>
57 #include "YWidgetID.h"
59 #include <zypp/ResObject.h>
60 #include <zypp/ui/Selectable.h>
61 #include <zypp/Patch.h>
63 #include "NCPkgFilterRPMGroups.h"
64 #include "NCPkgFilterSearch.h"
65 #include "NCPkgFilterInstSummary.h"
66 #include "NCPkgTable.h"
68 #include "NCPkgMenuFilter.h"
69 #include "NCPkgPackageDetails.h"
70 #include "NCPkgPopupDeps.h"
71 #include "NCPkgFilterMain.h"
72 #include "NCPkgSearchSettings.h"
74 #include "NCPkgSelMapper.h"
101 inline bool ic_compare (
char c1,
char c2 )
103 return ( toupper( c1 ) == toupper( c2 ) );
106 #define DOCTYPETAG "<!-- DT:Rich -->" // Special doctype for preformatted HTML
117 friend std::ostream & operator<<( std::ostream & STREAM,
const NCPackageSelector & OBJ );
125 typedef bool (
NCPackageSelector::* tHandlerFctPtr) (
const NCursesEvent& event );
128 typedef std::map<std::string, tHandlerFctPtr> tHandlerMap;
130 tHandlerMap eventHandlerMap;
154 std::map <std::string, std::string> sysconfig;
158 bool installRecommended;
160 std::string actionAtExit;
162 YRpmGroupsTree * _rpmGroupsTree;
176 YMenuItem * updatelistItem;
179 YLabel * packageLabel;
180 YLabel * diskspaceLabel;
181 YLabel *patternLabel;
185 NCRichText * filter_desc;
186 NCInputField *searchField;
188 YReplacePoint * replacePoint;
189 YReplacePoint * replPoint;
190 YReplacePoint * replPoint2;
197 NCPushButton * okButton;
198 NCPushButton * cancelButton;
200 YMenuItem * visibleInfo;
205 std::set<std::string> verified_pkgs;
232 void setFlags(
long modeFlags);
234 void readSysconfig();
235 void writeSysconfig();
243 void createPkgLayout( YWidget * parent, NCPkgTable::NCPkgTableType type );
256 YLabel *PackageLabel() {
return packageLabel; }
257 YLabel *PatternLabel() {
return patternLabel; }
262 NCPkgTable *VersionsList() {
return versionsList; }
263 void setVersionsList (
NCPkgTable *table ) { versionsList = table; }
265 NCPkgTable * PatchPkgs() {
return patchPkgs; }
266 NCPkgTable * PatchPkgsVersions() {
return patchPkgsVersions; }
268 YReplacePoint *ReplacePoint() {
return replacePoint; }
269 NCRichText *FilterDescription() {
return filter_desc; }
272 bool checkNow(
bool *ok );
273 bool systemVerification(
bool *ok );
317 bool isYouMode() {
return youMode; }
319 bool isUpdateMode() {
return updateMode; }
321 bool isRepoMgrEnabled() {
return repoMgrEnabled; }
323 bool isTestMode() {
return testMode; }
329 std::string ActionAtExit() {
return actionAtExit; }
330 void setActionAtExit( std::string action ) { actionAtExit = action; }
336 bool isCleanDepsOnRemove();
337 void setCleanDepsOnRemove(
bool on );
339 bool isAllowVendorChange();
340 void setAllowVendorChange(
bool on );
346 bool isInstallAlreadyRecommended();
347 void setInstallAlreadyRecommended(
bool on );
348 bool InstallRecommended() {
return installRecommended; }
350 bool isVerifySystem();
351 void setVerifySystem(
bool on );
352 bool VerifySystem() {
return verifySystem; }
357 void setAutoCheck(
bool check) { autoCheck = check; }
358 bool AutoCheck() {
return autoCheck; }
396 void clearInfoArea();
398 wrect deleteReplacePoint();
400 void replaceFilter ( FilterMode mode);
401 void replaceFilterDescr (
bool b );
446 NCPkgMenuFilter::PatchFilter filter );
492 return verified_pkgs;
500 verified_pkgs.insert( pkgname);
508 if ( !verified_pkgs.empty() )
510 yuiMilestone() <<
"Discarding auto-dependency changes" << std::endl;
511 verified_pkgs.clear();
519 #endif // NCPackageSelector_h