Commit ce497d20 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

improve accels in find-in-files dialog.

parent 01332cfb
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Find::Internal::FindDialog</class>
<widget class="QDialog" name="Find::Internal::FindDialog" >
<property name="geometry" >
<widget class="QDialog" name="Find::Internal::FindDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
......@@ -9,109 +10,109 @@
<height>168</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Search for...</string>
</property>
<property name="sizeGripEnabled" >
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="text" >
<property name="text">
<string>Sc&amp;ope:</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>filterList</cstring>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="filterList" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<item row="0" column="1">
<widget class="QComboBox" name="filterList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QPushButton" name="searchButton" >
<property name="text" >
<item row="0" column="2">
<widget class="QPushButton" name="searchButton">
<property name="text">
<string>&amp;Search</string>
</property>
<property name="default" >
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Search &amp;for:</string>
</property>
<property name="alignment" >
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>searchTerm</cstring>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="searchTerm" />
<item row="1" column="1">
<widget class="QLineEdit" name="searchTerm"/>
</item>
<item row="1" column="2" >
<widget class="QPushButton" name="closeButton" >
<property name="text" >
<string>&amp;Close</string>
<item row="1" column="2">
<widget class="QPushButton" name="closeButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2" >
<widget class="QWidget" native="1" name="configWidget" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<item row="4" column="0" colspan="2">
<widget class="QWidget" name="configWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>10</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QCheckBox" name="matchCase" >
<property name="text" >
<string>Match &amp;case</string>
<item row="2" column="1">
<widget class="QCheckBox" name="matchCase">
<property name="text">
<string>&amp;Case sensitive</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QCheckBox" name="wholeWords" >
<property name="text" >
<item row="3" column="1">
<widget class="QCheckBox" name="wholeWords">
<property name="text">
<string>&amp;Whole words only</string>
</property>
</widget>
......@@ -119,11 +120,11 @@
</layout>
</item>
<item>
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
......
......@@ -108,12 +108,14 @@ QWidget *AllProjectsFind::createConfigWidget()
gridLayout->setMargin(0);
m_configWidget->setLayout(gridLayout);
gridLayout->addWidget(createRegExpWidget(), 0, 1);
QLabel * const filePatternLabel = new QLabel(tr("File pattern:"));
QLabel * const filePatternLabel = new QLabel(tr("File &pattern:"));
filePatternLabel->setMinimumWidth(80);
filePatternLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
filePatternLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
QWidget *patternWidget = createPatternWidget();
filePatternLabel->setBuddy(patternWidget);
gridLayout->addWidget(filePatternLabel, 1, 0, Qt::AlignRight);
gridLayout->addWidget(createPatternWidget(), 1, 1);
gridLayout->addWidget(patternWidget, 1, 1);
m_configWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
return m_configWidget;
......
......@@ -104,12 +104,14 @@ QWidget *CurrentProjectFind::createConfigWidget()
layout->setMargin(0);
m_configWidget->setLayout(layout);
layout->addWidget(createRegExpWidget(), 0, 1);
QLabel * const filePatternLabel = new QLabel(tr("File pattern:"));
QLabel * const filePatternLabel = new QLabel(tr("File &pattern:"));
filePatternLabel->setMinimumWidth(80);
filePatternLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
filePatternLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
QWidget *patternWidget = createPatternWidget();
filePatternLabel->setBuddy(patternWidget);
layout->addWidget(filePatternLabel, 1, 0, Qt::AlignRight);
layout->addWidget(createPatternWidget(), 1, 1);
layout->addWidget(patternWidget, 1, 1);
m_configWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
return m_configWidget;
......
......@@ -146,7 +146,7 @@ QWidget *BaseFileFind::createPatternWidget()
*/
QString filterToolTip = tr("List of comma separated wildcard filters");
/*
QLabel *label = new QLabel(tr("File pattern:"));
QLabel *label = new QLabel(tr("File &pattern:"));
label->setToolTip(filterToolTip);
*/
/*
......@@ -163,6 +163,7 @@ QWidget *BaseFileFind::createPatternWidget()
m_filterCombo->setToolTip(filterToolTip);
syncComboWithSettings(m_filterCombo, m_filterSetting);
/*
label->setBuddy(m_filterCombo);
hlayout->addWidget(m_filterCombo);
*/
return m_filterCombo;
......@@ -170,7 +171,7 @@ QWidget *BaseFileFind::createPatternWidget()
QWidget *BaseFileFind::createRegExpWidget()
{
m_useRegExpCheckBox = new QCheckBox(tr("Use Regular Expressions"));
m_useRegExpCheckBox = new QCheckBox(tr("Use Regular E&xpressions"));
m_useRegExpCheckBox->setChecked(m_useRegExp);
connect(m_useRegExpCheckBox, SIGNAL(toggled(bool)), this, SLOT(syncRegExpSetting(bool)));
return m_useRegExpCheckBox;
......
......@@ -88,7 +88,8 @@ QWidget *FindInFiles::createConfigWidget()
m_configWidget->setLayout(gridLayout);
gridLayout->addWidget(createRegExpWidget(), 0, 1, 1, 2);
gridLayout->addWidget(new QLabel(tr("Directory:")), 1, 0, Qt::AlignRight);
QLabel *dirLabel = new QLabel(tr("&Directory:"));
gridLayout->addWidget(dirLabel, 1, 0, Qt::AlignRight);
m_directory = new QComboBox;
m_directory->setEditable(true);
m_directory->setMaxCount(30);
......@@ -98,17 +99,20 @@ QWidget *FindInFiles::createConfigWidget()
m_directory->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_directory->setModel(&m_directoryStrings);
syncComboWithSettings(m_directory, m_directorySetting);
dirLabel->setBuddy(m_directory);
gridLayout->addWidget(m_directory, 1, 1);
QPushButton *browseButton = new QPushButton(tr("Browse"));
QPushButton *browseButton = new QPushButton(tr("&Browse"));
gridLayout->addWidget(browseButton, 1, 2);
connect(browseButton, SIGNAL(clicked()), this, SLOT(openFileBrowser()));
QLabel * const filePatternLabel = new QLabel(tr("File pattern:"));
QLabel * const filePatternLabel = new QLabel(tr("File &pattern:"));
filePatternLabel->setMinimumWidth(80);
filePatternLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
filePatternLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
QWidget *patternWidget = createPatternWidget();
filePatternLabel->setBuddy(patternWidget);
gridLayout->addWidget(filePatternLabel, 2, 0);
gridLayout->addWidget(createPatternWidget(), 2, 1, 1, 2);
gridLayout->addWidget(patternWidget, 2, 1, 1, 2);
m_configWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
return m_configWidget;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment