GenericPanel and its subclasses now use the title and icon provided by collections.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1492 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-02-06 22:34:52 +00:00
parent 7661b2f47e
commit 9fb4eb7c2d
5 changed files with 90 additions and 25 deletions

View File

@@ -399,10 +399,10 @@ QTreeWidgetItem *ElementsPanel::addProject(QETProject *project) {
@param icon Icone a utiliser pour l'affichage de la collection
@return Le QTreeWidgetItem insere le plus haut
*/
QTreeWidgetItem *ElementsPanel::addCollection(ElementsCollection *collection, const QString &coll_name, const QIcon &icon) {
QTreeWidgetItem *ElementsPanel::addCollection(ElementsCollection *collection) {
PanelOptions options = GenericPanel::AddAllChild;
options |= GenericPanel::DisplayElementsPreview;
return(addElementsCollection(collection, invisibleRootItem(), options, coll_name, icon));
return(addElementsCollection(collection, invisibleRootItem(), options));
}
QTreeWidgetItem *ElementsPanel::updateTemplateItem(QTreeWidgetItem *tb_template_qtwi, const TitleBlockTemplateLocation &tb_template, PanelOptions options, bool freshly_created) {
@@ -507,7 +507,7 @@ void ElementsPanel::reload(bool reload_collections) {
// load the common elements collection
if (QETApp::commonElementsCollection()->rootCategory()) {
common_collection_item_ = addCollection(QETApp::commonElementsCollection(), tr("Collection QET"), system_icon);
common_collection_item_ = addCollection(QETApp::commonElementsCollection());
if (first_reload_) common_collection_item_ -> setExpanded(true);
}
@@ -519,7 +519,7 @@ void ElementsPanel::reload(bool reload_collections) {
// load the custom elements collection
if (QETApp::customElementsCollection()->rootCategory()) {
custom_collection_item_ = addCollection(QETApp::customElementsCollection(), tr("Collection utilisateur"), user_icon);
custom_collection_item_ = addCollection(QETApp::customElementsCollection());
if (first_reload_) custom_collection_item_ -> setExpanded(true);
}