summaryrefslogtreecommitdiff
path: root/src/plugins/designer/cpp/cppsettingspage.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-24 15:05:02 +0100
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-11-24 15:05:02 +0100
commit65e11062bb1671328e16736db9f2668ba87e5edb (patch)
treebd364c5c34790d52bdbf77a5950542ca522223f0 /src/plugins/designer/cpp/cppsettingspage.cpp
parentc49bed119986350efa577876efc855d6d5f0d293 (diff)
downloadqt-creator-65e11062bb1671328e16736db9f2668ba87e5edb.tar.gz
Polish the settings dialog.
Add a title label to the pages. Use QGroupBoxes throughout. Extend SavedAction to work with checkable QGroupBoxes. Polish UI files, use common layout for VCS plugins. Performance: Apply only visited settings pages. Add search keywords. Task-number: QTCREATOR-26
Diffstat (limited to 'src/plugins/designer/cpp/cppsettingspage.cpp')
-rw-r--r--src/plugins/designer/cpp/cppsettingspage.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/designer/cpp/cppsettingspage.cpp b/src/plugins/designer/cpp/cppsettingspage.cpp
index 26111a7619..66122e7f69 100644
--- a/src/plugins/designer/cpp/cppsettingspage.cpp
+++ b/src/plugins/designer/cpp/cppsettingspage.cpp
@@ -31,6 +31,7 @@
#include "designerconstants.h"
#include <QtCore/QCoreApplication>
+#include <QtCore/QTextStream>
#include <coreplugin/icore.h>
namespace Designer {
@@ -84,6 +85,18 @@ void CppSettingsPageWidget::setUiEmbedding(int v)
}
}
+QString CppSettingsPageWidget::searchKeywords() const
+{
+ QString rc;
+ QTextStream(&rc) << m_ui.ptrAggregationRadioButton->text()
+ << ' ' << m_ui.aggregationButton->text()
+ << ' ' << m_ui.multipleInheritanceButton->text()
+ << ' ' << m_ui.retranslateCheckBox->text()
+ << ' ' << m_ui.includeQtModuleCheckBox->text();
+ rc.remove(QLatin1Char('&'));
+ return rc;
+}
+
// ---------- CppSettingsPage
CppSettingsPage::CppSettingsPage(QObject *parent) : Core::IOptionsPage(parent)
{
@@ -114,6 +127,8 @@ QWidget *CppSettingsPage::createPage(QWidget *parent)
{
m_widget = new CppSettingsPageWidget(parent);
m_widget->setParameters(m_parameters);
+ if (m_searchKeywords.isEmpty())
+ m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -132,5 +147,10 @@ void CppSettingsPage::finish()
{
}
+bool CppSettingsPage::matches(const QString &s) const
+{
+ return m_searchKeywords.contains(s, Qt::CaseInsensitive);
+}
+
} // namespace Internal
} // namespace Designer