diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp index 3f6d74d175538537240729891d9bc0d0404b2e6e..2db81fae8b2c3ef7a98773d8e7ed5eb34765b631 100644 --- a/src/libs/utils/fancylineedit.cpp +++ b/src/libs/utils/fancylineedit.cpp @@ -63,14 +63,14 @@ static QString labelStyleSheet(FancyLineEdit::Side side) class FancyLineEditPrivate : public QObject { public: - explicit FancyLineEditPrivate(QLineEdit *parent); + explicit FancyLineEditPrivate(FancyLineEdit *parent); virtual bool eventFilter(QObject *obj, QEvent *event); const QString m_leftLabelStyleSheet; const QString m_rightLabelStyleSheet; - QLineEdit *m_lineEdit; + FancyLineEdit *m_lineEdit; QPixmap m_pixmap; QMenu *m_menu; QLabel *m_menuLabel; @@ -82,7 +82,7 @@ public: }; -FancyLineEditPrivate::FancyLineEditPrivate(QLineEdit *parent) : +FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) : QObject(parent), m_leftLabelStyleSheet(labelStyleSheet(FancyLineEdit::Left)), m_rightLabelStyleSheet(labelStyleSheet(FancyLineEdit::Right)), @@ -98,17 +98,21 @@ FancyLineEditPrivate::FancyLineEditPrivate(QLineEdit *parent) : bool FancyLineEditPrivate::eventFilter(QObject *obj, QEvent *event) { - if (!m_menu || obj != m_menuLabel) + if (obj != m_menuLabel) return QObject::eventFilter(obj, event); switch (event->type()) { case QEvent::MouseButtonPress: { const QMouseEvent *me = static_cast<QMouseEvent *>(event); - m_menu->exec(me->globalPos()); + if (m_menu) { + m_menu->exec(me->globalPos()); + } else { + emit m_lineEdit->buttonClicked(); + } return true; } case QEvent::FocusIn: - if (m_menuTabFocusTrigger) { + if (m_menuTabFocusTrigger && m_menu) { m_lineEdit->setFocus(); m_menu->exec(m_menuLabel->mapToGlobal(m_menuLabel->rect().center())); return true; @@ -161,6 +165,9 @@ void FancyLineEdit::updateStyleSheet(Side side) sheet += QLatin1Char(';'); if (m_d->m_showingHintText) sheet += QLatin1String(" color: #BBBBBB;"); + // Fix the stylesheet's clearing the size hint. + sheet += QLatin1String(" height: "); + sheet += QString::number(sizeHint().height()); sheet += QLatin1Char('}'); setStyleSheet(sheet); } diff --git a/src/libs/utils/fancylineedit.h b/src/libs/utils/fancylineedit.h index 754fccbbeb8a5a2e0f2a6c89e38f9c97d5bebb8d..01139a518b41992a0222218816a781e1717e1911 100644 --- a/src/libs/utils/fancylineedit.h +++ b/src/libs/utils/fancylineedit.h @@ -85,6 +85,9 @@ public: // Convenience for accessing the text that returns "" in case of isShowingHintText(). QString typedText() const; +signals: + void buttonClicked(); + public slots: void setPixmap(const QPixmap &pixmap); void setHintText(const QString &ht); @@ -97,6 +100,7 @@ protected: virtual void focusOutEvent(QFocusEvent *e); private: + friend class Utils::FancyLineEditPrivate; bool isSideStored() const; void updateMenuLabel(); void positionMenuLabel(); diff --git a/src/libs/utils/filterlineedit.cpp b/src/libs/utils/filterlineedit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55fce68267fcc7b1beaa4f1fdddf5963ae92a664 --- /dev/null +++ b/src/libs/utils/filterlineedit.cpp @@ -0,0 +1,55 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "filterlineedit.h" + +namespace Utils { + +FilterLineEdit::FilterLineEdit(QWidget *parent) : + FancyLineEdit(parent), + m_lastFilterText(typedText()) +{ + setSide(Utils::FancyLineEdit::Right); + setPixmap(QPixmap(QLatin1String(":/utils/images/reset.png"))); + setHintText(tr("Type to filter")); + + connect(this, SIGNAL(buttonClicked()), this, SLOT(clear())); + connect(this, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged())); +} + +void FilterLineEdit::slotTextChanged() +{ + const QString newlyTypedText = typedText(); + if (newlyTypedText != m_lastFilterText) { + m_lastFilterText = newlyTypedText; + emit filterChanged(m_lastFilterText); + } +} + +} // namespace Utils diff --git a/src/libs/utils/filterlineedit.h b/src/libs/utils/filterlineedit.h new file mode 100644 index 0000000000000000000000000000000000000000..c57419e72d2fb3b3546c3fa3dab7241c660269d7 --- /dev/null +++ b/src/libs/utils/filterlineedit.h @@ -0,0 +1,57 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef FILTERLINEEDIT_H +#define FILTERLINEEDIT_H + +#include "fancylineedit.h" + +namespace Utils { + +/* A fancy line edit customized for filtering purposes with a clear button. */ + +class QTCREATOR_UTILS_EXPORT FilterLineEdit : public FancyLineEdit +{ + Q_OBJECT +public: + explicit FilterLineEdit(QWidget *parent = 0); + +signals: + void filterChanged(const QString &); + +private slots: + void slotTextChanged(); + +private: + QString m_lastFilterText; +}; + +} // namespace Utils + +#endif // FILTERLINEEDIT_H diff --git a/src/libs/utils/images/reset.png b/src/libs/utils/images/reset.png new file mode 100644 index 0000000000000000000000000000000000000000..cc0d6a26bd58dfcea87d02c7fc1415557ad47fd1 Binary files /dev/null and b/src/libs/utils/images/reset.png differ diff --git a/src/libs/utils/utils.pro b/src/libs/utils/utils.pro index fde373e6fe6573e77799dac0da32ac5ad652c351..61e5659451df9ab90eed05390943c2c342ca6308 100644 --- a/src/libs/utils/utils.pro +++ b/src/libs/utils/utils.pro @@ -37,7 +37,8 @@ SOURCES += reloadpromptutils.cpp \ fancymainwindow.cpp \ detailsbutton.cpp \ detailswidget.cpp \ - changeset.cpp + changeset.cpp \ + filterlineedit.cpp win32 { SOURCES += abstractprocess_win.cpp \ consoleprocess_win.cpp \ @@ -82,7 +83,8 @@ HEADERS += utils_global.h \ fancymainwindow.h \ detailsbutton.h \ detailswidget.h \ - changeset.h + changeset.h \ + filterlineedit.h FORMS += filewizardpage.ui \ projectintropage.ui \ newclasswidget.ui \ diff --git a/src/libs/utils/utils.qrc b/src/libs/utils/utils.qrc index ef180b21fe096b2b982b152b1dabf16beb260e15..8d4efc94be75499b9ccf962e332e5fee1945ac35 100644 --- a/src/libs/utils/utils.qrc +++ b/src/libs/utils/utils.qrc @@ -1,5 +1,6 @@ <RCC> <qresource prefix="/utils" > <file>images/removesubmitfield.png</file> + <file>images/reset.png</file> </qresource> </RCC> diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro index f92509e61dcfdcb2439e33eca042a3467fcef4aa..fa5ad96f48e35e829876ca531107769ea6001863 100644 --- a/src/plugins/coreplugin/coreplugin.pro +++ b/src/plugins/coreplugin/coreplugin.pro @@ -158,7 +158,6 @@ HEADERS += mainwindow.h \ settingsdatabase.h \ eventfilteringmainwindow.h FORMS += dialogs/newdialog.ui \ - dialogs/settingsdialog.ui \ dialogs/shortcutsettings.ui \ dialogs/saveitemsdialog.ui \ dialogs/openwithdialog.ui \ diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp index b347734d90fffbda3a585ed8730c129eb48ae622..a70aa405dd77c0a3dc01edb461303a7d2bc4bba1 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -33,20 +33,29 @@ #include "icore.h" #include <utils/qtcassert.h> +#include <utils/filterlineedit.h> #include <QtCore/QSettings> #include <QtGui/QHeaderView> -#include <QtGui/QPushButton> #include <QtGui/QStandardItemModel> #include <QtGui/QStandardItem> #include <QtGui/QSortFilterProxyModel> #include <QtGui/QItemSelectionModel> +#include <QtGui/QHBoxLayout> #include <QtGui/QIcon> #include <QtGui/QLabel> -#include <QtGui/QVBoxLayout> -#include <QtGui/QHBoxLayout> +#include <QtGui/QPushButton> +#include <QtGui/QToolButton> +#include <QtGui/QToolBar> #include <QtGui/QSpacerItem> #include <QtGui/QStyle> +#include <QtGui/QStackedLayout> +#include <QtGui/QGridLayout> +#include <QtGui/QLineEdit> +#include <QtGui/QFrame> +#include <QtGui/QDialogButtonBox> +#include <QtGui/QTreeView> +#include <QtGui/QApplication> enum ItemType { CategoryItem, PageItem }; @@ -186,9 +195,13 @@ SettingsDialog::SettingsDialog(QWidget *parent, const QString &categoryId, m_pages(ExtensionSystem::PluginManager::instance()->getObjects<IOptionsPage>()), m_proxyModel(new PageFilterModel), m_model(0), - m_applied(false) + m_applied(false), + m_stackedLayout(new QStackedLayout), + m_filterLineEdit(new Utils::FilterLineEdit), + m_pageTree(new QTreeView), + m_headerLabel(new QLabel) { - setupUi(this); + createGui(); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); #ifdef Q_OS_MAC setWindowTitle(tr("Preferences")); @@ -202,73 +215,77 @@ SettingsDialog::SettingsDialog(QWidget *parent, const QString &categoryId, initialCategory = settings->value(QLatin1String(categoryKeyC), QVariant(QString())).toString(); initialPage = settings->value(QLatin1String(pageKeyC), QVariant(QString())).toString(); } - buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); - - connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply())); // Create pages with title labels with a larger, bold font, left-aligned // with the group boxes of the page. - const int pageCount = m_pages.size(); - QFont titleLabelFont; - const int leftMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) + - qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth); - for (int i = 0; i < pageCount; i++) { - // Title bar - QHBoxLayout *titleLayout = new QHBoxLayout; - titleLayout->addSpacerItem(new QSpacerItem(leftMargin, 0, QSizePolicy::Fixed, QSizePolicy::Ignored)); - QLabel *titleLabel = new QLabel(m_pages.at(i)->trName()); - if (i == 0) { // Create a bold header font from the default label font. - titleLabelFont = titleLabel->font(); - titleLabelFont.setBold(true); - // Paranoia: Should a font be set in pixels... - const int pointSize = titleLabelFont.pointSize(); - if (pointSize > 0) - titleLabelFont.setPointSize(pointSize + 2); - } - titleLabel->setFont(titleLabelFont); - titleLayout->addWidget(titleLabel); - // Page - QWidget *pageContainer =new QWidget; - QVBoxLayout *pageLayout = new QVBoxLayout(pageContainer); - pageLayout->addLayout(titleLayout); - pageLayout->addSpacerItem(new QSpacerItem(0, 6, QSizePolicy::Ignored, QSizePolicy::Fixed)); - pageLayout->addWidget(m_pages.at(i)->createPage(0)); - stackedPages->addWidget(pageContainer); - } -// foreach(IOptionsPage *page, m_pages) - // stackedPages->addWidget(); - - splitter->setCollapsible(1, false); - pageTree->header()->setVisible(false); + foreach(IOptionsPage *page, m_pages) + m_stackedLayout->addWidget(page->createPage(0)); QModelIndex initialIndex; m_model = pageModel(m_pages, 0, initialCategory, initialPage, &initialIndex); m_proxyModel->setFilterKeyColumn(0); m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); m_proxyModel->setSourceModel(m_model); - pageTree->setModel(m_proxyModel); - pageTree->setSelectionMode(QAbstractItemView::SingleSelection); - connect(pageTree->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), + m_pageTree->setModel(m_proxyModel); + m_pageTree->setSelectionMode(QAbstractItemView::SingleSelection); + connect(m_pageTree->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(currentChanged(QModelIndex,QModelIndex))); if (initialIndex.isValid()) { const QModelIndex proxyIndex = m_proxyModel->mapFromSource(initialIndex); - pageTree->selectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + m_pageTree->selectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); } + m_pageTree->resizeColumnToContents(0); - QList<int> sizes; - sizes << 150 << 300; - splitter->setSizes(sizes); - - splitter->setStretchFactor(splitter->indexOf(pageTree), 0); - splitter->setStretchFactor(splitter->indexOf(layoutWidget), 1); - - filterClearButton->setIcon(QIcon(QLatin1String(":/core/images/reset.png"))); - connect(filterClearButton, SIGNAL(clicked()), filterLineEdit, SLOT(clear())); // The order of the slot connection matters here, the filter slot // opens the matching page after the model has filtered. - connect(filterLineEdit, SIGNAL(textChanged(QString)), + connect(m_filterLineEdit, SIGNAL(filterChanged(QString)), m_proxyModel, SLOT(setFilterFixedString(QString))); - connect(filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filter(QString))); + connect(m_filterLineEdit, SIGNAL(filterChanged(QString)), this, SLOT(filter(QString))); +} + +void SettingsDialog::createGui() +{ + // Header label with large font and a bit of spacing (align with group boxes) + QFont headerLabelFont = m_headerLabel->font(); + headerLabelFont.setBold(true); + // Paranoia: Should a font be set in pixels... + const int pointSize = headerLabelFont.pointSize(); + if (pointSize > 0) + headerLabelFont.setPointSize(pointSize + 2); + m_headerLabel->setFont(headerLabelFont); + + QHBoxLayout *headerHLayout = new QHBoxLayout; + const int leftMargin = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) + + qApp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth); + headerHLayout->addSpacerItem(new QSpacerItem(leftMargin, 0, QSizePolicy::Fixed, QSizePolicy::Ignored)); + headerHLayout->addWidget(m_headerLabel); + + // Tree + m_pageTree->header()->setVisible(false); + m_stackedLayout->setMargin(0); + + // Separator Line + QFrame *bottomLine = new QFrame; + bottomLine->setFrameShape(QFrame::HLine); + bottomLine->setFrameShadow(QFrame::Sunken); + + // Button box + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Apply|QDialogButtonBox::Cancel); + buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); + connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply())); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); + connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + + QGridLayout *mainGridLayout = new QGridLayout; + mainGridLayout->addWidget(m_filterLineEdit, 0, 0, 1, 1); + mainGridLayout->addLayout(headerHLayout, 0, 1, 1, 1); + mainGridLayout->addWidget(m_pageTree, 1, 0, 2, 1); + mainGridLayout->addLayout(m_stackedLayout, 1, 1, 1, 1); + mainGridLayout->addWidget(bottomLine, 2, 1, 1, 1); + mainGridLayout->addWidget(buttonBox, 3, 0, 1, 2); + mainGridLayout->setColumnStretch(0, 1); + mainGridLayout->setColumnStretch(1, 4); + setLayout(mainGridLayout); } SettingsDialog::~SettingsDialog() @@ -284,8 +301,9 @@ void SettingsDialog::showPage(const QStandardItem *item) IOptionsPage *page = pageOfItem(item); m_currentCategory = page->category(); m_currentPage = page->id(); - stackedPages->setCurrentIndex(indexOfItem(item)); + m_stackedLayout->setCurrentIndex(indexOfItem(item)); m_visitedPages.insert(page); + m_headerLabel->setText(page->trName()); } break; case CategoryItem: @@ -337,17 +355,17 @@ void SettingsDialog::filter(const QString &text) { // Filter cleared, collapse all. if (text.isEmpty()) { - pageTree->collapseAll(); + m_pageTree->collapseAll(); return; } // Expand match and select the first page. Note: This depends // on the order of slot invocation, needs to be done after filtering if (!m_proxyModel->rowCount(QModelIndex())) return; - pageTree->expandAll(); + m_pageTree->expandAll(); const QModelIndex firstVisiblePage = findPage(m_proxyModel); if (firstVisiblePage.isValid()) - pageTree->selectionModel()->setCurrentIndex(firstVisiblePage, QItemSelectionModel::ClearAndSelect); + m_pageTree->selectionModel()->setCurrentIndex(firstVisiblePage, QItemSelectionModel::ClearAndSelect); } void SettingsDialog::accept() @@ -376,6 +394,7 @@ void SettingsDialog::apply() bool SettingsDialog::execDialog() { + m_pageTree->setFocus(); m_applied = false; exec(); return m_applied; diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.h b/src/plugins/coreplugin/dialogs/settingsdialog.h index 053296068b474411bf525dcd6f432c3fc014da9e..7113b0f3b08980908fe5b0a61460ae3e66d1dd98 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.h +++ b/src/plugins/coreplugin/dialogs/settingsdialog.h @@ -30,10 +30,9 @@ #ifndef SETTINGSDIALOG_H #define SETTINGSDIALOG_H -#include "ui_settingsdialog.h" - #include <QtCore/QList> #include <QtCore/QSet> +#include <QtGui/QDialog> #include "coreplugin/dialogs/ioptionspage.h" @@ -42,12 +41,21 @@ class QModelIndex; class QStandardItemModel; class QStandardItem; class QSortFilterProxyModel; +class QStackedLayout; +class QAbstractButton; +class QLineEdit; +class QLabel; +class QTreeView; QT_END_NAMESPACE +namespace Utils { + class FilterLineEdit; +} + namespace Core { namespace Internal { -class SettingsDialog : public QDialog, public ::Ui::SettingsDialog +class SettingsDialog : public QDialog { Q_OBJECT @@ -72,6 +80,7 @@ private slots: void filter(const QString &text); private: + void createGui(); void showPage(const QStandardItem *item); const QList<Core::IOptionsPage*> m_pages; @@ -82,6 +91,10 @@ private: bool m_applied; QString m_currentCategory; QString m_currentPage; + QStackedLayout *m_stackedLayout; + Utils::FilterLineEdit *m_filterLineEdit; + QTreeView *m_pageTree; + QLabel *m_headerLabel; }; } // namespace Internal diff --git a/src/plugins/cpptools/cpptoolsconstants.h b/src/plugins/cpptools/cpptoolsconstants.h index 26fceb9125807d631ecc02f4f6b837dc0898a6e1..cb61027bd45eef26737b2fbde0e8f910eb90194c 100644 --- a/src/plugins/cpptools/cpptoolsconstants.h +++ b/src/plugins/cpptools/cpptoolsconstants.h @@ -50,7 +50,7 @@ const char * const CPPTOOLS_SETTINGSGROUP = "CppTools"; const char * const LOWERCASE_CPPFILES_KEY = "LowerCaseFiles"; enum { lowerCaseFilesDefault = 1 }; -const char * const CPP_SETTINGS_ID = QT_TRANSLATE_NOOP("CppTools", "File Naming Conventions"); +const char * const CPP_SETTINGS_ID = QT_TRANSLATE_NOOP("CppTools", "File Naming"); const char * const CPP_SETTINGS_CATEGORY = QT_TRANSLATE_NOOP("CppTools", "C++"); } // namespace Constants diff --git a/src/tools/qtcreatorwidgets/customwidgets.cpp b/src/tools/qtcreatorwidgets/customwidgets.cpp index 011e8199084a14d52ccea1f8240cc499c57efaaa..6ee972a97428a0d6f304e1a6a44e687cd29bced5 100644 --- a/src/tools/qtcreatorwidgets/customwidgets.cpp +++ b/src/tools/qtcreatorwidgets/customwidgets.cpp @@ -114,6 +114,18 @@ FancyLineEdit_CW::FancyLineEdit_CW(QObject *parent) : { } +FilterLineEdit_CW::FilterLineEdit_CW(QObject *parent) : + QObject(parent), + CustomWidget<Utils::FilterLineEdit> + (QLatin1String("<utils/filterlineedit.h>"), + false, + QLatin1String(groupC), + QIcon(), + QLatin1String("A Line edit customized for filtering")) +{ +} + + QtColorButton_CW::QtColorButton_CW(QObject *parent) : QObject(parent), CustomWidget<Utils::QtColorButton> @@ -293,6 +305,7 @@ WidgetCollection::WidgetCollection(QObject *parent) : m_plugins.push_back(new LineColumnLabel_CW(this)); m_plugins.push_back(new PathChooser_CW(this)); m_plugins.push_back(new FancyLineEdit_CW(this)); + m_plugins.push_back(new FilterLineEdit_CW(this)); m_plugins.push_back(new QtColorButton_CW(this)); m_plugins.push_back(new SubmitEditorWidget_CW(this)); m_plugins.push_back(new SubmitFieldWidget_CW(this)); diff --git a/src/tools/qtcreatorwidgets/customwidgets.h b/src/tools/qtcreatorwidgets/customwidgets.h index 0543c78764b5097e8f6a4d54582945372824a850..7785d526eed761d3c33c64c0607b1f9526d24bd7 100644 --- a/src/tools/qtcreatorwidgets/customwidgets.h +++ b/src/tools/qtcreatorwidgets/customwidgets.h @@ -38,7 +38,7 @@ #include <utils/linecolumnlabel.h> #include <utils/pathchooser.h> #include <utils/projectnamevalidatinglineedit.h> -#include <utils/fancylineedit.h> +#include <utils/filterlineedit.h> #include <utils/qtcolorbutton.h> #include <utils/submiteditorwidget.h> #include <utils/submitfieldwidget.h> @@ -131,6 +131,16 @@ public: virtual QWidget *createWidget(QWidget *parent); }; +class FilterLineEdit_CW : + public QObject, + public CustomWidget<Utils::FilterLineEdit> +{ + Q_OBJECT + Q_INTERFACES(QDesignerCustomWidgetInterface) +public: + explicit FilterLineEdit_CW(QObject *parent = 0); +}; + class QtColorButton_CW : public QObject, public CustomWidget<Utils::QtColorButton>