aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <[email protected]>2015-07-30 21:42:43 +0200
committerChristoph Cullmann <[email protected]>2015-07-30 21:42:43 +0200
commit69a9af2fd6f51c15cddc51d9ed0719f2cb43b889 (patch)
tree63726287a603a45d842e097a98d3d2639a356c6a
parentb8b5d066e40cf92ac34e66c52438a8b2d7838d01 (diff)
Revert "rework a bit the search & replace in files, we can revert that again if not wanted, but we want a backup of the ui file in any case in the public git ;=)"
-rw-r--r--addons/search/plugin_search.cpp122
-rw-r--r--addons/search/plugin_search.h2
-rw-r--r--addons/search/results.ui56
-rw-r--r--addons/search/search.ui692
4 files changed, 469 insertions, 403 deletions
diff --git a/addons/search/plugin_search.cpp b/addons/search/plugin_search.cpp
index a26f9f1..072180b 100644
--- a/addons/search/plugin_search.cpp
+++ b/addons/search/plugin_search.cpp
@@ -59,7 +59,7 @@ static QUrl localFileDirUp (const QUrl &url)
{
if (!url.isLocalFile())
return url;
-
+
// else go up
return QUrl::fromLocalFile (QFileInfo (url.toLocalFile()).dir().absolutePath());
}
@@ -227,7 +227,7 @@ m_mainWindow (mainWin)
{
KXMLGUIClient::setComponentName (QStringLiteral("katesearch"), i18n ("Kate Search & Replace"));
setXMLFile( QStringLiteral("ui.rc") );
-
+
m_toolView = mainWin->createToolView (plugin, QStringLiteral("kate_plugin_katesearch"),
KTextEditor::MainWindow::Bottom,
QIcon::fromTheme(QStringLiteral("edit-find")),
@@ -259,7 +259,7 @@ m_mainWindow (mainWin)
m_ui.resultTabWidget->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab);
KAcceleratorManager::setNoAccel(m_ui.resultTabWidget);
- m_ui.displayOptions->setIcon(QIcon::fromTheme(QStringLiteral("games-config-options")));
+ m_ui.displayOptions->setIcon(QIcon::fromTheme(QStringLiteral("arrow-down-double")));
m_ui.searchButton->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
m_ui.stopButton->setIcon(QIcon::fromTheme(QStringLiteral("process-stop")));
m_ui.searchPlaceCombo->setItemIcon(CurrentFile, QIcon::fromTheme(QStringLiteral("text-plain")));
@@ -276,10 +276,6 @@ m_mainWindow (mainWin)
addTab();
m_ui.resultTabWidget->tabBar()->hide();
- // hide stop
- m_ui.nextButton->setVisible(true);
- m_ui.stopButton->setVisible(false);
-
// get url-requester's combo box and sanely initialize
KComboBox* cmbUrl = m_ui.folderRequester->comboBox();
cmbUrl->setDuplicatesEnabled(false);
@@ -319,6 +315,12 @@ m_mainWindow (mainWin)
connect(m_ui.nextButton, SIGNAL(clicked()), this, SLOT(goToNextMatch()));
+ connect(m_ui.replaceButton, SIGNAL(clicked(bool)), this, SLOT(replaceSingleMatch()));
+ connect(m_ui.replaceCheckedBtn, SIGNAL(clicked(bool)), this, SLOT(replaceChecked()));
+ connect(m_ui.replaceCombo->lineEdit(), SIGNAL(returnPressed()), this, SLOT(replaceChecked()));
+
+
+
m_ui.displayOptions->setChecked(true);
connect(&m_searchOpenFiles, SIGNAL(matchFound(QString,QString,int,int,QString,int)),
@@ -355,6 +357,12 @@ m_mainWindow (mainWin)
m_ui.searchCombo->lineEdit()->setClearButtonEnabled(true);
m_ui.searchCombo->setMaxCount(25);
+ m_ui.replaceCombo->completer()->setCompletionMode(QCompleter::PopupCompletion);
+ m_ui.searchCombo->completer()->setCaseSensitivity(Qt::CaseSensitive);
+ m_ui.replaceCombo->setInsertPolicy(QComboBox::NoInsert);
+ m_ui.replaceCombo->lineEdit()->setClearButtonEnabled(true);
+ m_ui.replaceCombo->setMaxCount(25);
+
connect(m_mainWindow, SIGNAL(unhandledShortcutOverride(QEvent*)),
this, SLOT(handleEsc(QEvent*)));
@@ -703,7 +711,7 @@ void KatePluginSearchView::addMatchMark(KTextEditor::Document* doc, int line, in
KTextEditor::ConfigInterface* ciface = qobject_cast<KTextEditor::ConfigInterface*>(m_mainWindow->activeView());
KTextEditor::Attribute::Ptr attr(new KTextEditor::Attribute());
- bool replace = ((sender() == &m_replacer) || (sender() == 0) || sender()->property("replaceButton").isValid());
+ bool replace = ((sender() == &m_replacer) || (sender() == 0) || (sender() == m_ui.replaceButton));
if (replace) {
QColor replaceColor(Qt::green);
if (ciface) replaceColor = ciface->configValue(QStringLiteral("replace-highlight-color")).value<QColor>();
@@ -899,11 +907,10 @@ void KatePluginSearchView::startSearch()
m_ui.searchButton->setDisabled(true);
m_ui.displayOptions->setChecked (false);
m_ui.displayOptions->setDisabled(true);
- m_curResults->replaceCheckedBtn->setDisabled(true);
- m_curResults->replaceButton->setDisabled(true);
- m_ui.nextButton->setVisible(false);
- m_ui.stopButton->setVisible(true);
- m_curResults->replaceCombo->setDisabled(true);
+ m_ui.replaceCheckedBtn->setDisabled(true);
+ m_ui.replaceButton->setDisabled(true);
+ m_ui.nextAndStop->setCurrentIndex(1);
+ m_ui.replaceCombo->setDisabled(true);
clearMarks();
@@ -1034,8 +1041,8 @@ void KatePluginSearchView::startSearchWhileTyping()
m_curResults->regExp = reg;
m_curResults->fixedString = !m_ui.useRegExp->isChecked();
- m_curResults->replaceCheckedBtn->setDisabled(true);
- m_curResults->replaceButton->setDisabled(true);
+ m_ui.replaceCheckedBtn->setDisabled(true);
+ m_ui.replaceButton->setDisabled(true);
m_ui.nextButton->setDisabled(true);
@@ -1072,17 +1079,16 @@ void KatePluginSearchView::searchDone()
m_ui.newTabButton->setDisabled(false);
m_ui.searchCombo->setDisabled(false);
m_ui.searchButton->setDisabled(false);
- m_ui.nextButton->setVisible(true);
- m_ui.stopButton->setVisible(false);
+ m_ui.nextAndStop->setCurrentIndex(0);
m_ui.displayOptions->setDisabled(false);
+ m_ui.replaceCombo->setDisabled(false);
if (!m_curResults) {
return;
}
- m_curResults->replaceCombo->setDisabled(false);
- m_curResults->replaceCheckedBtn->setDisabled(m_curResults->matches < 1);
- m_curResults->replaceButton->setDisabled(m_curResults->matches < 1);
+ m_ui.replaceCheckedBtn->setDisabled(m_curResults->matches < 1);
+ m_ui.replaceButton->setDisabled(m_curResults->matches < 1);
m_ui.nextButton->setDisabled(m_curResults->matches < 1);
m_curResults->tree->sortItems(0, Qt::AscendingOrder);
@@ -1160,8 +1166,8 @@ void KatePluginSearchView::searchWhileTypingDone()
bool popupVisible = m_ui.searchCombo->lineEdit()->completer()->popup()->isVisible();
- m_curResults->replaceCheckedBtn->setDisabled(m_curResults->matches < 1);
- m_curResults->replaceButton->setDisabled(m_curResults->matches < 1);
+ m_ui.replaceCheckedBtn->setDisabled(m_curResults->matches < 1);
+ m_ui.replaceButton->setDisabled(m_curResults->matches < 1);
m_ui.nextButton->setDisabled(m_curResults->matches < 1);
m_curResults->tree->expandAll();
@@ -1236,17 +1242,16 @@ void KatePluginSearchView::replaceSingleMatch()
m_ui.searchCombo->setCurrentIndex(1);
}
+ if (m_ui.replaceCombo->findText(m_ui.replaceCombo->currentText()) == -1) {
+ m_ui.replaceCombo->insertItem(1, m_ui.replaceCombo->currentText());
+ m_ui.replaceCombo->setCurrentIndex(1);
+ }
+
// check if the cursor is at the current item if not jump there
Results *res = qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget());
if (!res) {
return;
}
-
- if (res->replaceCombo->findText(res->replaceCombo->currentText()) == -1) {
- res->replaceCombo->insertItem(1, res->replaceCombo->currentText());
- res->replaceCombo->setCurrentIndex(1);
- }
-
QTreeWidgetItem *item = res->tree->currentItem();
if (!item || !item->parent()) {
// nothing was selected
@@ -1292,7 +1297,7 @@ void KatePluginSearchView::replaceSingleMatch()
return;
}
- QString replaceText = res->replaceCombo->currentText();
+ QString replaceText = m_ui.replaceCombo->currentText();
replaceText.replace(QStringLiteral("\\\\"), QStringLiteral("¤Search&Replace¤"));
for (int j=1; j<=match.lastCapturedIndex() ; j++) {
replaceText.replace(QString(QStringLiteral("\\%1")).arg(j), match.captured(j));
@@ -1337,22 +1342,21 @@ void KatePluginSearchView::replaceChecked()
m_ui.searchCombo->setCurrentIndex(1);
}
+ if (m_ui.replaceCombo->findText(m_ui.replaceCombo->currentText()) == -1) {
+ m_ui.replaceCombo->insertItem(1, m_ui.replaceCombo->currentText());
+ m_ui.replaceCombo->setCurrentIndex(1);
+ }
+
m_curResults =qobject_cast<Results *>(m_ui.resultTabWidget->currentWidget());
if (!m_curResults) {
qWarning() << "Results not found";
return;
}
- if (m_curResults->replaceCombo->findText(m_curResults->replaceCombo->currentText()) == -1) {
- m_curResults->replaceCombo->insertItem(1, m_curResults->replaceCombo->currentText());
- m_curResults->replaceCombo->setCurrentIndex(1);
- }
-
- m_ui.nextButton->setVisible(false);
- m_ui.stopButton->setVisible(true);
+ m_ui.nextAndStop->setCurrentIndex(1);
m_ui.displayOptions->setChecked(false);
- m_curResults->replace = m_curResults->replaceCombo->currentText();
+ m_curResults->replace = m_ui.replaceCombo->currentText();
m_replacer.replaceChecked(m_curResults->tree,
m_curResults->regExp,
@@ -1361,12 +1365,8 @@ void KatePluginSearchView::replaceChecked()
void KatePluginSearchView::replaceDone()
{
- m_ui.nextButton->setVisible(true);
- m_ui.stopButton->setVisible(false);
-
- if (m_curResults) {
- m_curResults->replaceCombo->setDisabled(false);
- }
+ m_ui.nextAndStop->setCurrentIndex(0);
+ m_ui.replaceCombo->setDisabled(false);
}
void KatePluginSearchView::docViewChanged()
@@ -1535,11 +1535,9 @@ void KatePluginSearchView::readSessionConfig(const KConfigGroup &cg)
m_ui.searchCombo->clear();
m_ui.searchCombo->addItem(QString()); // Add empty Item
m_ui.searchCombo->addItems(cg.readEntry("Search", QStringList()));
-
- // FIXME RP m_ui.replaceCombo->clear();
- // FIXME RP m_ui.replaceCombo->addItem(QString()); // Add empty Item
- // FIXME RP m_ui.replaceCombo->addItems(cg.readEntry("Replaces", QStringList()));
-
+ m_ui.replaceCombo->clear();
+ m_ui.replaceCombo->addItem(QString()); // Add empty Item
+ m_ui.replaceCombo->addItems(cg.readEntry("Replaces", QStringList()));
m_ui.matchCase->setChecked(cg.readEntry("MatchCase", false));
m_ui.useRegExp->setChecked(cg.readEntry("UseRegExp", false));
m_ui.expandResults->setChecked(cg.readEntry("ExpandSearchResults", false));
@@ -1578,10 +1576,8 @@ void KatePluginSearchView::writeSessionConfig(KConfigGroup &cg)
}
cg.writeEntry("Search", searchHistoy);
QStringList replaceHistoy;
- if (m_curResults) {
- for (int i=1; i<m_curResults->replaceCombo->count(); i++) {
- replaceHistoy << m_curResults->replaceCombo->itemText(i);
- }
+ for (int i=1; i<m_ui.replaceCombo->count(); i++) {
+ replaceHistoy << m_ui.replaceCombo->itemText(i);
}
cg.writeEntry("Replaces", replaceHistoy);
@@ -1637,18 +1633,6 @@ void KatePluginSearchView::addTab()
m_ui.resultTabWidget->tabBar()->show();
m_ui.displayOptions->setChecked(false);
- res->replaceCombo->completer()->setCompletionMode(QCompleter::PopupCompletion);
- res->replaceCombo->completer()->setCaseSensitivity(Qt::CaseSensitive);
- res->replaceCombo->setInsertPolicy(QComboBox::NoInsert);
- res->replaceCombo->lineEdit()->setClearButtonEnabled(true);
- res->replaceCombo->setMaxCount(25);
-
- res->replaceButton->setProperty("replaceButton", QVariant(true));
-
- connect(res->replaceButton, SIGNAL(clicked(bool)), this, SLOT(replaceSingleMatch()));
- connect(res->replaceCheckedBtn, SIGNAL(clicked(bool)), this, SLOT(replaceChecked()));
- connect(res->replaceCombo->lineEdit(), SIGNAL(returnPressed()), this, SLOT(replaceChecked()));
-
res->tree->installEventFilter(this);
}
@@ -1871,19 +1855,19 @@ bool KateSearchCommand::exec (KTextEditor::View* /*view*/, const QString& cmd, Q
if (command == QStringLiteral("newGrep"))
emit newTab();
}
-
+
else if (command == QStringLiteral("search") || command == QStringLiteral("newSearch")) {
emit setSearchPlace(KatePluginSearchView::OpenFiles);
if (command == QStringLiteral("newSearch"))
emit newTab();
}
-
+
else if (command == QStringLiteral("pgrep") || command == QStringLiteral("newPGrep")) {
emit setSearchPlace(KatePluginSearchView::Project);
if (command == QStringLiteral("newPGrep"))
emit newTab();
}
-
+
emit setSearchString(searchText);
emit startSearch();
@@ -1905,14 +1889,14 @@ bool KateSearchCommand::help (KTextEditor::View */*view*/, const QString &cmd, Q
else if (cmd.startsWith(QStringLiteral("newSearch"))) {
msg = i18n("Usage: search [pattern to search for in open files]");
}
-
+
else if (cmd.startsWith(QStringLiteral("pgrep"))) {
msg = i18n("Usage: pgrep [pattern to search for in current project]");
}
else if (cmd.startsWith(QStringLiteral("newPGrep"))) {
msg = i18n("Usage: newPGrep [pattern to search for in current project]");
}
-
+
return true;
}
diff --git a/addons/search/plugin_search.h b/addons/search/plugin_search.h
index be6abd8..f5defad 100644
--- a/addons/search/plugin_search.h
+++ b/addons/search/plugin_search.h
@@ -197,7 +197,7 @@ private:
* current project plugin view, if any
*/
QObject *m_projectPluginView;
-
+
/**
* our main window
*/
diff --git a/addons/search/results.ui b/addons/search/results.ui
index 05795ad..a97d7f2 100644
--- a/addons/search/results.ui
+++ b/addons/search/results.ui
@@ -6,11 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
- <width>406</width>
- <height>149</height>
+ <width>381</width>
+ <height>110</height>
</rect>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_3" stretch="10">
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
<widget class="QTreeWidget" name="tree">
<property name="uniformRowHeights">
@@ -32,53 +35,6 @@
</column>
</widget>
</item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="replaceLabel">
- <property name="text">
- <string>&amp;Replace:</string>
- </property>
- <property name="buddy">
- <cstring>replaceCombo</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="replaceCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="replaceButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Replace</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="replaceCheckedBtn">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Replace checked</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
</layout>
</widget>
<resources/>
diff --git a/addons/search/search.ui b/addons/search/search.ui
index 8082e41..4fad0db 100644
--- a/addons/search/search.ui
+++ b/addons/search/search.ui
@@ -6,310 +6,408 @@
<rect>
<x>0</x>
<y>0</y>
- <width>773</width>
- <height>290</height>
+ <width>594</width>
+ <height>206</height>
</rect>
</property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QToolButton" name="newTabButton"/>
- </item>
- <item>
- <widget class="QLabel" name="findLabel">
- <property name="text">
- <string>Find</string>
- </property>
- <property name="buddy">
- <cstring>searchCombo</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="searchCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="searchButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Search</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="nextButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Next</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="stopButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Stop</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="displayOptions">
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
+ <layout class="QGridLayout" name="topLayout" rowstretch="0,0,0,1" columnstretch="0,0,1,0,0,0">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item row="1" column="0">
+ <widget class="QToolButton" name="displayOptions">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QPushButton" name="replaceButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Replace</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QPushButton" name="searchButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Search</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QToolButton" name="newTabButton">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" alignment="Qt::AlignRight">
+ <widget class="QLabel" name="findLabel">
+ <property name="text">
+ <string>Find</string>
+ </property>
+ <property name="buddy">
+ <cstring>searchCombo</cstring>
+ </property>
+ </widget>
</item>
- <item>
+ <item row="1" column="1" alignment="Qt::AlignRight">
+ <widget class="QLabel" name="replaceLabel">
+ <property name="text">
+ <string>Replace</string>
+ </property>
+ <property name="buddy">
+ <cstring>replaceCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="6">
<widget class="QStackedWidget" name="stackedWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
- <widget class="QWidget" name="optionsPage">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <widget class="QWidget" name="resultPage">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="2" column="0">
- <widget class="QLabel" name="filterLabel">
- <property name="text">
- <string>Fil&amp;ter</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>filterCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QCheckBox" name="recursiveCheckBox">
- <property name="text">
- <string>Recursive</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="hiddenCheckBox">
- <property name="text">
- <string>Include hidden</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="symLinkCheckBox">
- <property name="text">
- <string>Follow symbolic links</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="binaryCheckBox">
- <property name="text">
- <string>Include binary files</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="folderLabel">
- <property name="text">
- <string>Fo&amp;lder:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>folderRequester</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="KUrlComboRequester" name="folderRequester">
- <zorder>layoutWidget</zorder>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="folderUpButton">
- <property name="toolTip">
- <string>Go one folder up.</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="currentFolderButton">
- <property name="toolTip">
- <string>Use the current document's path.</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="0" column="1">
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="3">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>38</width>
- <height>28</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="4">
- <widget class="QLabel" name="label">
+ <widget class="QTabWidget" name="resultTabWidget">
+ <property name="tabsClosable">
+ <bool>true</bool>
+ </property>
+ <property name="movable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="optionsPage">
+ <layout class="QGridLayout" name="optionsLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item row="2" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>1</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="0">
+ <widget class="QWidget" name="folderOptions" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0,0,0,0" columnstretch="0,0,0,0,0,10">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="useRegExp">
+ <property name="text">
+ <string>Regular e&amp;xpressions</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="6">
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="5">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="KUrlComboRequester" name="folderRequester">
+ <property name="mode">
+ <set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="folderUpButton">
+ <property name="toolTip">
+ <string>Go one folder up.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="currentFolderButton">
+ <property name="toolTip">
+ <string>Use the current document's path.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="1" colspan="5">
+ <widget class="KComboBox" name="filterCombo">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAtTop</enum>
+ </property>
+ <item>
<property name="text">
- <string>Se&amp;arch in:</string>
- </property>
- <property name="buddy">
- <cstring>searchPlaceCombo</cstring>
+ <string>*</string>
</property>
- </widget>
- </item>
- <item row="0" column="5">
- <widget class="KComboBox" name="searchPlaceCombo">
- <item>
- <property name="text">
- <string>Current File</string>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="filterLabel">
+ <property name="text">
+ <string>Filter</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>filterCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="expandResults">
+ <property name="text">
+ <string extracomment="When this is checked the result treeview will be expanded after a search">Expand results</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QCheckBox" name="recursiveCheckBox">
+ <property name="text">
+ <string>Recursive</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="5">
+ <widget class="KComboBox" name="excludeCombo">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="folderLabel">
+ <property name="text">
+ <string>F&amp;older</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>folderRequester</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" alignment="Qt::AlignRight">
+ <widget class="QLabel" name="excludeLabel">
+ <property name="text">
+ <string>Exclude</string>
+ </property>
+ <property name="buddy">
+ <cstring>excludeCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="matchCase">
+ <property name="text">
+ <string>&amp;Match case</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="4">
+ <widget class="QCheckBox" name="binaryCheckBox">
+ <property name="text">
+ <string>Include binary files</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QCheckBox" name="hiddenCheckBox">
+ <property name="text">
+ <string>Include hidden</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QCheckBox" name="symLinkCheckBox">
+ <property name="text">
+ <string>Follow symbolic links</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- </item>
- <item>
- <property name="text">
- <string>Open Files</string>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>1</width>
+ <height>1</height>
+ </size>
</property>
- </item>
- <item>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
<property name="text">
- <string>Folder</string>
+ <string>Se&amp;arch in:</string>
</property>
- </item>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QCheckBox" name="expandResults">
- <property name="text">
- <string extracomment="When this is checked the result treeview will be expanded after a search">Expand results</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="useRegExp">
- <property name="text">
- <string>Regular e&amp;xpressions</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QCheckBox" name="matchCase">
+ <property name="buddy">
+ <cstring>searchPlaceCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KComboBox" name="searchPlaceCombo">
+ <item>
<property name="text">
- <string>&amp;Match case</string>
+ <string>Current File</string>
</property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="excludeLabel">
- <property name="text">
- <string>Excl&amp;ude:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>excludeCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="KComboBox" name="excludeCombo">
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="KComboBox" name="filterCombo">
- <property name="editable">
- <bool>true</bool>
- </property>
- <property name="insertPolicy">
- <enum>QComboBox::InsertAtTop</enum>
- </property>
- <item>
- <property name="text">
- <string>*</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="5" column="1">
- <spacer name="verticalSpacer">
- <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>
+ <property name="text">
+ <string>Open Files</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Folder</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="resultsPage">
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="QStackedWidget" name="nextAndStop">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="page_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
<item>
- <widget class="QTabWidget" name="resultTabWidget">
- <property name="tabsClosable">
- <bool>true</bool>
+ <widget class="QPushButton" name="nextButton">
+ <property name="enabled">
+ <bool>false</bool>
</property>
- <property name="movable">
- <bool>true</bool>
+ <property name="text">
+ <string>Next</string>
</property>
</widget>
</item>
</layout>
</widget>
+ <widget class="QWidget" name="stopButtonPage">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="stopButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item row="0" column="2" colspan="2">
+ <widget class="QComboBox" name="searchCombo">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" colspan="2">
+ <widget class="QComboBox" name="replaceCombo">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="5">
+ <widget class="QPushButton" name="replaceCheckedBtn">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Replace checked</string>
+ </property>
</widget>
</item>
</layout>
@@ -321,18 +419,46 @@
<header>kcombobox.h</header>
</customwidget>
<customwidget>
+ <class>KUrlComboRequester</class>
+ <extends>KUrlRequester</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ <customwidget>
<class>KUrlRequester</class>
<extends>QFrame</extends>
<header>kurlrequester.h</header>
- <container>1</container>
</customwidget>
<customwidget>
- <class>KUrlComboRequester</class>
- <extends>KUrlRequester</extends>
- <header>kurlrequester.h</header>
- <container>1</container>
+ <class>KHistoryComboBox</class>
+ <extends>KComboBox</extends>
+ <header>khistorycombobox.h</header>
</customwidget>
</customwidgets>
+ <tabstops>
+ <tabstop>newTabButton</tabstop>
+ <tabstop>searchCombo</tabstop>
+ <tabstop>replaceCombo</tabstop>
+ <tabstop>searchButton</tabstop>
+ <tabstop>nextButton</tabstop>
+ <tabstop>stopButton</tabstop>
+ <tabstop>replaceButton</tabstop>
+ <tabstop>replaceCheckedBtn</tabstop>
+ <tabstop>matchCase</tabstop>
+ <tabstop>useRegExp</tabstop>
+ <tabstop>expandResults</tabstop>
+ <tabstop>searchPlaceCombo</tabstop>
+ <tabstop>folderRequester</tabstop>
+ <tabstop>folderUpButton</tabstop>
+ <tabstop>currentFolderButton</tabstop>
+ <tabstop>filterCombo</tabstop>
+ <tabstop>excludeCombo</tabstop>
+ <tabstop>recursiveCheckBox</tabstop>
+ <tabstop>hiddenCheckBox</tabstop>
+ <tabstop>symLinkCheckBox</tabstop>
+ <tabstop>binaryCheckBox</tabstop>
+ <tabstop>displayOptions</tabstop>
+ <tabstop>resultTabWidget</tabstop>
+ </tabstops>
<resources/>
<connections/>
</ui>