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
This commit is contained in:
Friedemann Kleint
2009-11-24 15:05:02 +01:00
parent c49bed1199
commit 65e11062bb
68 changed files with 1444 additions and 1295 deletions

View File

@@ -42,6 +42,7 @@
#include <QtGui/QLineEdit>
#include <QtGui/QRadioButton>
#include <QtGui/QSpinBox>
#include <QtGui/QGroupBox>
using namespace Utils;
@@ -238,19 +239,17 @@ QAction *SavedAction::updatedAction(const QString &text0)
\sa settingsKey(), settingsGroup(), writeSettings()
*/
void SavedAction::readSettings(QSettings *settings)
void SavedAction::readSettings(const QSettings *settings)
{
if (m_settingsGroup.isEmpty() || m_settingsKey.isEmpty())
return;
settings->beginGroup(m_settingsGroup);
QVariant var = settings->value(m_settingsKey, m_defaultValue);
QVariant var = settings->value(m_settingsGroup + QLatin1Char('/') + m_settingsKey, m_defaultValue);
// work around old ini files containing @Invalid() entries
if (isCheckable() && !var.isValid())
var = false;
setValue(var);
//qDebug() << "READING: " << var.isValid() << m_settingsKey << " -> " << m_value
// << " (default: " << m_defaultValue << ")" << var;
settings->endGroup();
}
/*
@@ -314,6 +313,11 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
this, SLOT(pathChooserEditingFinished()));
connect(pathChooser, SIGNAL(browsingFinished()),
this, SLOT(pathChooserEditingFinished()));
} else if (QGroupBox *groupBox= qobject_cast<QGroupBox *>(widget)) {
if (!groupBox->isCheckable())
qDebug() << "connectWidget to non-checkable group box" << widget << toString();
groupBox->setChecked(m_value.toBool());
connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(groupBoxToggled(bool)));
} else {
qDebug() << "Cannot connect widget " << widget << toString();
}
@@ -339,6 +343,8 @@ void SavedAction::apply(QSettings *s)
setValue(spinBox->value());
else if (PathChooser *pathChooser = qobject_cast<PathChooser *>(m_widget))
setValue(pathChooser->path());
else if (const QGroupBox *groupBox= qobject_cast<QGroupBox *>(m_widget))
setValue(groupBox->isChecked());
if (s)
writeSettings(s);
}
@@ -392,6 +398,12 @@ void SavedAction::pathChooserEditingFinished()
setValue(pathChooser->path());
}
void SavedAction::groupBoxToggled(bool checked)
{
if (m_applyMode == ImmediateApply)
setValue(QVariant(checked));
}
void SavedAction::actionTriggered(bool)
{
if (isCheckable())
@@ -436,3 +448,16 @@ void SavedActionSet::finish()
action->disconnectWidget();
}
QString SavedActionSet::searchKeyWords() const
{
const QChar blank = QLatin1Char(' ');
QString rc;
foreach (SavedAction *action, m_list) {
if (!rc.isEmpty())
rc += blank;
rc += action->text();
}
rc.remove(QLatin1Char('&'));
return rc;
}

View File

@@ -70,7 +70,7 @@ public:
virtual QString settingsGroup() const;
Q_SLOT virtual void setSettingsGroup(const QString &group);
virtual void readSettings(QSettings *settings);
virtual void readSettings(const QSettings *settings);
Q_SLOT virtual void writeSettings(QSettings *settings);
virtual void connectWidget(QWidget *widget, ApplyMode applyMode = DeferedApply);
@@ -93,6 +93,7 @@ private:
Q_SLOT void actionTriggered(bool);
Q_SLOT void spinBoxValueChanged(int);
Q_SLOT void spinBoxValueChanged(QString);
Q_SLOT void groupBoxToggled(bool checked);
QVariant m_value;
QVariant m_defaultValue;
@@ -115,6 +116,9 @@ public:
void finish();
void clear() { m_list.clear(); }
// Search keywords for options dialog search.
QString searchKeyWords() const;
private:
QList<SavedAction *> m_list;
};

View File

@@ -263,7 +263,7 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent)
{
QWidget *outerWidget = new QWidget(parent);
QVBoxLayout *outerLayout = new QVBoxLayout(outerWidget);
QGroupBox *groupBox = new QGroupBox(trCategory());
QGroupBox *groupBox = new QGroupBox;
outerLayout->addWidget(groupBox);
outerLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QFormLayout *formLayout = new QFormLayout(groupBox);

View File

@@ -42,6 +42,11 @@
#include <QtGui/QSortFilterProxyModel>
#include <QtGui/QItemSelectionModel>
#include <QtGui/QIcon>
#include <QtGui/QLabel>
#include <QtGui/QVBoxLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QSpacerItem>
#include <QtGui/QStyle>
enum ItemType { CategoryItem, PageItem };
@@ -201,8 +206,37 @@ SettingsDialog::SettingsDialog(QWidget *parent, const QString &categoryId,
connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply()));
foreach(IOptionsPage *page, m_pages)
stackedPages->addWidget(page->createPage(0));
// 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);
@@ -247,10 +281,11 @@ void SettingsDialog::showPage(const QStandardItem *item)
// if a category was hit.
switch (itemTypeOfItem(item)) {
case PageItem: {
const IOptionsPage *page = pageOfItem(item);
IOptionsPage *page = pageOfItem(item);
m_currentCategory = page->category();
m_currentPage = page->id();
stackedPages->setCurrentIndex(indexOfItem(item));
m_visitedPages.insert(page);
}
break;
case CategoryItem:
@@ -318,10 +353,10 @@ void SettingsDialog::filter(const QString &text)
void SettingsDialog::accept()
{
m_applied = true;
foreach (IOptionsPage *page, m_pages) {
foreach (IOptionsPage *page, m_visitedPages)
page->apply();
foreach (IOptionsPage *page, m_pages)
page->finish();
}
done(QDialog::Accepted);
}
@@ -334,7 +369,7 @@ void SettingsDialog::reject()
void SettingsDialog::apply()
{
foreach (IOptionsPage *page, m_pages)
foreach (IOptionsPage *page, m_visitedPages)
page->apply();
m_applied = true;
}

View File

@@ -33,6 +33,7 @@
#include "ui_settingsdialog.h"
#include <QtCore/QList>
#include <QtCore/QSet>
#include "coreplugin/dialogs/ioptionspage.h"
@@ -74,6 +75,8 @@ private:
void showPage(const QStandardItem *item);
const QList<Core::IOptionsPage*> m_pages;
QSet<Core::IOptionsPage*> m_visitedPages;
QSortFilterProxyModel *m_proxyModel;
QStandardItemModel *m_model;
bool m_applied;

View File

@@ -2,12 +2,17 @@
<ui version="4.0">
<class>Core::Internal::GeneralSettings</class>
<widget class="QWidget" name="Core::Internal::GeneralSettings">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>363</width>
<height>296</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>General settings</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="rowWrapPolicy">
<enum>QFormLayout::WrapLongRows</enum>

View File

@@ -74,7 +74,7 @@ QString CodePasterSettingsPage::trCategory() const
QWidget *CodePasterSettingsPage::createPage(QWidget *parent)
{
QGroupBox *groupBox = new QGroupBox(category());
QGroupBox *groupBox = new QGroupBox();
QVBoxLayout *groupBoxLayout = new QVBoxLayout(groupBox);
QFormLayout *formLayout = new QFormLayout;
QLineEdit *lineedit = new QLineEdit(m_host);

View File

@@ -16,9 +16,6 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>PasteBin</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">

View File

@@ -2,14 +2,6 @@
<ui version="4.0">
<class>CodePaster::SettingsPage</class>
<widget class="QWidget" name="CodePaster::SettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>453</width>
<height>320</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
@@ -19,9 +11,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>General</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="protocolLabel">
@@ -59,14 +48,14 @@
<item row="1" column="1">
<widget class="QLineEdit" name="userEdit"/>
</item>
<item row="2" column="1">
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="clipboardBox">
<property name="text">
<string>Copy Paste URL to clipboard</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="displayBox">
<property name="text">
<string>Display Output Pane after sending a post</string>

View File

@@ -13,9 +13,6 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Code Completion</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="caseSensitive">

View File

@@ -243,7 +243,8 @@ QString CppFileSettingsWidget::searchKeywords() const
QString rc;
QTextStream(&rc) << m_ui->headerSuffixLabel->text()
<< ' ' << m_ui->sourceSuffixLabel->text()
<< ' ' << m_ui->lowerCaseFileNamesCheckBox->text();
<< ' ' << m_ui->lowerCaseFileNamesCheckBox->text()
<< ' ' << m_ui->licenseTemplateLabel->text();
rc.remove(QLatin1Char('&'));
return rc;
}

View File

@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>424</width>
<width>441</width>
<height>503</height>
</rect>
</property>
@@ -19,9 +19,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>File Naming Conventions</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
@@ -61,7 +58,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="licenseTemplatePathChooser" native="true"/>
<widget class="Utils::PathChooser" name="licenseTemplatePathChooser"/>
</item>
</layout>
</widget>

View File

@@ -37,6 +37,7 @@
#include <utils/pathchooser.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QTextStream>
#include <QtGui/QFileDialog>
using namespace CVS::Internal;
@@ -70,6 +71,17 @@ void SettingsPageWidget::setSettings(const CVSSettings &s)
m_ui.describeByCommitIdCheckBox->setChecked(s.describeByCommitId);
}
QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << m_ui.promptToSubmitCheckBox->text()
<< ' ' << m_ui.describeByCommitIdCheckBox->text()
<< ' ' << m_ui.commandLabel->text()
<< ' ' << m_ui.rootLabel->text() << ' ' << m_ui.diffOptionsLabel->text();
rc.remove(QLatin1Char('&'));
return rc;
}
SettingsPage::SettingsPage()
{
}
@@ -98,6 +110,8 @@ QWidget *SettingsPage::createPage(QWidget *parent)
{
m_widget = new SettingsPageWidget(parent);
m_widget->setSettings(CVSPlugin::cvsPluginInstance()->settings());
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -105,3 +119,8 @@ void SettingsPage::apply()
{
CVSPlugin::cvsPluginInstance()->setSettings(m_widget->settings());
}
bool SettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -55,6 +55,8 @@ public:
CVSSettings settings() const;
void setSettings(const CVSSettings &);
QString searchKeywords() const;
private:
Ui::SettingsPage m_ui;
};
@@ -75,8 +77,10 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &) const;
private:
QString m_searchKeywords;
SettingsPageWidget* m_widget;
};

View File

@@ -2,59 +2,13 @@
<ui version="4.0">
<class>CVS::Internal::SettingsPage</class>
<widget class="QWidget" name="CVS::Internal::SettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>575</width>
<height>437</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="promptToSubmitCheckBox">
<property name="text">
<string>Prompt to submit</string>
<widget class="QGroupBox" name="miscGroupBox">
<property name="title">
<string>Configuration</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="describeByCommitIdCheckBox">
<property name="toolTip">
<string>When checked, all files touched by a commit will be displayed when clicking on a revision number in the annotation view (retrieved via commit id). Otherwise, only the respective file will be displayed.</string>
</property>
<property name="text">
<string>Describe all files matching commit id:</string>
</property>
</widget>
</item>
<item>
<spacer name="topverticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout_2">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="commandLabel">
<property name="text">
@@ -75,17 +29,44 @@
<item row="1" column="1">
<widget class="QLineEdit" name="rootLineEdit"/>
</item>
<item row="2" column="0">
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="miscGroupBox_2">
<property name="title">
<string>Miscellaneous</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="diffOptionsLabel">
<property name="text">
<string>Diff Options:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="0" column="1">
<widget class="QLineEdit" name="diffOptionsLineEdit"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="promptToSubmitCheckBox">
<property name="text">
<string>Prompt on submit</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="describeByCommitIdCheckBox">
<property name="toolTip">
<string>When checked, all files touched by a commit will be displayed when clicking on a revision number in the annotation view (retrieved via commit id). Otherwise, only the respective file will be displayed.</string>
</property>
<property name="text">
<string>Describe all files matching commit id</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
@@ -101,21 +82,6 @@
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>105</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>

View File

@@ -35,6 +35,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QUrl>
#include <QtCore/QTextStream>
#include <QtGui/QMessageBox>
#include <QtGui/QDesktopServices>
@@ -127,6 +128,16 @@ void CdbOptionsPageWidget::downLoadLinkActivated(const QString &link)
QDesktopServices::openUrl(QUrl(link));
}
QString CdbOptionsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << m_ui.pathLabel->text() << ' ' << m_ui.symbolPathLabel->text()
<< ' ' << m_ui.sourcePathLabel->text()
<< ' ' << m_ui.verboseSymbolLoadingCheckBox->text();
rc.remove(QLatin1Char('&'));
return rc;
}
// ---------- CdbOptionsPage
CdbOptionsPage::CdbOptionsPage(const QSharedPointer<CdbOptions> &options) :
m_options(options)
@@ -162,6 +173,8 @@ QWidget *CdbOptionsPage::createPage(QWidget *parent)
m_widget = new CdbOptionsPageWidget(parent);
m_widget->setOptions(*m_options);
m_widget->setFailureMessage(m_failureMessage);
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -188,5 +201,10 @@ void CdbOptionsPage::finish()
{
}
bool CdbOptionsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
} // namespace Internal
} // namespace Debugger

View File

@@ -53,6 +53,8 @@ public:
void setFailureMessage(const QString &);
QString searchKeywords() const;
private slots:
void autoDetect();
void downLoadLinkActivated(const QString &);
@@ -78,6 +80,7 @@ public:
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
virtual void finish();
virtual bool matches(const QString &) const;
static QString settingsId();
@@ -92,6 +95,7 @@ private:
const QSharedPointer<CdbOptions> m_options;
QPointer<CdbOptionsPageWidget> m_widget;
QString m_failureMessage;
QString m_searchKeywords;
};
} // namespace Internal

View File

@@ -2,22 +2,14 @@
<ui version="4.0">
<class>CommonOptionsPage</class>
<widget class="QWidget" name="CommonOptionsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>379</width>
<height>243</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>User interface</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxListSourceFiles">
<property name="toolTip">
<string>Checking this will populate the source file view automatically but might slow down debugger startup considerably.</string>
@@ -27,28 +19,28 @@
</property>
</widget>
</item>
<item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUseMessageBoxForSignals">
<property name="text">
<string>Show a message box when receiving a signal</string>
</property>
</widget>
</item>
<item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUseAlternatingRowColors">
<property name="text">
<string>Use alternating row colors in debug views</string>
</property>
</widget>
</item>
<item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxUseToolTipsInMainEditor">
<property name="text">
<string>Use tooltips in main editor while debugging</string>
</property>
</widget>
</item>
<item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxSkipKnownFrames">
<property name="toolTip">
<string>When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic
@@ -59,30 +51,25 @@
</property>
</widget>
</item>
<item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxEnableReverseDebugging">
<property name="text">
<string>Enable reverse debugging</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<item row="6" column="0">
<widget class="QLabel" name="labelMaximalStackDepth">
<property name="text">
<string>Maximal stack depth:</string>
</property>
</widget>
</item>
<item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBoxMaximalStackDepth">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="specialValueText">
<string>&lt;unlimited&gt;</string>
</property>
@@ -97,21 +84,6 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>

View File

@@ -62,6 +62,7 @@
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/manhattanstyle.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/session.h>
@@ -328,10 +329,12 @@ public:
QWidget *createPage(QWidget *parent);
void apply() { m_group.apply(settings()); }
void finish() { m_group.finish(); }
virtual bool matches(const QString &s) const;
private:
Ui::CommonOptionsPage m_ui;
Utils::SavedActionSet m_group;
QString m_searchKeywords;
};
QWidget *CommonOptionsPage::createPage(QWidget *parent)
@@ -364,9 +367,25 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
m_ui.checkBoxEnableReverseDebugging->hide();
#endif
if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords) << ' ' << m_ui.checkBoxListSourceFiles->text()
<< ' ' << m_ui.checkBoxUseMessageBoxForSignals->text()
<< ' ' << m_ui.checkBoxUseAlternatingRowColors->text()
<< ' ' << m_ui.checkBoxUseToolTipsInMainEditor->text()
<< ' ' << m_ui.checkBoxSkipKnownFrames->text()
<< ' ' << m_ui.checkBoxEnableReverseDebugging->text()
<< ' ' << m_ui.labelMaximalStackDepth->text();
m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
}
bool CommonOptionsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
} // namespace Internal
} // namespace Debugger
@@ -377,6 +396,13 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
//
///////////////////////////////////////////////////////////////////////
static inline bool oxygenStyle()
{
if (const ManhattanStyle *ms = qobject_cast<const ManhattanStyle *>(qApp->style()))
return !qstrcmp("OxygenStyle", ms->systemStyle()->metaObject()->className());
return false;
}
namespace Debugger {
namespace Internal {
@@ -396,14 +422,12 @@ public:
QWidget *createPage(QWidget *parent);
void apply() { m_group.apply(settings()); }
void finish() { m_group.finish(); }
virtual bool matches(const QString &s) const;
private:
Q_SLOT void updateState();
friend class DebuggerPlugin;
Ui::DebuggingHelperOptionPage m_ui;
Utils::SavedActionSet m_group;
QString m_searchKeywords;
};
QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
@@ -416,16 +440,15 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
m_ui.dumperLocationChooser->setInitialBrowsePathBackup(
Core::ICore::instance()->resourcePath() + "../../lib");
connect(m_ui.checkBoxUseDebuggingHelpers, SIGNAL(toggled(bool)),
this, SLOT(updateState()));
connect(m_ui.checkBoxUseCustomDebuggingHelperLocation, SIGNAL(toggled(bool)),
this, SLOT(updateState()));
m_group.clear();
m_group.insert(theDebuggerAction(UseDebuggingHelpers),
m_ui.checkBoxUseDebuggingHelpers);
m_ui.debuggingHelperGroupBox);
m_group.insert(theDebuggerAction(UseCustomDebuggingHelperLocation),
m_ui.checkBoxUseCustomDebuggingHelperLocation);
m_ui.customLocationGroupBox);
// Suppress Oxygen style's giving flat group boxes bold titles
if (oxygenStyle())
m_ui.customLocationGroupBox->setStyleSheet(QLatin1String("QGroupBox::title { font: ; }"));
m_group.insert(theDebuggerAction(CustomDebuggingHelperLocation),
m_ui.dumperLocationChooser);
@@ -439,9 +462,6 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
m_ui.checkBoxDebugDebuggingHelpers->hide();
#endif
m_ui.dumperLocationChooser->
setEnabled(theDebuggerAction(UseCustomDebuggingHelperLocation)->value().toBool());
#ifndef QT_DEBUG
#if 0
cmd = am->registerAction(m_manager->m_dumpLogAction,
@@ -451,19 +471,22 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
mdebug->addAction(cmd);
#endif
#endif
updateState();
if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords)
<< ' ' << m_ui.debuggingHelperGroupBox->title()
<< ' ' << m_ui.customLocationGroupBox->title()
<< ' ' << m_ui.dumperLocationLabel->text()
<< ' ' << m_ui.checkBoxUseCodeModel->text()
<< ' ' << m_ui.checkBoxDebugDebuggingHelpers->text();
m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
}
void DebuggingHelperOptionPage::updateState()
bool DebuggingHelperOptionPage::matches(const QString &s) const
{
m_ui.checkBoxUseCustomDebuggingHelperLocation->setEnabled(
m_ui.checkBoxUseDebuggingHelpers->isChecked());
bool locationEnabled = m_ui.checkBoxUseDebuggingHelpers->isChecked()
&& m_ui.checkBoxUseCustomDebuggingHelperLocation->isChecked();
m_ui.dumperLocationChooser->setEnabled(locationEnabled);
m_ui.dumperLocationLabel->setEnabled(locationEnabled);
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
} // namespace Internal

View File

@@ -6,86 +6,44 @@
<rect>
<x>0</x>
<y>0</y>
<width>432</width>
<height>434</height>
<width>417</width>
<height>203</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="debuggingHelperGroupBox">
<property name="title">
<string>Debugging helper</string>
<string>Use Debugging helper</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBoxUseDebuggingHelpers">
<property name="toolTip">
<string>This will enable nice display of Qt and Standard Library objects in the Locals&amp;Watchers view</string>
</property>
<property name="text">
<string>Use debugging helper</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBoxUseCustomDebuggingHelperLocation">
<property name="toolTip">
<string>This will load a dumper library</string>
</property>
<property name="text">
<widget class="QGroupBox" name="customLocationGroupBox">
<property name="title">
<string>Use debugging helper from custom location</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="flat">
<bool>true</bool>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<property name="checkable">
<bool>true</bool>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="dumperLocationLabel">
<property name="text">
<string>Location: </string>
</property>
</widget>
</item>
<item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="dumperLocationChooser"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxUseCodeModel">

View File

@@ -4,6 +4,7 @@
#include <coreplugin/icore.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QTextStream>
const char * const GDB_SETTINGS_ID = QT_TRANSLATE_NOOP("Debugger::Internal::GdbOptionsPage", "Gdb");
@@ -73,6 +74,13 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
m_ui.environmentEdit->hide();
m_ui.labelEnvironment->hide();
if (m_searchKeywords.isEmpty()) {
// TODO: Add breakpoints, environment?
QTextStream(&m_searchKeywords) << ' ' << m_ui.labelGdbLocation->text()
<< ' ' << m_ui.labelEnvironment->text()
<< ' ' << m_ui.labelGdbStartupScript->text();
m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
}
void GdbOptionsPage::apply()
@@ -85,5 +93,10 @@ void GdbOptionsPage::finish()
m_group.finish();
}
bool GdbOptionsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
} // namespace Internal
} // namespace Debugger

View File

@@ -23,12 +23,14 @@ public:
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
virtual void finish();
virtual bool matches(const QString &) const;
static QString settingsId();
private:
Ui::GdbOptionsPage m_ui;
Utils::SavedActionSet m_group;
QString m_searchKeywords;
};
} // namespace Internal

View File

@@ -2,30 +2,22 @@
<ui version="4.0">
<class>GdbOptionsPage</class>
<widget class="QWidget" name="GdbOptionsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>429</width>
<height>452</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBoxLocations">
<property name="title">
<string>Gdb interaction</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QFormLayout" name="formLayout">
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="1">
<widget class="QLineEdit" name="environmentEdit"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelGdbLocation">
<property name="toolTip">
@@ -36,6 +28,9 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="gdbLocationChooser"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelEnvironment">
<property name="text">
@@ -46,6 +41,9 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="environmentEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelGdbStartupScript">
<property name="toolTip">
@@ -57,10 +55,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="scriptFileChooser" native="true"/>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="gdbLocationChooser" native="true"/>
<widget class="Utils::PathChooser" name="scriptFileChooser"/>
</item>
</layout>
</widget>
@@ -133,6 +128,9 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>

View File

@@ -76,6 +76,8 @@ QWidget *TrkOptionsPage::createPage(QWidget *parent)
if (!m_widget)
m_widget = new TrkOptionsWidget(parent);
m_widget->setTrkOptions(*m_options);
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -94,5 +96,10 @@ void TrkOptionsPage::finish()
{
}
bool TrkOptionsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
} // namespace Internal
} // namespace Designer

View File

@@ -60,11 +60,13 @@ public:
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
virtual void finish();
virtual bool matches(const QString &) const;
static QString settingsId();
private:
const TrkOptionsPtr m_options;
QPointer<TrkOptionsWidget> m_widget;
QString m_searchKeywords;
};
} // namespace Internal

View File

@@ -32,6 +32,8 @@
#include "debuggerconstants.h"
#include "ui_trkoptionswidget.h"
#include <QtCore/QTextStream>
namespace Debugger {
namespace Internal {
@@ -88,5 +90,14 @@ TrkOptions TrkOptionsWidget::trkOptions() const
return rc;
}
QString TrkOptionsWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << ui->gdbLabel->text() << ' ' << ui->serialLabel->text()
<< ' ' << ui->blueToothLabel->text();
rc.remove(QLatin1Char('&'));
return rc;
}
} // namespace Internal
} // namespace Designer

View File

@@ -50,6 +50,8 @@ public:
void setTrkOptions(const TrkOptions &);
TrkOptions trkOptions() const;
QString searchKeywords() const;
protected:
void changeEvent(QEvent *e);

View File

@@ -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

View File

@@ -49,6 +49,8 @@ public:
FormClassWizardGenerationParameters parameters() const;
void setParameters(const FormClassWizardGenerationParameters &p);
QString searchKeywords() const;
private:
int uiEmbedding() const;
void setUiEmbedding(int);
@@ -69,10 +71,12 @@ public:
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
virtual void finish();
virtual bool matches(const QString &s) const;
private:
QPointer<CppSettingsPageWidget> m_widget;
FormClassWizardGenerationParameters m_parameters;
QString m_searchKeywords;
};
} // namespace Internal

View File

@@ -2,19 +2,9 @@
<ui version="4.0">
<class>Designer::Internal::CppSettingsPageWidget</class>
<widget class="QWidget" name="Designer::Internal::CppSettingsPageWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>526</width>
<height>369</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="uiclassGroupBox">
@@ -80,25 +70,13 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>169</width>
<height>20</height>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -6,123 +6,22 @@
<rect>
<x>0</x>
<y>0</y>
<width>394</width>
<height>322</height>
<width>519</width>
<height>392</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBoxUseFakeVim">
<property name="text">
<string>Use FakeVim</string>
</property>
</widget>
</item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Vim style settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="labelExpandTab">
<property name="toolTip">
<string>vim's &quot;expandtab&quot; option</string>
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Expand tabulators:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="checkBoxExpandTab">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelHlSearch">
<property name="text">
<string>Highlight search results:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxHlSearch">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="labelShiftWidth">
<property name="text">
<string>Shift width:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="lineEditShiftWidth"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="labelSmartTab">
<property name="text">
<string>Smart tabulators:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="checkBoxSmartTab">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="labelStartOfLine">
<property name="text">
<string>Start of line:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="checkBoxStartOfLine">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_2">
<property name="toolTip">
<string>vim's &quot;tabstop&quot; option</string>
</property>
<property name="text">
<string>Tabulator size:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="lineEditTabStop"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="labelBackspace">
<property name="text">
<string>Backspace:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="lineEditBackspace"/>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBoxAutoIndent">
<property name="text">
<string/>
</property>
</widget>
</item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="labelAutoIndent">
<property name="toolTip">
@@ -133,23 +32,137 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="0" column="1">
<widget class="QCheckBox" name="checkBoxAutoIndent">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelExpandTab">
<property name="toolTip">
<string>vim's &quot;expandtab&quot; option</string>
</property>
<property name="text">
<string>Expand tabulators:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="checkBoxExpandTab">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelHlSearch">
<property name="text">
<string>Highlight search results:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="checkBoxHlSearch">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelIncSearch">
<property name="text">
<string>Incremental search:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxIncSearch">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
<item row="4" column="0">
<widget class="QLabel" name="labelShiftWidth">
<property name="text">
<string>Shift width:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEditShiftWidth"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="labelSmartTab">
<property name="text">
<string>Smart tabulators:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="checkBoxSmartTab">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="labelStartOfLine">
<property name="text">
<string>Start of line:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="checkBoxStartOfLine">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="tabulatorLabel">
<property name="toolTip">
<string>vim's &quot;tabstop&quot; option</string>
</property>
<property name="text">
<string>Tabulator size:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="lineEditTabStop"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="labelBackspace">
<property name="text">
<string>Backspace:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="lineEditBackspace"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>17</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@@ -188,15 +201,18 @@
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
<height>40</height>
</size>
</property>
</spacer>

View File

@@ -68,6 +68,7 @@
#include <QtCore/QObject>
#include <QtCore/QPoint>
#include <QtCore/QSettings>
#include <QtCore/QTextStream>
#include <QtGui/QMessageBox>
#include <QtGui/QPlainTextEdit>
@@ -118,6 +119,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply() { m_group.apply(ICore::instance()->settings()); }
void finish() { m_group.finish(); }
virtual bool matches(const QString &) const;
private slots:
void copyTextEditorSettings();
@@ -127,7 +129,7 @@ private slots:
private:
friend class DebuggerPlugin;
Ui::FakeVimOptionPage m_ui;
QString m_searchKeywords;
Utils::SavedActionSet m_group;
};
@@ -138,7 +140,7 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
m_group.clear();
m_group.insert(theFakeVimSetting(ConfigUseFakeVim),
m_ui.checkBoxUseFakeVim);
m_ui.groupBox);
m_group.insert(theFakeVimSetting(ConfigExpandTab),
m_ui.checkBoxExpandTab);
@@ -167,7 +169,15 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent)
this, SLOT(setQtStyle()));
connect(m_ui.pushButtonSetPlainStyle, SIGNAL(clicked()),
this, SLOT(setPlainStyle()));
if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords)
<< ' ' << m_ui.labelAutoIndent->text() << ' ' << m_ui.labelExpandTab->text()
<< ' ' << m_ui.labelHlSearch->text() << ' ' << m_ui.labelIncSearch->text()
<< ' ' << m_ui.labelShiftWidth->text() << ' ' << m_ui.labelSmartTab->text()
<< ' ' << m_ui.labelStartOfLine->text() << ' ' << m_ui.tabulatorLabel->text()
<< ' ' << m_ui.labelBackspace->text();
m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
}
@@ -188,25 +198,32 @@ void FakeVimOptionPage::copyTextEditorSettings()
void FakeVimOptionPage::setQtStyle()
{
m_ui.checkBoxExpandTab->setChecked(true);
m_ui.lineEditTabStop->setText("4");
m_ui.lineEditShiftWidth->setText("4");
const QString four = QString(QLatin1Char('4'));
m_ui.lineEditTabStop->setText(four);
m_ui.lineEditShiftWidth->setText(four);
m_ui.checkBoxSmartTab->setChecked(true);
m_ui.checkBoxAutoIndent->setChecked(true);
m_ui.checkBoxIncSearch->setChecked(true);
m_ui.lineEditBackspace->setText("indent,eol,start");
m_ui.lineEditBackspace->setText(QLatin1String("indent,eol,start"));
}
void FakeVimOptionPage::setPlainStyle()
{
m_ui.checkBoxExpandTab->setChecked(false);
m_ui.lineEditTabStop->setText("8");
m_ui.lineEditShiftWidth->setText("8");
const QString eight = QString(QLatin1Char('4'));
m_ui.lineEditTabStop->setText(eight);
m_ui.lineEditShiftWidth->setText(eight);
m_ui.checkBoxSmartTab->setChecked(false);
m_ui.checkBoxAutoIndent->setChecked(false);
m_ui.checkBoxIncSearch->setChecked(false);
m_ui.lineEditBackspace->setText(QString());
}
bool FakeVimOptionPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
} // namespace Internal
} // namespace FakeVim

View File

@@ -36,6 +36,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QFileInfo>
#include <QtCore/QDebug>
#include <QtCore/QTextStream>
#include <QtGui/QMessageBox>
namespace Git {
@@ -75,8 +76,21 @@ void SettingsPageWidget::setSystemPath()
m_ui.pathLineEdit->setText(QLatin1String(qgetenv("PATH")));
}
QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << ' ' << m_ui.pathlabel->text() << ' ' << m_ui.logCountLabel->text()
<< ' ' << m_ui.timeoutLabel->text()
<< ' ' << m_ui.promptToSubmitCheckBox->text()
<< ' ' << m_ui.omitAnnotationDataCheckBox->text()
<< ' ' << m_ui.environmentGroupBox->title();
rc.remove(QLatin1Char('&'));
return rc;
}
// -------- SettingsPage
SettingsPage::SettingsPage()
SettingsPage::SettingsPage() :
m_widget(0)
{
}
@@ -104,6 +118,8 @@ QWidget *SettingsPage::createPage(QWidget *parent)
{
m_widget = new SettingsPageWidget(parent);
m_widget->setSettings(GitPlugin::instance()->settings());
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -121,5 +137,11 @@ void SettingsPage::apply()
GitPlugin::instance()->setSettings(newSettings);
}
bool SettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
}
}

View File

@@ -54,6 +54,8 @@ public:
GitSettings settings() const;
void setSettings(const GitSettings &);
QString searchKeywords() const;
private slots:
void setSystemPath();
@@ -76,8 +78,10 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &) const;
private:
QString m_searchKeywords;
SettingsPageWidget* m_widget;
};

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>409</width>
<height>251</height>
<height>279</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -66,6 +66,10 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Miscellaneous</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="logCountLabel">
@@ -107,7 +111,7 @@
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="promptToSubmitCheckBox">
<property name="text">
<string>Prompt to submit</string>
<string>Prompt on submit</string>
</property>
</widget>
</item>
@@ -119,6 +123,7 @@
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">

View File

@@ -75,7 +75,8 @@ QWidget *DocSettingsPage::createPage(QWidget *parent)
m_ui.docsListWidget->addItems(m_helpEngine->registeredDocumentations());
m_registeredDocs = false;
m_removeDocs.clear();
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_ui.groupBox->title();
return w;
}
@@ -126,6 +127,11 @@ void DocSettingsPage::apply()
emit dialogAccepted();
}
bool DocSettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
bool DocSettingsPage::applyChanges()
{
QStringList::const_iterator it = m_removeDocs.constBegin();

View File

@@ -56,6 +56,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &s) const;
bool applyChanges();
@@ -72,6 +73,7 @@ private:
bool m_registeredDocs;
QStringList m_removeDocs;
Ui::DocSettingsPage m_ui;
QString m_searchKeywords;
};
} // namespace Help

View File

@@ -78,6 +78,9 @@ QWidget *FilterSettingsPage::createPage(QWidget *parent)
SLOT(removeFilter()));
updateFilterPage();
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_ui.filterGroupBox->title() + QLatin1Char(' ') + m_ui.attributesGroupBox->title();
return m_currentPage;
}
@@ -220,3 +223,10 @@ bool FilterSettingsPage::applyChanges()
}
return false;
}
bool FilterSettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -55,6 +55,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &s) const;
bool applyChanges();
@@ -72,6 +73,7 @@ private:
QMap<QString, QStringList> m_filterMap;
QStringList m_removedFilters;
QWidget *m_currentPage;
QString m_searchKeywords;
};
} // namespace Help

View File

@@ -12,9 +12,9 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="mainHorizontalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="filterGroupBox">
<property name="title">
<string>Filters</string>
</property>
@@ -26,7 +26,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="attributesGroupBox">
<property name="title">
<string>Attributes</string>
</property>
@@ -55,7 +55,7 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="buttonHorizontalLayout">
<item>
<widget class="QPushButton" name="filterAddButton">
<property name="text">
@@ -71,7 +71,7 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<spacer name="buttonHorizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>

View File

@@ -127,6 +127,12 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent)
connect(m_ui.importButton, SIGNAL(clicked()), this, SLOT(importBookmarks()));
connect(m_ui.exportButton, SIGNAL(clicked()), this, SLOT(exportBookmarks()));
if (m_searchKeywords.isEmpty()) {
QTextStream(&m_searchKeywords) << ' ' << m_ui.contextHelpLabel->text()
<< ' ' << m_ui.startPageLabel->text() << ' ' << m_ui.homePageLabel->text()
<< ' ' << m_ui.bookmarkGroupBox->title();
m_searchKeywords.remove(QLatin1Char('&'));
}
return m_currentPage;
}
@@ -324,3 +330,8 @@ int GeneralSettingsPage::closestPointSizeIndex(int desiredPointSize) const
}
return closestIndex;
}
bool GeneralSettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -63,6 +63,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish();
virtual bool matches(const QString &s) const;
signals:
void fontChanged();
@@ -90,6 +91,7 @@ private:
QFontDatabase fontDatabase;
Ui::GeneralSettingsPage m_ui;
QString m_searchKeywords;
};
} // Internal

View File

@@ -2,26 +2,18 @@
<ui version="4.0">
<class>GeneralSettingsPage</class>
<widget class="QWidget" name="GeneralSettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>593</width>
<height>371</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="fontGroupBox">
<property name="title">
<string>Font</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="familyLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -53,7 +45,7 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="label_7">
<widget class="QLabel" name="styleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -92,7 +84,7 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="sizeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -131,7 +123,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="startupGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
@@ -140,9 +132,9 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QFormLayout" name="startupFormLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="contextHelpLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -179,21 +171,8 @@
</item>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="startPageLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -230,18 +209,14 @@
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label">
<item row="2" column="0">
<widget class="QLabel" name="homePageLabel">
<property name="text">
<string>Home Page:</string>
</property>
</widget>
</item>
<item>
<item row="2" column="1">
<widget class="QLineEdit" name="homePageLineEdit"/>
</item>
</layout>
@@ -288,13 +263,13 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<widget class="QGroupBox" name="bookmarkGroupBox">
<property name="title">
<string>Help Bookmarks</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="bookmarkHorizontalLayout">
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
@@ -363,9 +338,6 @@
</disabled>
</palette>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
@@ -376,10 +348,13 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>126</height>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -90,6 +90,10 @@ QWidget *SettingsPage::createPage(QWidget *parent)
m_customFilters = m_plugin->customFilters();
saveFilterStates();
updateFilterList();
if (m_searchKeywords.isEmpty()) {
m_searchKeywords = m_ui.refreshIntervalLabel->text();
m_searchKeywords.remove(QLatin1Char('&'));
}
return m_page;
}
@@ -220,3 +224,8 @@ void SettingsPage::removeCustomFilter()
}
updateFilterList();
}
bool SettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -63,6 +63,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish();
virtual bool matches(const QString &) const;
private slots:
void updateButtonStates();
@@ -85,6 +86,7 @@ private:
QList<ILocatorFilter *> m_customFilters;
QList<ILocatorFilter *> m_refreshFilters;
QHash<ILocatorFilter *, QByteArray> m_filterStates;
QString m_searchKeywords;
};
} // namespace Internal

View File

@@ -15,10 +15,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Configure Filters</string>
</property>
<widget class="QGroupBox" name="configurationGroupBox">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QListWidget" name="filterList">
@@ -77,7 +74,7 @@
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="refreshIntervalLabel">
<property name="text">
<string>Refresh Interval:</string>
</property>

View File

@@ -36,6 +36,7 @@
#include <QtGui/QApplication>
#include <QtGui/QLineEdit>
#include <QtGui/QFileDialog>
#include <QtCore/QTextStream>
using namespace Perforce::Internal;
using namespace Utils;
@@ -66,7 +67,7 @@ Settings SettingsPageWidget::settings() const
{
Settings settings;
settings.p4Command = m_ui.pathChooser->path();
settings.defaultEnv = m_ui.defaultCheckBox->isChecked();
settings.defaultEnv = !m_ui.environmentGroupBox->isChecked();
settings.p4Port = m_ui.portLineEdit->text();
settings.p4User = m_ui.userLineEdit->text();
settings.p4Client= m_ui.clientLineEdit->text();
@@ -77,7 +78,7 @@ Settings SettingsPageWidget::settings() const
void SettingsPageWidget::setSettings(const PerforceSettings &s)
{
m_ui.pathChooser->setPath(s.p4Command());
m_ui.defaultCheckBox->setChecked(s.defaultEnv());
m_ui.environmentGroupBox->setChecked(!s.defaultEnv());
m_ui.portLineEdit->setText(s.p4Port());
m_ui.clientLineEdit->setText(s.p4Client());
m_ui.userLineEdit->setText(s.p4User());
@@ -92,6 +93,17 @@ void SettingsPageWidget::setStatusText(bool ok, const QString &t)
m_ui.errorLabel->setText(t);
}
QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << m_ui.promptToSubmitCheckBox->text()
<< ' ' << m_ui.commandLabel << m_ui.environmentGroupBox->title()
<< ' ' << m_ui.clientLabel->text() << ' ' << m_ui.userLabel->text()
<< ' ' << m_ui.portLabel->text();
rc.remove(QLatin1Char('&'));
return rc;
}
SettingsPage::SettingsPage()
{
}
@@ -120,6 +132,8 @@ QWidget *SettingsPage::createPage(QWidget *parent)
{
m_widget = new SettingsPageWidget(parent);
m_widget->setSettings(PerforcePlugin::perforcePluginInstance()->settings());
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -127,3 +141,8 @@ void SettingsPage::apply()
{
PerforcePlugin::perforcePluginInstance()->setSettings(m_widget->settings());
}
bool SettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -51,6 +51,8 @@ public:
void setSettings(const PerforceSettings &);
Settings settings() const;
QString searchKeywords() const;
private slots:
void slotTest();
@@ -75,8 +77,10 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &) const;
private:
QString m_searchKeywords;
SettingsPageWidget* m_widget;
};

View File

@@ -2,47 +2,13 @@
<ui version="4.0">
<class>Perforce::Internal::SettingsPage</class>
<widget class="QWidget" name="Perforce::Internal::SettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>423</width>
<height>463</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="promptToSubmitCheckBox">
<property name="text">
<string>Prompt to submit</string>
<widget class="QGroupBox" name="configGroupBox">
<property name="title">
<string>Configuration</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="commandLabel">
<property name="text">
@@ -53,17 +19,11 @@
<item row="0" column="1">
<widget class="Utils::PathChooser" name="pathChooser"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="defaultCheckBox">
<property name="text">
<string>Use default P4 environment variables</string>
</property>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="environmentGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
@@ -71,6 +31,9 @@
<string>Environment variables</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout">
@@ -113,6 +76,38 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="miscgroupBox">
<property name="title">
<string>Miscellaneous</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="promptToSubmitCheckBox">
<property name="text">
<string>Prompt on submit</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@@ -144,8 +139,8 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>141</width>
<height>20</height>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
@@ -173,22 +168,5 @@
<tabstop>userLineEdit</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>defaultCheckBox</sender>
<signal>toggled(bool)</signal>
<receiver>groupBox</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>134</x>
<y>51</y>
</hint>
<hint type="destinationlabel">
<x>139</x>
<y>65</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>

View File

@@ -37,18 +37,14 @@
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
ProjectExplorerSettingsPage::ProjectExplorerSettingsPage()
ProjectExplorerSettingsPage::ProjectExplorerSettingsPage() :
m_searchKeywords(QLatin1String("jom"))
{
}
ProjectExplorerSettingsPage::~ProjectExplorerSettingsPage()
{
}
QString ProjectExplorerSettingsPage::id() const
{
return Constants::PROJECTEXPLORER_PAGE;
return QLatin1String(Constants::PROJECTEXPLORER_PAGE);
}
QString ProjectExplorerSettingsPage::trName() const
@@ -58,7 +54,7 @@ QString ProjectExplorerSettingsPage::trName() const
QString ProjectExplorerSettingsPage::category() const
{
return Constants::PROJECTEXPLORER_PAGE;
return QLatin1String(Constants::PROJECTEXPLORER_PAGE);
}
QString ProjectExplorerSettingsPage::trCategory() const
@@ -101,3 +97,8 @@ void ProjectExplorerSettingsPage::finish()
{
// Nothing to do
}
bool ProjectExplorerSettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -41,7 +41,6 @@ class ProjectExplorerSettingsPage : public Core::IOptionsPage
Q_OBJECT
public:
ProjectExplorerSettingsPage();
~ProjectExplorerSettingsPage();
virtual QString id() const;
virtual QString trName() const;
@@ -51,7 +50,10 @@ public:
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
virtual void finish();
virtual bool matches(const QString &s) const;
private:
const QString m_searchKeywords;
Ui::ProjectExplorerSettingsPageUi m_ui;
};

View File

@@ -12,10 +12,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Build and Run</string>
</property>
<widget class="QGroupBox" name="buildAndRunGroupBox">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="saveAllFilesCheckBox">

View File

@@ -6,21 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>282</width>
<height>296</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="titleLabel">
<property name="text">
<string>Installed S60 SDKs:</string>
</property>
</widget>
</item>
<widget class="QGroupBox" name="groupBox">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTreeWidget" name="list">
<property name="indentation">
@@ -92,6 +88,9 @@
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -16,6 +16,7 @@
#include <QtCore/QtConcurrentRun>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QTextStream>
#include <QtCore/QDateTime>
#include <QtGui/QHelpEvent>
#include <QtGui/QToolTip>
@@ -84,6 +85,8 @@ QWidget *QtOptionsPage::createPage(QWidget *parent)
{
QtVersionManager *vm = QtVersionManager::instance();
m_widget = new QtOptionsPageWidget(parent, vm->versions(), vm->defaultVersion());
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -99,6 +102,11 @@ void QtOptionsPage::apply()
vm->setNewQtVersions(versions, m_widget->defaultVersion());
}
bool QtOptionsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
//-----------------------------------------------------
@@ -728,3 +736,16 @@ int QtOptionsPageWidget::defaultVersion() const
{
return m_defaultVersion;
}
QString QtOptionsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << ' ' << m_ui->mingwLabel->text()
<< ' ' << m_ui->msvcLabel->text()
<< ' ' << m_ui->gcceLabel->text()
<< ' ' << m_ui->mwcLabel->text()
<< ' ' << m_ui->debuggingHelperLabel->text()
<< ' ' << m_ui->versionListGroupBox->title();
rc.remove(QLatin1Char('&'));
return rc;
}

View File

@@ -81,6 +81,7 @@ public:
QList<QSharedPointerQtVersion> versions() const;
int defaultVersion() const;
void finish();
QString searchKeywords() const;
virtual bool eventFilter(QObject *o, QEvent *e);
@@ -142,8 +143,11 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &) const;
private:
QtOptionsPageWidget *m_widget;
QString m_searchKeywords;
};
} //namespace Internal

View File

@@ -2,22 +2,41 @@
<ui version="4.0">
<class>Qt4ProjectManager::Internal::QtVersionManager</class>
<widget class="QWidget" name="Qt4ProjectManager::Internal::QtVersionManager">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>577</width>
<height>507</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="versionListGroupBox">
<property name="title">
<string>Qt versions</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTreeWidget" name="qtdirList">
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="columnCount">
<number>3</number>
</property>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>QMake Location</string>
</property>
</column>
<column>
<property name="text">
<string>Debugging Helper</string>
</property>
</column>
</widget>
</item>
<item>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
@@ -66,11 +85,49 @@
</item>
</layout>
</item>
<item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="versionNameLabel">
<property name="text">
<string>Version Name:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="nameEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pathLabel">
<property name="text">
<string>QMake Location:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="qmakePath"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mingwLabel">
<property name="text">
<string>MinGW Directory:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="mingwPath"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="msvcLabel">
<property name="text">
<string>MSVC Version:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="msvcHorizontalLayout">
<item>
<widget class="QComboBox" name="msvcComboBox">
<property name="sizePolicy">
@@ -100,8 +157,45 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="8" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item row="4" column="0">
<widget class="QLabel" name="s60SDKLabel">
<property name="text">
<string>S60 SDK:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="Utils::PathChooser" name="s60SDKPath"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="gcceLabel">
<property name="text">
<string>CSL/GCCE Directory:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="Utils::PathChooser" name="gccePath"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mwcLabel">
<property name="text">
<string>Carbide Directory:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="Utils::PathChooser" name="mwcPath"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="debuggingHelperLabel">
<property name="text">
<string>Debugging Helper:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<layout class="QHBoxLayout" name="debuggingHelperHorizontalLayout">
<item>
<widget class="QLabel" name="debuggingHelperStateLabel">
<property name="sizePolicy">
@@ -131,106 +225,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="0" column="0" colspan="2">
<widget class="QTreeWidget" name="qtdirList">
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="columnCount">
<number>3</number>
</property>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>QMake Location</string>
</property>
</column>
<column>
<property name="text">
<string>Debugging Helper</string>
</property>
</column>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="versionNameLabel">
<property name="text">
<string>Version Name:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="nameEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="pathLabel">
<property name="text">
<string>QMake Location:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="qmakePath" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mingwLabel">
<property name="text">
<string>MinGW Directory:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="mingwPath" native="true"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="msvcLabel">
<property name="text">
<string>MSVC Version:</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="s60SDKLabel">
<property name="text">
<string>S60 SDK:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="Utils::PathChooser" name="s60SDKPath" native="true"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="gcceLabel">
<property name="text">
<string>CSL/GCCE Directory:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="Utils::PathChooser" name="gccePath" native="true"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="mwcLabel">
<property name="text">
<string>Carbide Directory:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="Utils::PathChooser" name="mwcPath" native="true"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="debuggingHelperLabel">
<property name="text">
<string>Debugging Helper:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="errorLabel">
<property name="text">
<string/>
@@ -238,18 +233,20 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QFormLayout" name="defaultFormLayout">
<item row="0" column="0">
<widget class="QLabel" name="defaultLabel">
<property name="text">
<string>Default Qt Version:</string>
</property>
</widget>
</item>
<item>
<item row="0" column="1">
<widget class="QComboBox" name="defaultCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">

View File

@@ -37,6 +37,7 @@
#include <utils/pathchooser.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QTextStream>
#include <QtGui/QFileDialog>
using namespace Subversion::Internal;
@@ -72,7 +73,19 @@ void SettingsPageWidget::setSettings(const SubversionSettings &s)
m_ui.promptToSubmitCheckBox->setChecked(s.promptToSubmit);
}
SettingsPage::SettingsPage()
QString SettingsPageWidget::searchKeywords() const
{
QString rc;
QTextStream(&rc) << m_ui.commandLabel->text()
<< ' ' << m_ui.usernameLabel->text()
<< ' ' << m_ui.passwordLabel->text()
<< ' ' << m_ui.userGroupBox->title();
rc.remove(QLatin1Char('&'));
return rc;
}
SettingsPage::SettingsPage() :
m_widget(0)
{
}
@@ -100,6 +113,8 @@ QWidget *SettingsPage::createPage(QWidget *parent)
{
m_widget = new SettingsPageWidget(parent);
m_widget->setSettings(SubversionPlugin::subversionPluginInstance()->settings());
if (m_searchKeywords.isEmpty())
m_searchKeywords = m_widget->searchKeywords();
return m_widget;
}
@@ -107,3 +122,8 @@ void SettingsPage::apply()
{
SubversionPlugin::subversionPluginInstance()->setSettings(m_widget->settings());
}
bool SettingsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -55,6 +55,8 @@ public:
SubversionSettings settings() const;
void setSettings(const SubversionSettings &);
QString searchKeywords() const;
private:
Ui::SettingsPage m_ui;
};
@@ -75,8 +77,10 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &) const;
private:
QString m_searchKeywords;
SettingsPageWidget* m_widget;
};

View File

@@ -6,45 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>575</width>
<height>437</height>
<width>473</width>
<height>295</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="generalGroupBox">
<property name="title">
<string>Configuration</string>
</property>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="promptToSubmitCheckBox">
<property name="text">
<string>Prompt to submit</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="topverticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout_2">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="commandLabel">
<property name="text">
@@ -56,6 +28,7 @@
<widget class="Utils::PathChooser" name="pathChooser"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="userGroupBox">
@@ -93,6 +66,22 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="miscGroupBox">
<property name="title">
<string>Miscellaneous</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="promptToSubmitCheckBox">
<property name="text">
<string>Prompt on submit</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
@@ -107,21 +96,6 @@
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>105</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>

View File

@@ -35,6 +35,7 @@
#include <coreplugin/icore.h>
#include <QtCore/QSettings>
#include <QtCore/QTextStream>
using namespace TextEditor;
@@ -46,6 +47,7 @@ struct BehaviorSettingsPage::BehaviorSettingsPagePrivate
Ui::BehaviorSettingsPage m_page;
TabSettings m_tabSettings;
StorageSettings m_storageSettings;
QString m_searchKeywords;
};
BehaviorSettingsPage::BehaviorSettingsPagePrivate::BehaviorSettingsPagePrivate
@@ -95,6 +97,15 @@ QWidget *BehaviorSettingsPage::createPage(QWidget *parent)
QWidget *w = new QWidget(parent);
m_d->m_page.setupUi(w);
settingsToUI();
if (m_d->m_searchKeywords.isEmpty()) {
QTextStream(&m_d->m_searchKeywords) << m_d->m_page.insertSpaces->text()
<< ' ' << m_d->m_page.smartBackspace->text()
<< ' ' << m_d->m_page.cleanWhitespace->text()
<< ' ' << m_d->m_page.addFinalNewLine->text()
<< ' ' << m_d->m_page.groupBoxTabAndIndentSettings->title()
<< ' ' << m_d->m_page.groupBoxStorageSettings->title();
m_d->m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
}
@@ -167,3 +178,8 @@ StorageSettings BehaviorSettingsPage::storageSettings() const
{
return m_d->m_storageSettings;
}
bool BehaviorSettingsPage::matches(const QString &s) const
{
return m_d->m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -70,6 +70,8 @@ public:
TabSettings tabSettings() const;
StorageSettings storageSettings() const;
virtual bool matches(const QString &s) const;
signals:
void tabSettingsChanged(const TextEditor::TabSettings &);
void storageSettingsChanged(const TextEditor::StorageSettings &);

View File

@@ -138,7 +138,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="tabKeyIndentLabel">
<property name="text">
<string>Tab key performs auto-indent:</string>
</property>

View File

@@ -34,6 +34,7 @@
#include <coreplugin/icore.h>
#include <QtCore/QSettings>
#include <QtCore/QTextStream>
using namespace TextEditor;
@@ -44,6 +45,7 @@ struct DisplaySettingsPage::DisplaySettingsPagePrivate
const DisplaySettingsPageParameters m_parameters;
Ui::DisplaySettingsPage m_page;
DisplaySettings m_displaySettings;
QString m_searchKeywords;
};
DisplaySettingsPage::DisplaySettingsPagePrivate::DisplaySettingsPagePrivate
@@ -92,6 +94,17 @@ QWidget *DisplaySettingsPage::createPage(QWidget *parent)
QWidget *w = new QWidget(parent);
m_d->m_page.setupUi(w);
settingsToUI();
if (m_d->m_searchKeywords.isEmpty()) {
QTextStream(&m_d->m_searchKeywords) << m_d->m_page.displayLineNumbers->text()
<< ' ' << m_d->m_page.highlightCurrentLine->text()
<< ' ' << m_d->m_page.displayFoldingMarkers->text()
<< ' ' << m_d->m_page.highlightBlocks->text()
<< ' ' << m_d->m_page.visualizeWhitespace->text()
<< ' ' << m_d->m_page.animateMatchingParentheses->text()
<< ' ' << m_d->m_page.enableTextWrapping->text()
<< ' ' << m_d->m_page.mouseNavigation->text();
m_d->m_searchKeywords.remove(QLatin1Char('&'));
}
return w;
}
@@ -160,3 +173,8 @@ void DisplaySettingsPage::setDisplaySettings(const DisplaySettings &newDisplaySe
emit displaySettingsChanged(newDisplaySettings);
}
}
bool DisplaySettingsPage::matches(const QString &s) const
{
return m_d->m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -65,6 +65,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
virtual bool matches(const QString &s) const;
DisplaySettings displaySettings() const;
void setDisplaySettings(const DisplaySettings &);

View File

@@ -133,6 +133,7 @@ public:
Ui::FontSettingsPage ui;
SchemeListModel *m_schemeListModel;
bool m_refreshingSchemeList;
QString m_searchKeywords;
};
} // namespace Internal
@@ -367,6 +368,8 @@ QWidget *FontSettingsPage::createPage(QWidget *parent)
updatePointSizes();
refreshColorSchemeList();
d_ptr->m_lastValue = d_ptr->m_value;
if (d_ptr->m_searchKeywords.isEmpty())
d_ptr->m_searchKeywords = d_ptr->ui.fontGroupBox->title() + QLatin1Char(' ') + d_ptr->ui.colorSchemeGroupBox->title();
return w;
}
@@ -618,3 +621,8 @@ const FontSettings &FontSettingsPage::fontSettings() const
{
return d_ptr->m_value;
}
bool FontSettingsPage::matches(const QString &s) const
{
return d_ptr->m_searchKeywords.contains(s, Qt::CaseInsensitive);
}

View File

@@ -97,6 +97,7 @@ public:
QWidget *createPage(QWidget *parent);
void apply();
void finish();
virtual bool matches(const QString &) const;
void saveSettings();

View File

@@ -12,13 +12,13 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="fontGroupBox">
<property name="title">
<string>Font</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="familyLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -57,7 +57,7 @@
</spacer>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="sizeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -103,7 +103,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="colorSchemeGroupBox">
<property name="title">
<string>Color Scheme</string>
</property>

View File

@@ -2,39 +2,68 @@
<ui version="4.0">
<class>VCSBaseSettingsPage</class>
<widget class="QWidget" name="VCSBaseSettingsPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>536</width>
<height>407</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Common</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="commonGroupBox">
<layout class="QFormLayout" name="formLayout">
<property name="rowWrapPolicy">
<enum>QFormLayout::WrapLongRows</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="submitMessageCheckScriptLabel">
<property name="toolTip">
<string>An executable which is called with the submit message in a temporary file as first argument. It should return with an exit != 0 and a message on standard error to indicate failure.</string>
</property>
<property name="text">
<string>Submit message check script:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="submitMessageCheckScriptChooser"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="nickNameMailMapLabel">
<property name="toolTip">
<string>A file listing user names and email addresses in a 4-column mailmap format:
name &lt;email&gt; alias &lt;email&gt;</string>
</property>
<property name="text">
<string>User/alias configuration file:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="nickNameMailMapChooser"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="nickNameFieldsFileLabel">
<property name="toolTip">
<string>A simple file containing lines with field names like &quot;Reviewed-By:&quot; which will be added below the submit editor.</string>
</property>
<property name="text">
<string>User fields configuration file:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="nickNameFieldsFileChooser"/>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="lineWrapCheckBox">
<property name="text">
<string>Wrap submit message at:</string>
</property>
</widget>
</item>
<item>
<item row="0" column="1">
<widget class="QSpinBox" name="lineWrapSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="suffix">
<string>characters</string>
</property>
<property name="minimum">
<number>40</number>
</property>
@@ -46,72 +75,6 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="rowWrapPolicy">
<enum>QFormLayout::WrapLongRows</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="submitMessageCheckScriptLabel">
<property name="toolTip">
<string>An executable which is called with the submit message in a temporary file as first argument. It should return with an exit != 0 and a message on standard error to indicate failure.</string>
</property>
<property name="text">
<string>Submit message check script:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="submitMessageCheckScriptChooser" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="nickNameMailMapLabel">
<property name="toolTip">
<string>A file listing user names and email addresses in a 4-column mailmap format:
name &lt;email&gt; alias &lt;email&gt;</string>
</property>
<property name="text">
<string>User/alias configuration file:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="nickNameMailMapChooser" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="nickNameFieldsFileLabel">
<property name="toolTip">
<string>A simple file containing lines with field names like &quot;Reviewed-By:&quot; which will be added below the submit editor.</string>
</property>
<property name="text">
<string>User fields configuration file:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="nickNameFieldsFileChooser" native="true"/>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@@ -120,10 +83,13 @@ name &lt;email&gt; alias &lt;email&gt;</string>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>307</height>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
@@ -139,22 +105,5 @@ name &lt;email&gt; alias &lt;email&gt;</string>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>lineWrapCheckBox</sender>
<signal>toggled(bool)</signal>
<receiver>lineWrapSpinBox</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>186</x>
<y>58</y>
</hint>
<hint type="destinationlabel">
<x>225</x>
<y>58</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>