Changeset 846 for trunk/tools/designer/src/components/widgetbox
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/designer/src/components/widgetbox/widgetbox.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 75 75 filterWidget->setRefuseFocus(true); 76 76 connect(filterWidget, SIGNAL(filterChanged(QString)), m_view, SLOT(filter(QString))); 77 l->addWidget(filterWidget); 77 78 QToolBar *toolBar = new QToolBar(this); 79 toolBar->addWidget(filterWidget); 80 l->addWidget(toolBar); 78 81 79 82 // View -
trunk/tools/designer/src/components/widgetbox/widgetbox.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
trunk/tools/designer/src/components/widgetbox/widgetbox.xml
r651 r846 2 2 <!--************************************************************************ 3 3 ** 4 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).4 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 5 5 ** All rights reserved. 6 6 ** Contact: Nokia Corporation ([email protected]) -
trunk/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
trunk/tools/designer/src/components/widgetbox/widgetbox_dnditem.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
trunk/tools/designer/src/components/widgetbox/widgetbox_global.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
trunk/tools/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 89 89 struct WidgetBoxCategoryEntry { 90 90 WidgetBoxCategoryEntry(); 91 explicit WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &widget, const QIcon &icon, bool editable); 91 explicit WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &widget, 92 const QString &filter, 93 const QIcon &icon, 94 bool editable); 92 95 93 96 QDesignerWidgetBoxInterface::Widget widget; 94 97 QString toolTip; 95 98 QString whatsThis; 99 96 100 QIcon icon; 97 101 bool editable; … … 104 108 } 105 109 106 WidgetBoxCategoryEntry::WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &w, const QIcon &i, bool e) : 110 WidgetBoxCategoryEntry::WidgetBoxCategoryEntry(const QDesignerWidgetBoxInterface::Widget &w, 111 const QString &filterIn, 112 const QIcon &i, bool e) : 107 113 widget(w), 114 108 115 icon(i), 109 116 editable(e) … … 143 150 typedef QList<WidgetBoxCategoryEntry> WidgetBoxCategoryEntrys; 144 151 152 145 153 QDesignerFormEditorInterface *m_core; 146 154 WidgetBoxCategoryEntrys m_items; … … 150 158 WidgetBoxCategoryModel::WidgetBoxCategoryModel(QDesignerFormEditorInterface *core, QObject *parent) : 151 159 QAbstractListModel(parent), 160 152 161 m_core(core), 153 162 m_viewMode(QListView::ListMode) 154 163 { 164 155 165 } 156 166 … … 206 216 void WidgetBoxCategoryModel::addWidget(const QDesignerWidgetBoxInterface::Widget &widget, const QIcon &icon,bool editable) 207 217 { 208 // build item 209 WidgetBoxCategoryEntry item(widget, icon, editable); 218 // build item. Filter on name + class name if it is different and not a layout. 219 QString filter = widget.name(); 220 if (!filter.contains(QLatin1String("Layout")) && m_classNameRegExp.indexIn(widget.domXml()) != -1) { 221 const QString className = m_classNameRegExp.cap(1); 222 if (!filter.contains(className)) 223 filter += className; 224 } 225 WidgetBoxCategoryEntry item(widget, filter, icon, editable); 210 226 const QDesignerWidgetDataBaseInterface *db = m_core->widgetDataBase(); 211 227 const int dbIndex = db->indexOfClassName(widget.name()); … … 256 272 return QVariant(item.whatsThis); 257 273 case FilterRole: 258 return item. widget.name();274 return item.; 259 275 } 260 276 return QVariant(); -
trunk/tools/designer/src/components/widgetbox/widgetboxcategorylistview.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
trunk/tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
trunk/tools/designer/src/components/widgetbox/widgetboxtreewidget.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected])
Note:
See TracChangeset
for help on using the changeset viewer.