Author: dmacvicar Date: Fri Apr 25 13:01:30 2008 New Revision: 47061 URL: http://svn.opensuse.org/viewcvs/yast?rev=47061&view=rev Log: - new (usable) groups view, based on package kit groups, plus a group for all packages and one for suggested and recommenden packages Modified: trunk/qt-pkg/src/YQPkgPatternList.cc trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.cc trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.h Modified: trunk/qt-pkg/src/YQPkgPatternList.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgPatternList.cc?re... ============================================================================== --- trunk/qt-pkg/src/YQPkgPatternList.cc (original) +++ trunk/qt-pkg/src/YQPkgPatternList.cc Fri Apr 25 13:01:30 2008 @@ -32,6 +32,7 @@ #include "YQi18n.h" #include "utf8.h" +#include "YQPackageSelector.h" #include "YQPkgPatternList.h" #include "YQIconPool.h" #include "YQApplication.h" @@ -464,8 +465,11 @@ if ( icon == zypp::Pathname("yast-system").asString() ) icon = "pattern-generic"; - // FIXME find the icon in a sane way - setIcon(_patternList->iconCol(), QIcon(QString("/usr/share/icons/hicolor/32x32/apps/") + icon.c_str() + QString(".png"))); + std::string iconpath = YQPackageSelector::iconPath(icon, 32); + std::cout << icon << " | "<< iconpath << std::endl; + + setIcon(_patternList->iconCol(), QIcon(QString(iconpath.c_str()))); + } setStatusIcon(); Modified: trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgRpmGroupTagsFilte... ============================================================================== --- trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.cc (original) +++ trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.cc Fri Apr 25 13:01:30 2008 @@ -22,27 +22,303 @@ #define YUILogComponent "qt-pkg" #include "YUILog.h" +#include <QApplication> + +#include "YQPackageSelector.h" +#include "zypp/sat/LookupAttr.h" + #include "YQPkgRpmGroupTagsFilterView.h" #include "YQi18n.h" #include "utf8.h" +/** + * translations taken from packagekit + **/ +QString +group_enum_to_localised_text (YPkgGroupEnum group) +{ + QString text; + switch (group) + { + case PK_GROUP_ENUM_ACCESSIBILITY: + text = _("Accessibility"); + break; + case PK_GROUP_ENUM_ACCESSORIES: + text = _("Accessories"); + break; + case PK_GROUP_ENUM_EDUCATION: + text = _("Education"); + break; + case PK_GROUP_ENUM_GAMES: + text = _("Games"); + break; + case PK_GROUP_ENUM_GRAPHICS: + text = _("Graphics"); + break; + case PK_GROUP_ENUM_INTERNET: + text = _("Internet"); + break; + case PK_GROUP_ENUM_OFFICE: + text = _("Office"); + break; + case PK_GROUP_ENUM_OTHER: + text = _("Other"); + break; + case PK_GROUP_ENUM_PROGRAMMING: + text = _("Programming"); + break; + case PK_GROUP_ENUM_MULTIMEDIA: + text = _("Multimedia"); + break; + case PK_GROUP_ENUM_SYSTEM: + text = _("System"); + break; + case PK_GROUP_ENUM_DESKTOP_GNOME: + text = _("GNOME desktop"); + break; + case PK_GROUP_ENUM_DESKTOP_KDE: + text = _("KDE desktop"); + break; + case PK_GROUP_ENUM_DESKTOP_XFCE: + text = _("XFCE desktop"); + break; + case PK_GROUP_ENUM_DESKTOP_OTHER: + text = _("Other desktops"); + break; + case PK_GROUP_ENUM_PUBLISHING: + text = _("Publishing"); + break; + case PK_GROUP_ENUM_SERVERS: + text = _("Servers"); + break; + case PK_GROUP_ENUM_FONTS: + text = _("Fonts"); + break; + case PK_GROUP_ENUM_ADMIN_TOOLS: + text = _("Admin tools"); + break; + case PK_GROUP_ENUM_LEGACY: + text = _("Legacy"); + break; + case PK_GROUP_ENUM_LOCALIZATION: + text = _("Localization"); + break; + case PK_GROUP_ENUM_VIRTUALIZATION: + text = _("Virtualization"); + break; + case PK_GROUP_ENUM_SECURITY: + text = _("Security"); + break; + case PK_GROUP_ENUM_POWER_MANAGEMENT: + text = _("Power management"); + break; + case PK_GROUP_ENUM_COMMUNICATION: + text = _("Communication"); + break; + case PK_GROUP_ENUM_NETWORK: + text = _("Network"); + break; + case PK_GROUP_ENUM_MAPS: + text = _("Maps"); + break; + case PK_GROUP_ENUM_REPOS: + text = _("Software sources"); + break; + case YPKG_GROUP_ALL: + text = _("All packages"); + break; + + case YPKG_GROUP_SUGGESTED: + text = _("Suggested packages"); + break; + + case YPKG_GROUP_RECOMMENDED: + text = _("Recommended packages"); + break; + + case PK_GROUP_ENUM_UNKNOWN: + text = _("Unknown group"); + break; + default: + break; + + } + return text; +} +std::string +group_enum_to_icon (YPkgGroupEnum group) +{ + std::string text; + switch (group) + { + case PK_GROUP_ENUM_ACCESSIBILITY: + text = "package_main"; + break; + case PK_GROUP_ENUM_ACCESSORIES: + text = "package_applications"; + break; + case PK_GROUP_ENUM_EDUCATION: + text = "package_edutainment"; + break; + case PK_GROUP_ENUM_GAMES: + text = "package_games"; + break; + case PK_GROUP_ENUM_GRAPHICS: + text = "package_graphics"; + break; + case PK_GROUP_ENUM_INTERNET: + text = "package_network"; + break; + case PK_GROUP_ENUM_OFFICE: + text = "package_office_addressbook"; + break; + case PK_GROUP_ENUM_OTHER: + text = "package_main"; + break; + case PK_GROUP_ENUM_PROGRAMMING: + text = "package_development"; + break; + case PK_GROUP_ENUM_MULTIMEDIA: + text = "package_multimedia"; + break; + case PK_GROUP_ENUM_SYSTEM: + text = "yast-system"; + break; + case PK_GROUP_ENUM_DESKTOP_GNOME: + text = "pattern-gnome"; + break; + case PK_GROUP_ENUM_DESKTOP_KDE: + text = "pattern-kde"; + break; + case PK_GROUP_ENUM_DESKTOP_XFCE: + text = "package_utility_desktop"; + break; + case PK_GROUP_ENUM_DESKTOP_OTHER: + text = "package_utility_desktop"; + break; + case PK_GROUP_ENUM_PUBLISHING: + text = "package_main"; + break; + case PK_GROUP_ENUM_SERVERS: + text = "package_editors"; + break; + case PK_GROUP_ENUM_FONTS: + text = "package_main"; + break; + case PK_GROUP_ENUM_ADMIN_TOOLS: + text = "yast-sysconfig"; + break; + case PK_GROUP_ENUM_LEGACY: + text = "package_main"; + break; + case PK_GROUP_ENUM_LOCALIZATION: + text = "yast-language"; + break; + case PK_GROUP_ENUM_VIRTUALIZATION: + text = "yast-create-new-vm"; + break; + case PK_GROUP_ENUM_SECURITY: + text = "yast-security"; + break; + case PK_GROUP_ENUM_POWER_MANAGEMENT: + text = "package_settings_power"; + break; + case PK_GROUP_ENUM_COMMUNICATION: + text = "yast-modem"; + break; + case PK_GROUP_ENUM_NETWORK: + text = "package_network"; + break; + case PK_GROUP_ENUM_MAPS: + text = "package_main"; + break; + case PK_GROUP_ENUM_REPOS: + text = "package_main"; + break; + case YPKG_GROUP_SUGGESTED: + case YPKG_GROUP_RECOMMENDED: + text = "package_edutainment_languages"; + + break; + case PK_GROUP_ENUM_UNKNOWN: + case YPKG_GROUP_ALL: + text = "package_main"; + break; + default: + break; + + } + return text; +} -YRpmGroupsTree * YQPkgRpmGroupTagsFilterView::_rpmGroupsTree = 0; +YPkgGroupEnum +zypp_get_group (const std::string &groupu) +{ + // TODO Look for a faster and nice way to do this conversion + + std::string group = zypp::str::toLower(groupu); + + if (group.find ("amusements") != std::string::npos) { + return PK_GROUP_ENUM_GAMES; + } else if (group.find ("development") != std::string::npos) { + return PK_GROUP_ENUM_PROGRAMMING; + } else if (group.find ("hardware") != std::string::npos) { + return PK_GROUP_ENUM_SYSTEM; + } else if (group.find ("archiving") != std::string::npos + || group.find("clustering") != std::string::npos + || group.find("system/monitoring") != std::string::npos + || group.find("databases") != std::string::npos + || group.find("system/management") != std::string::npos) { + return PK_GROUP_ENUM_ADMIN_TOOLS; + } else if (group.find ("graphics") != std::string::npos) { + return PK_GROUP_ENUM_GRAPHICS; + } else if (group.find ("multimedia") != std::string::npos) { + return PK_GROUP_ENUM_MULTIMEDIA; + } else if (group.find ("network") != std::string::npos) { + return PK_GROUP_ENUM_NETWORK; + } else if (group.find ("office") != std::string::npos + || group.find("text") != std::string::npos + || group.find("editors") != std::string::npos) { + return PK_GROUP_ENUM_OFFICE; + } else if (group.find ("publishing") != std::string::npos) { + return PK_GROUP_ENUM_PUBLISHING; + } else if (group.find ("security") != std::string::npos) { + return PK_GROUP_ENUM_SECURITY; + } else if (group.find ("telephony") != std::string::npos) { + return PK_GROUP_ENUM_COMMUNICATION; + } else if (group.find ("gnome") != std::string::npos) { + return PK_GROUP_ENUM_DESKTOP_GNOME; + } else if (group.find ("kde") != std::string::npos) { + return PK_GROUP_ENUM_DESKTOP_KDE; + } else if (group.find ("xfce") != std::string::npos) { + return PK_GROUP_ENUM_DESKTOP_XFCE; + } else if (group.find ("gui/other") != std::string::npos) { + return PK_GROUP_ENUM_DESKTOP_OTHER; + } else if (group.find ("localization") != std::string::npos) { + return PK_GROUP_ENUM_LOCALIZATION; + } else if (group.find ("system") != std::string::npos) { + return PK_GROUP_ENUM_SYSTEM; + } else if (group.find ("scientific") != std::string::npos) { + return PK_GROUP_ENUM_EDUCATION; + } + + return PK_GROUP_ENUM_UNKNOWN; +} YQPkgRpmGroupTagsFilterView::YQPkgRpmGroupTagsFilterView( QWidget * parent ) : QTreeWidget( parent ) -{ + , _selectedGroup(YPKG_GROUP_ALL) +{ + setIconSize(QSize(32,32)); setHeaderLabels( QStringList(_( "Package Groups" )) ); - setRootIsDecorated( true ); - cloneTree( rpmGroupsTree()->root(), 0 ); - - new YQPkgRpmGroupTag( this, _( "zzz All" ), 0 ); + setRootIsDecorated( false ); connect( this, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ), this, SLOT ( slotSelectionChanged ( QTreeWidgetItem * ) ) ); - + fillGroups(); + selectSomething(); } @@ -51,64 +327,41 @@ { } - -YRpmGroupsTree * -YQPkgRpmGroupTagsFilterView::rpmGroupsTree() +void YQPkgRpmGroupTagsFilterView::fillGroups() { - if ( ! _rpmGroupsTree ) + if ( _groupsMap.empty() ) { - _rpmGroupsTree = new YRpmGroupsTree(); - Q_CHECK_PTR( _rpmGroupsTree ); + zypp::sat::LookupAttr rpmgroups( zypp::sat::SolvAttr::group ); + for ( zypp::sat::LookupAttr::iterator it = rpmgroups.begin(); + it != rpmgroups.end(); + ++it ) + { + YPkgGroupEnum group; + std::map<std::string, YPkgGroupEnum>::const_iterator itg = _groupsCache.find(it.asString()); + if ( itg == _groupsCache.end() ) + { + group = zypp_get_group( it.asString() ); + _groupsCache[it.asString()] = group; + } + else + { + group = itg->second; + } + + //std::cout << it.asString() << std::endl; + + if ( _groupsMap.find(group) == _groupsMap.end() ) + { + _groupsMap[group] = new YQPkgRpmGroupTag( this, group ); + } + } + _groupsMap[YPKG_GROUP_ALL] = new YQPkgRpmGroupTag( this, YPKG_GROUP_ALL ); + _groupsMap[YPKG_GROUP_RECOMMENDED] = new YQPkgRpmGroupTag( this, YPKG_GROUP_RECOMMENDED ); + _groupsMap[YPKG_GROUP_SUGGESTED] = new YQPkgRpmGroupTag( this, YPKG_GROUP_SUGGESTED ); - fillRpmGroupsTree(); } - - return _rpmGroupsTree; } - -void -YQPkgRpmGroupTagsFilterView::fillRpmGroupsTree() -{ - yuiDebug() << "Filling RPM groups tree" << endl; - - for ( ZyppPoolIterator it = zyppPkgBegin(); - it != zyppPkgEnd(); - ++it ) - { - ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() ); - - if ( zyppPkg ) - rpmGroupsTree()->addRpmGroup( zyppPkg->group() ); - } - - yuiDebug() << "Filling RPM groups tree done" << endl; -} - - -void -YQPkgRpmGroupTagsFilterView::cloneTree( YStringTreeItem * parentRpmGroup, - YQPkgRpmGroupTag * parentClone ) -{ - YStringTreeItem * child = parentRpmGroup->firstChild(); - YQPkgRpmGroupTag * clone; - - while ( child ) - { - if ( parentClone ) - clone = new YQPkgRpmGroupTag( this, parentClone, child ); - else - clone = new YQPkgRpmGroupTag( this, child ); - - Q_CHECK_PTR( clone ); - //FIXME clone->setExpanded( clone->depth() < 1 ); - clone->setExpanded( true ); - cloneTree( child, clone ); - child = child->next(); - } -} - - void YQPkgRpmGroupTagsFilterView::selectSomething() { @@ -136,32 +389,32 @@ if ( selection() ) { - for ( ZyppPoolIterator it = zyppPkgBegin(); - it != zyppPkgEnd(); - ++it ) - { - ZyppSel selectable = *it; - - // Multiple instances of this package may or may not be in the same - // RPM group, so let's check both the installed version (if there - // is any) and the candidate version. - // - // Make sure we emit only one filterMatch() signal if both exist - // and both are in the same RPM group. We don't want multiple list - // entries for the same package! - - bool match = - check( selectable, tryCastToZyppPkg( selectable->candidateObj() ) ) || - check( selectable, tryCastToZyppPkg( selectable->installedObj() ) ); - - // If there is neither an installed nor a candidate package, check - // any other instance. - - if ( ! match && - ! selectable->candidateObj() && - ! selectable->installedObj() ) - check( selectable, tryCastToZyppPkg( selectable->theObj() ) ); - } + for ( ZyppPoolIterator it = zyppPkgBegin(); + it != zyppPkgEnd(); + ++it ) + { + ZyppSel selectable = *it; + + // Multiple instances of this package may or may not be in the same + // RPM group, so let's check both the installed version (if there + // is any) and the candidate version. + // + // Make sure we emit only one filterMatch() signal if both exist + // and both are in the same RPM group. We don't want multiple list + // entries for the same package! + + bool match = + check( selectable, tryCastToZyppPkg( selectable->candidateObj() ) ) || + check( selectable, tryCastToZyppPkg( selectable->installedObj() ) ); + + // If there is neither an installed nor a candidate package, check + // any other instance. + + if ( ! match && + ! selectable->candidateObj() && + ! selectable->installedObj() ) + check( selectable, tryCastToZyppPkg( selectable->theObj() ) ); + } } emit filterFinished(); @@ -175,14 +428,22 @@ if ( sel ) { - if ( sel->rpmGroup() ) - _selectedRpmGroup = rpmGroupsTree()->rpmGroup( sel->rpmGroup() ); - else - _selectedRpmGroup = "*"; // "zzz_All" + _selectedGroup = sel->group(); + // for the list of reccommended packages, we need + // to solve first + if ( _selectedGroup == YPKG_GROUP_SUGGESTED || + _selectedGroup == YPKG_GROUP_RECOMMENDED ) + { + // set the busy cursor for the solving + QApplication::setOverrideCursor(Qt::WaitCursor); + zypp::getZYpp()->resolver()->resolvePool(); + QApplication::restoreOverrideCursor(); + } + } else { - _selectedRpmGroup = ""; + _selectedGroup = YPKG_GROUP_ALL; } filter(); @@ -196,20 +457,34 @@ if ( ! pkg || ! selection() ) return false; - if ( selection()->rpmGroup() == 0 ) // Special case: All packages + if ( selection()->group() == YPKG_GROUP_ALL ) // Special case: All packages { - emit filterMatch( selectable, pkg ); - return true; + emit filterMatch( selectable, pkg ); + return true; } - if ( selectedRpmGroup().empty() ) - return false; + YPkgGroupEnum groupn = zypp_get_group(pkg->group()); - if ( pkg->group() == selectedRpmGroup() || // full match? - pkg->group().find( selectedRpmGroup() + "/" ) == 0 ) // starts with selected? + if ( groupn == selectedGroup() ) { - emit filterMatch( selectable, pkg ); - return true; + emit filterMatch( selectable, pkg ); + return true; + } + + if ( selectable->candidateObj() ) + { + if ( selectedGroup() == YPKG_GROUP_RECOMMENDED && + zypp::PoolItem(pkg).status().isRecommended() ) + { + emit filterMatch( selectable, pkg ); + return true; + } + if ( selectedGroup() == YPKG_GROUP_SUGGESTED && + zypp::PoolItem(pkg).status().isSuggested() ) + { + emit filterMatch( selectable, pkg ); + return true; + } } return false; @@ -222,48 +497,28 @@ QTreeWidgetItem * item = currentItem(); if ( ! item ) - return 0; + return 0; return dynamic_cast<YQPkgRpmGroupTag *> ( item ); } - - - - YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView * parentFilterView, - YStringTreeItem * rpmGroup ) + YPkgGroupEnum group ) : QTreeWidgetItem( parentFilterView ) , _filterView( parentFilterView ) - , _rpmGroup( rpmGroup ) + , _group( group ) { - setText( 0, fromUTF8( _rpmGroup->value().translation() ) ); + QFont f = font(0); + //f.setWeight(QFont::Bold); + f.setPointSize(f.pointSize()+2); + setFont(0, f); + + std::string iconName = group_enum_to_icon(group); + setText( 0, group_enum_to_localised_text(group)); + setIcon(0, QIcon(QString(YQPackageSelector::iconPath(iconName, 32).c_str()))); } - -YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView * parentFilterView, - YQPkgRpmGroupTag * parentGroupTag, - YStringTreeItem * rpmGroup ) - : QTreeWidgetItem( parentGroupTag ) - , _filterView( parentFilterView ) - , _rpmGroup( rpmGroup ) -{ - setText( 0, fromUTF8( _rpmGroup->value().translation() ) ); -} - - -YQPkgRpmGroupTag::YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView * parentFilterView, - const QString & rpmGroupName, - YStringTreeItem * rpmGroup ) - : QTreeWidgetItem( parentFilterView ) - , _filterView( parentFilterView ) - , _rpmGroup( rpmGroup ) -{ - setText( 0, rpmGroupName ); -} - - YQPkgRpmGroupTag::~YQPkgRpmGroupTag() { // NOP Modified: trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgRpmGroupTagsFilte... ============================================================================== --- trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.h (original) +++ trunk/qt-pkg/src/YQPkgRpmGroupTagsFilterView.h Fri Apr 25 13:01:30 2008 @@ -20,13 +20,50 @@ #ifndef YQPkgRpmGroupTagsFilterView_h #define YQPkgRpmGroupTagsFilterView_h +#include <map> #include "YQZypp.h" +#include "YRpmGroupsTree.h" #include <QTreeWidget> -#include <YRpmGroupsTree.h> - using std::string; +typedef enum { + /* PackageKit values */ + PK_GROUP_ENUM_ACCESSIBILITY, + PK_GROUP_ENUM_ACCESSORIES, + PK_GROUP_ENUM_EDUCATION, + PK_GROUP_ENUM_GAMES, + PK_GROUP_ENUM_GRAPHICS, + PK_GROUP_ENUM_INTERNET, + PK_GROUP_ENUM_OFFICE, + PK_GROUP_ENUM_OTHER, + PK_GROUP_ENUM_PROGRAMMING, + PK_GROUP_ENUM_MULTIMEDIA, + PK_GROUP_ENUM_SYSTEM, + PK_GROUP_ENUM_DESKTOP_GNOME, + PK_GROUP_ENUM_DESKTOP_KDE, + PK_GROUP_ENUM_DESKTOP_XFCE, + PK_GROUP_ENUM_DESKTOP_OTHER, + PK_GROUP_ENUM_PUBLISHING, + PK_GROUP_ENUM_SERVERS, + PK_GROUP_ENUM_FONTS, + PK_GROUP_ENUM_ADMIN_TOOLS, + PK_GROUP_ENUM_LEGACY, + PK_GROUP_ENUM_LOCALIZATION, + PK_GROUP_ENUM_VIRTUALIZATION, + PK_GROUP_ENUM_SECURITY, + PK_GROUP_ENUM_POWER_MANAGEMENT, + PK_GROUP_ENUM_COMMUNICATION, + PK_GROUP_ENUM_NETWORK, + PK_GROUP_ENUM_MAPS, + PK_GROUP_ENUM_REPOS, + PK_GROUP_ENUM_UNKNOWN, + /* Other values */ + YPKG_GROUP_SUGGESTED, + YPKG_GROUP_RECOMMENDED, + YPKG_GROUP_ALL, +} YPkgGroupEnum; + class YQPkgRpmGroupTag; @@ -64,11 +101,9 @@ ZyppPkg pkg ); /** - * Returns the (untranslated!) currently selected RPM group as string. - * Special case: "*" is returned if "zzz_All" is selected. + * Returns the (untranslated!) currently selected group enum **/ - const string & selectedRpmGroup() const { return _selectedRpmGroup; } - + YPkgGroupEnum selectedGroup() const { return _selectedGroup; } public slots: @@ -93,13 +128,6 @@ **/ void selectSomething(); - /** - * Returns the internal RPM groups tree and fills it - * if it doesn't exist yet. - **/ - static YRpmGroupsTree * rpmGroupsTree(); - - signals: /** @@ -127,58 +155,25 @@ **/ void slotSelectionChanged( QTreeWidgetItem * newSelection ); - protected: - /** - * Fill the internal RPM groups tree with RPM groups of all packages - * currently in the pool - **/ - static void fillRpmGroupsTree(); - - /** - * Recursively clone the RPM group tag tree for the QListView widget: - * Make a deep copy of the tree starting at 'parentRpmGroup' and - * 'parentClone'. - **/ - void cloneTree( YStringTreeItem * parentRpmGroup, - YQPkgRpmGroupTag * parentClone = 0 ); - + void fillGroups(); // // Data members // - string _selectedRpmGroup; - - static YRpmGroupsTree * _rpmGroupsTree; + YPkgGroupEnum _selectedGroup; + std::map<YPkgGroupEnum, YQPkgRpmGroupTag*> _groupsMap; + // map to cache converted groups + std::map<std::string, YPkgGroupEnum> _groupsCache; }; - - class YQPkgRpmGroupTag: public QTreeWidgetItem { public: - /** - * Constructor for toplevel RPM group tags - **/ - YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView * parentFilterView, - YStringTreeItem * rpmGroup ); - - /** - * Constructor for RPM group tags that have a parent - **/ - YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView * parentFilterView, - YQPkgRpmGroupTag * parentGroupTag, - YStringTreeItem * rpmGroup ); - - /** - * Constructor for toplevel RPM group tags via STL string - * ( for special cases like "zzz All" ) - **/ YQPkgRpmGroupTag( YQPkgRpmGroupTagsFilterView * parentFilterView, - const QString & rpmGroupName, - YStringTreeItem * rpmGroup ); + YPkgGroupEnum group ); /** * Destructor @@ -191,18 +186,14 @@ **/ YQPkgRpmGroupTagsFilterView * filterView() const { return _filterView; } - /** - * Returns the original tree item - **/ - const YStringTreeItem * rpmGroup() const { return _rpmGroup; } - + YPkgGroupEnum group() const { return _group; } private: // Data members YQPkgRpmGroupTagsFilterView * _filterView; - YStringTreeItem * _rpmGroup; + YPkgGroupEnum _group; }; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org