Core: Inline findwidget.ui

A lot of unusual stuff where LayoutBuilder doesn't shine...

Change-Id: I06259e0913fade2d70ebfbab3f438cb8f7e96bf3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-09-29 12:12:29 +02:00
parent 01ddb61ab7
commit 38f88f6310
6 changed files with 238 additions and 400 deletions

View File

@@ -67,7 +67,6 @@ add_qtc_plugin(Core
find/findplugin.cpp find/findplugin.h find/findplugin.cpp find/findplugin.h
find/findtoolbar.cpp find/findtoolbar.h find/findtoolbar.cpp find/findtoolbar.h
find/findtoolwindow.cpp find/findtoolwindow.h find/findtoolwindow.cpp find/findtoolwindow.h
find/findwidget.ui
find/highlightscrollbarcontroller.cpp find/highlightscrollbarcontroller.h find/highlightscrollbarcontroller.cpp find/highlightscrollbarcontroller.h
find/ifindfilter.cpp find/ifindfilter.h find/ifindfilter.cpp find/ifindfilter.h
find/ifindsupport.cpp find/ifindsupport.h find/ifindsupport.cpp find/ifindsupport.h

View File

@@ -298,7 +298,6 @@ Project {
"findtoolbar.h", "findtoolbar.h",
"findtoolwindow.cpp", "findtoolwindow.cpp",
"findtoolwindow.h", "findtoolwindow.h",
"findwidget.ui",
"highlightscrollbarcontroller.cpp", "highlightscrollbarcontroller.cpp",
"highlightscrollbarcontroller.h", "highlightscrollbarcontroller.h",
"ifindfilter.cpp", "ifindfilter.cpp",

View File

@@ -23,6 +23,7 @@
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QApplication>
#include <QMenu> #include <QMenu>
#include <QStringListModel> #include <QStringListModel>
#include <QVector> #include <QVector>

View File

@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "findtoolbar.h" #include "findtoolbar.h"
#include "ifindfilter.h" #include "ifindfilter.h"
#include "findplugin.h" #include "findplugin.h"
#include "optionspopup.h" #include "optionspopup.h"
@@ -16,31 +17,40 @@
#include <coreplugin/findplaceholder.h> #include <coreplugin/findplaceholder.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/fancylineedit.h>
#include <utils/layoutbuilder.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/stylehelper.h> #include <utils/stylehelper.h>
#include <utils/theme/theme.h> #include <utils/theme/theme.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <QDebug>
#include <QSettings>
#include <QAbstractItemView> #include <QAbstractItemView>
#include <QApplication>
#include <QCheckBox> #include <QCheckBox>
#include <QClipboard> #include <QClipboard>
#include <QCompleter> #include <QCompleter>
#include <QDebug>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QKeyEvent> #include <QKeyEvent>
#include <QLabel>
#include <QMenu> #include <QMenu>
#include <QPainter> #include <QPainter>
#include <QSettings>
#include <QSpacerItem>
#include <QStringListModel> #include <QStringListModel>
#include <QToolButton>
#include <QVBoxLayout>
Q_DECLARE_METATYPE(QStringList) Q_DECLARE_METATYPE(QStringList)
Q_DECLARE_METATYPE(Core::IFindFilter*) Q_DECLARE_METATYPE(Core::IFindFilter*)
static const int MINIMUM_WIDTH_FOR_COMPLEX_LAYOUT = 150; using namespace Utils;
static const int FINDBUTTON_SPACER_WIDTH = 20;
namespace Core { namespace Core::Internal {
namespace Internal {
const int MINIMUM_WIDTH_FOR_COMPLEX_LAYOUT = 150;
const int FINDBUTTON_SPACER_WIDTH = 20;
FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind) FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
: m_currentDocumentFind(currentDocumentFind), : m_currentDocumentFind(currentDocumentFind),
@@ -49,80 +59,176 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
m_findIncrementalTimer(this), m_findIncrementalTimer(this),
m_findStepTimer(this) m_findStepTimer(this)
{ {
//setup ui setWindowTitle(QCoreApplication::translate("Core::Internal::FindWidget", "Find", nullptr));
m_ui.setupUi(this);
// compensate for a vertically expanding spacer below the label
m_ui.replaceLabel->setMinimumHeight(m_ui.replaceEdit->sizeHint().height());
m_ui.mainLayout->setColumnStretch(1, 10);
setFocusProxy(m_ui.findEdit); m_findLabel = new QLabel;
m_findLabel->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Find:", nullptr));
m_findEdit = new FancyLineEdit;
m_findEdit->setMinimumWidth(100);
m_findEdit->setAttribute(Qt::WA_MacShowFocusRect, false);
m_findPreviousButton = new QToolButton;
m_findNextButton = new QToolButton;
m_selectAllButton = new QToolButton;
m_horizontalSpacer = new QSpacerItem(40, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
m_close = new QToolButton;
auto findButtonsWidget = new QWidget;
m_findButtonLayout = new QHBoxLayout(findButtonsWidget);
m_findButtonLayout->setSpacing(3);
m_findButtonLayout->setContentsMargins(0, 0, 0, 0);
m_findButtonLayout->addWidget(m_findPreviousButton);
m_findButtonLayout->addWidget(m_findNextButton);
m_findButtonLayout->addWidget(m_selectAllButton);
m_findButtonLayout->addItem(m_horizontalSpacer);
m_findButtonLayout->addWidget(m_close);
m_replaceEdit = new FancyLineEdit(this);
m_replaceEdit->setMinimumWidth(100);
m_replaceEdit->setAttribute(Qt::WA_MacShowFocusRect, false);
m_replaceEdit->setFiltering(true);
m_replaceLabel = new QLabel;
m_replaceLabel->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace with:"));
// compensate for a vertically expanding spacer below the label
m_replaceLabel->setMinimumHeight(m_replaceEdit->sizeHint().height());
m_replaceButtonsWidget = new QWidget;
m_replaceButtonsWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
m_replaceButton = new QToolButton;
m_replaceButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace"));
m_replaceButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_replaceButton->setArrowType(Qt::LeftArrow);
m_replaceNextButton = new QToolButton;
m_replaceNextButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace && Find"));
m_replaceNextButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_replaceNextButton->setArrowType(Qt::RightArrow);
m_replaceAllButton = new QToolButton;
m_replaceAllButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Replace All"));
m_replaceAllButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
m_advancedButton = new QToolButton;
m_advancedButton->setText(QCoreApplication::translate("Core::Internal::FindWidget", "Advanced..."));
m_advancedButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
QWidget::setTabOrder(m_findEdit, m_replaceEdit);
QWidget::setTabOrder(m_replaceEdit, m_findPreviousButton);
QWidget::setTabOrder(m_findPreviousButton, m_findNextButton);
QWidget::setTabOrder(m_findNextButton, m_replaceButton);
QWidget::setTabOrder(m_replaceButton, m_replaceNextButton);
QWidget::setTabOrder(m_replaceNextButton, m_replaceAllButton);
QWidget::setTabOrder(m_replaceAllButton, m_advancedButton);
QWidget::setTabOrder(m_advancedButton, m_close);
auto replaceButtonsLayout = new QHBoxLayout(m_replaceButtonsWidget);
replaceButtonsLayout->setSpacing(3);
replaceButtonsLayout->setContentsMargins(0, 0, 0, 0);
replaceButtonsLayout->addWidget(m_replaceButton);
replaceButtonsLayout->addWidget(m_replaceNextButton);
replaceButtonsLayout->addWidget(m_replaceAllButton);
auto verticalLayout_3 = new QVBoxLayout();
verticalLayout_3->setSpacing(0);
verticalLayout_3->addWidget(m_advancedButton);
verticalLayout_3->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
auto gridLayout = new QGridLayout();
gridLayout->setHorizontalSpacing(3);
gridLayout->setVerticalSpacing(0);
gridLayout->addWidget(m_replaceButtonsWidget, 0, 0, 1, 1);
gridLayout->addLayout(verticalLayout_3, 0, 1, 1, 1);
using namespace Layouting;
Grid {
m_findLabel,
m_findEdit,
findButtonsWidget,
br,
Column { m_replaceLabel, st }.setSpacing(0),
Column { m_replaceEdit, st }.setSpacing(0),
gridLayout,
}.attachTo(this);
auto mainLayout = static_cast<QGridLayout *>(layout());
mainLayout->setHorizontalSpacing(3);
mainLayout->setVerticalSpacing(1);
mainLayout->setContentsMargins(5, 2, 0, 1);
mainLayout->setColumnStretch(1, 10);
setFocusProxy(m_findEdit);
setProperty("topBorder", true); setProperty("topBorder", true);
setSingleRow(false); setSingleRow(false);
m_ui.findEdit->setAttribute(Qt::WA_MacShowFocusRect, false);
m_ui.replaceEdit->setAttribute(Qt::WA_MacShowFocusRect, false);
m_ui.replaceEdit->setFiltering(true);
connect(m_ui.findEdit, &Utils::FancyLineEdit::editingFinished, connect(m_findEdit, &Utils::FancyLineEdit::editingFinished,
this, &FindToolBar::invokeResetIncrementalSearch); this, &FindToolBar::invokeResetIncrementalSearch);
connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, connect(m_findEdit, &Utils::FancyLineEdit::textChanged,
this, &FindToolBar::updateFindReplaceEnabled); this, &FindToolBar::updateFindReplaceEnabled);
connect(m_ui.close, &QToolButton::clicked, connect(m_close, &QToolButton::clicked,
this, &FindToolBar::hideAndResetFocus); this, &FindToolBar::hideAndResetFocus);
m_findCompleter->setModel(Find::findCompletionModel()); m_findCompleter->setModel(Find::findCompletionModel());
m_replaceCompleter->setModel(Find::replaceCompletionModel()); m_replaceCompleter->setModel(Find::replaceCompletionModel());
m_ui.findEdit->setSpecialCompleter(m_findCompleter); m_findEdit->setSpecialCompleter(m_findCompleter);
m_ui.replaceEdit->setSpecialCompleter(m_replaceCompleter); m_replaceEdit->setSpecialCompleter(m_replaceCompleter);
m_ui.findEdit->setButtonVisible(Utils::FancyLineEdit::Left, true); m_findEdit->setButtonVisible(Utils::FancyLineEdit::Left, true);
m_ui.findEdit->setFiltering(true); m_findEdit->setFiltering(true);
m_ui.findEdit->setPlaceholderText(QString()); m_findEdit->setPlaceholderText(QString());
m_ui.findEdit->button(Utils::FancyLineEdit::Left)->setFocusPolicy(Qt::TabFocus); m_findEdit->button(Utils::FancyLineEdit::Left)->setFocusPolicy(Qt::TabFocus);
m_ui.findEdit->setValidationFunction([this](Utils::FancyLineEdit *, QString *) { m_findEdit->setValidationFunction([this](Utils::FancyLineEdit *, QString *) {
return m_lastResult != IFindSupport::NotFound; return m_lastResult != IFindSupport::NotFound;
}); });
m_ui.replaceEdit->setPlaceholderText(QString()); m_replaceEdit->setPlaceholderText(QString());
connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, connect(m_findEdit, &Utils::FancyLineEdit::textChanged,
this, &FindToolBar::invokeFindIncremental); this, &FindToolBar::invokeFindIncremental);
connect(m_ui.findEdit, &Utils::FancyLineEdit::leftButtonClicked, connect(m_findEdit, &Utils::FancyLineEdit::leftButtonClicked,
this, &FindToolBar::findEditButtonClicked); this, &FindToolBar::findEditButtonClicked);
// invoke{Find,Replace}Helper change the completion model. QueuedConnection is used to perform these // invoke{Find,Replace}Helper change the completion model. QueuedConnection is used to perform these
// changes only after the completer's activated() signal is handled (QTCREATORBUG-8408) // changes only after the completer's activated() signal is handled (QTCREATORBUG-8408)
connect(m_ui.findEdit, &Utils::FancyLineEdit::returnPressed, connect(m_findEdit, &Utils::FancyLineEdit::returnPressed,
this, &FindToolBar::invokeFindEnter, Qt::QueuedConnection); this, &FindToolBar::invokeFindEnter, Qt::QueuedConnection);
connect(m_ui.replaceEdit, &Utils::FancyLineEdit::returnPressed, connect(m_replaceEdit, &Utils::FancyLineEdit::returnPressed,
this, &FindToolBar::invokeReplaceEnter, Qt::QueuedConnection); this, &FindToolBar::invokeReplaceEnter, Qt::QueuedConnection);
connect(m_findCompleter, QOverload<const QModelIndex &>::of(&QCompleter::activated), connect(m_findCompleter, QOverload<const QModelIndex &>::of(&QCompleter::activated),
this, &FindToolBar::findCompleterActivated); this, &FindToolBar::findCompleterActivated);
auto shiftEnterAction = new QAction(m_ui.findEdit); auto shiftEnterAction = new QAction(m_findEdit);
shiftEnterAction->setShortcut(QKeySequence(tr("Shift+Enter"))); shiftEnterAction->setShortcut(QKeySequence(tr("Shift+Enter")));
shiftEnterAction->setShortcutContext(Qt::WidgetShortcut); shiftEnterAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftEnterAction, &QAction::triggered, connect(shiftEnterAction, &QAction::triggered,
this, &FindToolBar::invokeFindPrevious); this, &FindToolBar::invokeFindPrevious);
m_ui.findEdit->addAction(shiftEnterAction); m_findEdit->addAction(shiftEnterAction);
auto shiftReturnAction = new QAction(m_ui.findEdit); auto shiftReturnAction = new QAction(m_findEdit);
shiftReturnAction->setShortcut(QKeySequence(tr("Shift+Return"))); shiftReturnAction->setShortcut(QKeySequence(tr("Shift+Return")));
shiftReturnAction->setShortcutContext(Qt::WidgetShortcut); shiftReturnAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftReturnAction, &QAction::triggered, connect(shiftReturnAction, &QAction::triggered,
this, &FindToolBar::invokeFindPrevious); this, &FindToolBar::invokeFindPrevious);
m_ui.findEdit->addAction(shiftReturnAction); m_findEdit->addAction(shiftReturnAction);
auto shiftEnterReplaceAction = new QAction(m_ui.replaceEdit); auto shiftEnterReplaceAction = new QAction(m_replaceEdit);
shiftEnterReplaceAction->setShortcut(QKeySequence(tr("Shift+Enter"))); shiftEnterReplaceAction->setShortcut(QKeySequence(tr("Shift+Enter")));
shiftEnterReplaceAction->setShortcutContext(Qt::WidgetShortcut); shiftEnterReplaceAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftEnterReplaceAction, &QAction::triggered, connect(shiftEnterReplaceAction, &QAction::triggered,
this, &FindToolBar::invokeReplacePrevious); this, &FindToolBar::invokeReplacePrevious);
m_ui.replaceEdit->addAction(shiftEnterReplaceAction); m_replaceEdit->addAction(shiftEnterReplaceAction);
auto shiftReturnReplaceAction = new QAction(m_ui.replaceEdit); auto shiftReturnReplaceAction = new QAction(m_replaceEdit);
shiftReturnReplaceAction->setShortcut(QKeySequence(tr("Shift+Return"))); shiftReturnReplaceAction->setShortcut(QKeySequence(tr("Shift+Return")));
shiftReturnReplaceAction->setShortcutContext(Qt::WidgetShortcut); shiftReturnReplaceAction->setShortcutContext(Qt::WidgetShortcut);
connect(shiftReturnReplaceAction, &QAction::triggered, connect(shiftReturnReplaceAction, &QAction::triggered,
this, &FindToolBar::invokeReplacePrevious); this, &FindToolBar::invokeReplacePrevious);
m_ui.replaceEdit->addAction(shiftReturnReplaceAction); m_replaceEdit->addAction(shiftReturnReplaceAction);
// need to make sure QStringList is registered as metatype // need to make sure QStringList is registered as metatype
QMetaTypeId<QStringList>::qt_metatype_id(); QMetaTypeId<QStringList>::qt_metatype_id();
@@ -137,9 +243,9 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
Command *advancedCmd = ActionManager::command(Constants::ADVANCED_FIND); Command *advancedCmd = ActionManager::command(Constants::ADVANCED_FIND);
if (advancedCmd) if (advancedCmd)
advancedCmd->augmentActionWithShortcutToolTip(advancedAction); advancedCmd->augmentActionWithShortcutToolTip(advancedAction);
m_ui.advancedButton->setDefaultAction(advancedAction); m_advancedButton->setDefaultAction(advancedAction);
connect(advancedAction, &QAction::triggered, this, [this] { connect(advancedAction, &QAction::triggered, this, [this] {
Find::openFindDialog(nullptr, m_ui.findEdit->text()); Find::openFindDialog(nullptr, m_findEdit->text());
}); });
m_goToCurrentFindAction = new QAction(this); m_goToCurrentFindAction = new QAction(this);
@@ -182,7 +288,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
cmd = ActionManager::registerAction(m_localFindNextAction, Constants::FIND_NEXT, findcontext); cmd = ActionManager::registerAction(m_localFindNextAction, Constants::FIND_NEXT, findcontext);
cmd->augmentActionWithShortcutToolTip(m_localFindNextAction); cmd->augmentActionWithShortcutToolTip(m_localFindNextAction);
connect(m_localFindNextAction, &QAction::triggered, this, &FindToolBar::invokeFindNext); connect(m_localFindNextAction, &QAction::triggered, this, &FindToolBar::invokeFindNext);
m_ui.findNextButton->setDefaultAction(m_localFindNextAction); m_findNextButton->setDefaultAction(m_localFindNextAction);
m_findPreviousAction = new QAction(tr("Find Previous"), this); m_findPreviousAction = new QAction(tr("Find Previous"), this);
cmd = ActionManager::registerAction(m_findPreviousAction, Constants::FIND_PREVIOUS); cmd = ActionManager::registerAction(m_findPreviousAction, Constants::FIND_PREVIOUS);
@@ -193,7 +299,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
cmd = ActionManager::registerAction(m_localFindPreviousAction, Constants::FIND_PREVIOUS, findcontext); cmd = ActionManager::registerAction(m_localFindPreviousAction, Constants::FIND_PREVIOUS, findcontext);
cmd->augmentActionWithShortcutToolTip(m_localFindPreviousAction); cmd->augmentActionWithShortcutToolTip(m_localFindPreviousAction);
connect(m_localFindPreviousAction, &QAction::triggered, this, &FindToolBar::invokeFindPrevious); connect(m_localFindPreviousAction, &QAction::triggered, this, &FindToolBar::invokeFindPrevious);
m_ui.findPreviousButton->setDefaultAction(m_localFindPreviousAction); m_findPreviousButton->setDefaultAction(m_localFindPreviousAction);
m_findNextSelectedAction = new QAction(tr("Find Next (Selected)"), this); m_findNextSelectedAction = new QAction(tr("Find Next (Selected)"), this);
cmd = ActionManager::registerAction(m_findNextSelectedAction, Constants::FIND_NEXT_SELECTED); cmd = ActionManager::registerAction(m_findNextSelectedAction, Constants::FIND_NEXT_SELECTED);
@@ -217,7 +323,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
cmd = ActionManager::registerAction(m_localSelectAllAction, Constants::FIND_SELECT_ALL, findcontext); cmd = ActionManager::registerAction(m_localSelectAllAction, Constants::FIND_SELECT_ALL, findcontext);
cmd->augmentActionWithShortcutToolTip(m_localSelectAllAction); cmd->augmentActionWithShortcutToolTip(m_localSelectAllAction);
connect(m_localSelectAllAction, &QAction::triggered, this, &FindToolBar::selectAll); connect(m_localSelectAllAction, &QAction::triggered, this, &FindToolBar::selectAll);
m_ui.selectAllButton->setDefaultAction(m_localSelectAllAction); m_selectAllButton->setDefaultAction(m_localSelectAllAction);
m_replaceAction = new QAction(tr("Replace"), this); m_replaceAction = new QAction(tr("Replace"), this);
cmd = ActionManager::registerAction(m_replaceAction, Constants::REPLACE); cmd = ActionManager::registerAction(m_replaceAction, Constants::REPLACE);
@@ -228,7 +334,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
cmd = ActionManager::registerAction(m_localReplaceAction, Constants::REPLACE, findcontext); cmd = ActionManager::registerAction(m_localReplaceAction, Constants::REPLACE, findcontext);
cmd->augmentActionWithShortcutToolTip(m_localReplaceAction); cmd->augmentActionWithShortcutToolTip(m_localReplaceAction);
connect(m_localReplaceAction, &QAction::triggered, this, &FindToolBar::invokeReplace); connect(m_localReplaceAction, &QAction::triggered, this, &FindToolBar::invokeReplace);
m_ui.replaceButton->setDefaultAction(m_localReplaceAction); m_replaceButton->setDefaultAction(m_localReplaceAction);
m_replaceNextAction = new QAction(tr("Replace && Find"), this); m_replaceNextAction = new QAction(tr("Replace && Find"), this);
cmd = ActionManager::registerAction(m_replaceNextAction, Constants::REPLACE_NEXT); cmd = ActionManager::registerAction(m_replaceNextAction, Constants::REPLACE_NEXT);
@@ -240,7 +346,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
cmd = ActionManager::registerAction(m_localReplaceNextAction, Constants::REPLACE_NEXT, findcontext); cmd = ActionManager::registerAction(m_localReplaceNextAction, Constants::REPLACE_NEXT, findcontext);
cmd->augmentActionWithShortcutToolTip(m_localReplaceNextAction); cmd->augmentActionWithShortcutToolTip(m_localReplaceNextAction);
connect(m_localReplaceNextAction, &QAction::triggered, this, &FindToolBar::invokeReplaceNext); connect(m_localReplaceNextAction, &QAction::triggered, this, &FindToolBar::invokeReplaceNext);
m_ui.replaceNextButton->setDefaultAction(m_localReplaceNextAction); m_replaceNextButton->setDefaultAction(m_localReplaceNextAction);
m_replacePreviousAction = new QAction(tr("Replace && Find Previous"), this); m_replacePreviousAction = new QAction(tr("Replace && Find Previous"), this);
cmd = ActionManager::registerAction(m_replacePreviousAction, Constants::REPLACE_PREVIOUS); cmd = ActionManager::registerAction(m_replacePreviousAction, Constants::REPLACE_PREVIOUS);
@@ -261,7 +367,7 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
cmd = ActionManager::registerAction(m_localReplaceAllAction, Constants::REPLACE_ALL, findcontext); cmd = ActionManager::registerAction(m_localReplaceAllAction, Constants::REPLACE_ALL, findcontext);
cmd->augmentActionWithShortcutToolTip(m_localReplaceAllAction); cmd->augmentActionWithShortcutToolTip(m_localReplaceAllAction);
connect(m_localReplaceAllAction, &QAction::triggered, this, &FindToolBar::invokeReplaceAll); connect(m_localReplaceAllAction, &QAction::triggered, this, &FindToolBar::invokeReplaceAll);
m_ui.replaceAllButton->setDefaultAction(m_localReplaceAllAction); m_replaceAllButton->setDefaultAction(m_localReplaceAllAction);
m_caseSensitiveAction = new QAction(tr("Case Sensitive"), this); m_caseSensitiveAction = new QAction(tr("Case Sensitive"), this);
m_caseSensitiveAction->setIcon(Icons::FIND_CASE_INSENSITIVELY.icon()); m_caseSensitiveAction->setIcon(Icons::FIND_CASE_INSENSITIVELY.icon());
@@ -328,8 +434,8 @@ void FindToolBar::installEventFilters()
{ {
if (!m_eventFiltersInstalled) { if (!m_eventFiltersInstalled) {
m_findCompleter->popup()->installEventFilter(this); m_findCompleter->popup()->installEventFilter(this);
m_ui.findEdit->installEventFilter(this); m_findEdit->installEventFilter(this);
m_ui.replaceEdit->installEventFilter(this); m_replaceEdit->installEventFilter(this);
this->installEventFilter(this); this->installEventFilter(this);
m_eventFiltersInstalled = true; m_eventFiltersInstalled = true;
} }
@@ -340,19 +446,19 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
auto ke = static_cast<QKeyEvent *>(event); auto ke = static_cast<QKeyEvent *>(event);
if (ke->key() == Qt::Key_Down) { if (ke->key() == Qt::Key_Down) {
if (obj == m_ui.findEdit) { if (obj == m_findEdit) {
if (m_ui.findEdit->text().isEmpty()) if (m_findEdit->text().isEmpty())
m_findCompleter->setCompletionPrefix(QString()); m_findCompleter->setCompletionPrefix(QString());
m_findCompleter->complete(); m_findCompleter->complete();
} else if (obj == m_ui.replaceEdit) { } else if (obj == m_replaceEdit) {
if (m_ui.replaceEdit->text().isEmpty()) if (m_replaceEdit->text().isEmpty())
m_replaceCompleter->setCompletionPrefix(QString()); m_replaceCompleter->setCompletionPrefix(QString());
m_replaceCompleter->complete(); m_replaceCompleter->complete();
} }
} }
} }
if ((obj == m_ui.findEdit || obj == m_findCompleter->popup()) if ((obj == m_findEdit || obj == m_findCompleter->popup())
&& event->type() == QEvent::KeyPress) { && event->type() == QEvent::KeyPress) {
auto ke = static_cast<QKeyEvent *>(event); auto ke = static_cast<QKeyEvent *>(event);
if (ke->key() == Qt::Key_Space && (ke->modifiers() & Utils::HostOsInfo::controlModifier())) { if (ke->key() == Qt::Key_Space && (ke->modifiers() & Utils::HostOsInfo::controlModifier())) {
@@ -413,34 +519,34 @@ void FindToolBar::updateToolBar()
m_wholeWordAction->setEnabled(enabled); m_wholeWordAction->setEnabled(enabled);
m_regularExpressionAction->setEnabled(enabled); m_regularExpressionAction->setEnabled(enabled);
m_preserveCaseAction->setEnabled(replaceEnabled && !hasFindFlag(FindRegularExpression)); m_preserveCaseAction->setEnabled(replaceEnabled && !hasFindFlag(FindRegularExpression));
bool replaceFocus = m_ui.replaceEdit->hasFocus(); bool replaceFocus = m_replaceEdit->hasFocus();
m_ui.findLabel->setEnabled(enabled); m_findLabel->setEnabled(enabled);
m_ui.findLabel->setVisible(showAllControls); m_findLabel->setVisible(showAllControls);
m_ui.findEdit->setEnabled(enabled); m_findEdit->setEnabled(enabled);
m_ui.findEdit->setPlaceholderText(showAllControls ? QString() : tr("Search for...")); m_findEdit->setPlaceholderText(showAllControls ? QString() : tr("Search for..."));
m_ui.findPreviousButton->setEnabled(enabled); m_findPreviousButton->setEnabled(enabled);
m_ui.findPreviousButton->setVisible(showAllControls); m_findPreviousButton->setVisible(showAllControls);
m_ui.findNextButton->setEnabled(enabled); m_findNextButton->setEnabled(enabled);
m_ui.findNextButton->setVisible(showAllControls); m_findNextButton->setVisible(showAllControls);
m_ui.selectAllButton->setVisible(style == ControlStyle::Text m_selectAllButton->setVisible(style == ControlStyle::Text
&& m_currentDocumentFind->supportsSelectAll()); && m_currentDocumentFind->supportsSelectAll());
m_ui.horizontalSpacer->changeSize((showAllControls ? FINDBUTTON_SPACER_WIDTH : 0), 0, m_horizontalSpacer->changeSize((showAllControls ? FINDBUTTON_SPACER_WIDTH : 0), 0,
QSizePolicy::Expanding, QSizePolicy::Ignored); QSizePolicy::Expanding, QSizePolicy::Ignored);
m_ui.findButtonLayout->invalidate(); // apply spacer change m_findButtonLayout->invalidate(); // apply spacer change
m_ui.replaceLabel->setEnabled(replaceEnabled); m_replaceLabel->setEnabled(replaceEnabled);
m_ui.replaceLabel->setVisible(replaceEnabled && showAllControls); m_replaceLabel->setVisible(replaceEnabled && showAllControls);
m_ui.replaceEdit->setEnabled(replaceEnabled); m_replaceEdit->setEnabled(replaceEnabled);
m_ui.replaceEdit->setPlaceholderText(showAllControls ? QString() : tr("Replace with...")); m_replaceEdit->setPlaceholderText(showAllControls ? QString() : tr("Replace with..."));
m_ui.replaceEdit->setVisible(replaceEnabled); m_replaceEdit->setVisible(replaceEnabled);
m_ui.replaceButtonsWidget->setVisible(replaceEnabled && showAllControls); m_replaceButtonsWidget->setVisible(replaceEnabled && showAllControls);
m_ui.advancedButton->setVisible(replaceEnabled && showAllControls); m_advancedButton->setVisible(replaceEnabled && showAllControls);
layout()->invalidate(); layout()->invalidate();
if (!replaceEnabled && enabled && replaceFocus) if (!replaceEnabled && enabled && replaceFocus)
m_ui.findEdit->setFocus(); m_findEdit->setFocus();
updateIcons(); updateIcons();
updateFlagMenus(); updateFlagMenus();
} }
@@ -502,29 +608,29 @@ void FindToolBar::invokeGlobalFindPrevious()
QString FindToolBar::getFindText() QString FindToolBar::getFindText()
{ {
return m_ui.findEdit->text(); return m_findEdit->text();
} }
QString FindToolBar::getReplaceText() QString FindToolBar::getReplaceText()
{ {
return m_ui.replaceEdit->text(); return m_replaceEdit->text();
} }
void FindToolBar::setFindText(const QString &text) void FindToolBar::setFindText(const QString &text)
{ {
disconnect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, disconnect(m_findEdit, &Utils::FancyLineEdit::textChanged,
this, &FindToolBar::invokeFindIncremental); this, &FindToolBar::invokeFindIncremental);
if (hasFindFlag(FindRegularExpression)) if (hasFindFlag(FindRegularExpression))
m_ui.findEdit->setText(QRegularExpression::escape(text)); m_findEdit->setText(QRegularExpression::escape(text));
else else
m_ui.findEdit->setText(text); m_findEdit->setText(text);
connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, connect(m_findEdit, &Utils::FancyLineEdit::textChanged,
this, &FindToolBar::invokeFindIncremental); this, &FindToolBar::invokeFindIncremental);
} }
void FindToolBar::selectFindText() void FindToolBar::selectFindText()
{ {
m_ui.findEdit->selectAll(); m_findEdit->selectAll();
} }
void FindToolBar::invokeFindStep() void FindToolBar::invokeFindStep()
@@ -644,7 +750,7 @@ void FindToolBar::putSelectionToFindClipboard()
void FindToolBar::updateFromFindClipboard() void FindToolBar::updateFromFindClipboard()
{ {
if (QApplication::clipboard()->supportsFindBuffer()) { if (QApplication::clipboard()->supportsFindBuffer()) {
QSignalBlocker blocker(m_ui.findEdit); QSignalBlocker blocker(m_findEdit);
setFindText(QApplication::clipboard()->text(QClipboard::FindBuffer)); setFindText(QApplication::clipboard()->text(QClipboard::FindBuffer));
} }
} }
@@ -660,7 +766,7 @@ void FindToolBar::findFlagsChanged()
void FindToolBar::findEditButtonClicked() void FindToolBar::findEditButtonClicked()
{ {
auto popup = new OptionsPopup(m_ui.findEdit, {Constants::CASE_SENSITIVE, Constants::WHOLE_WORDS, auto popup = new OptionsPopup(m_findEdit, {Constants::CASE_SENSITIVE, Constants::WHOLE_WORDS,
Constants::REGULAR_EXPRESSIONS, Constants::PRESERVE_CASE}); Constants::REGULAR_EXPRESSIONS, Constants::PRESERVE_CASE});
popup->show(); popup->show();
} }
@@ -674,9 +780,9 @@ void FindToolBar::updateIcons()
bool preserveCase = effectiveFlags & FindPreserveCase; bool preserveCase = effectiveFlags & FindPreserveCase;
if (!casesensitive && !wholewords && !regexp && !preserveCase) { if (!casesensitive && !wholewords && !regexp && !preserveCase) {
const QIcon icon = Utils::Icons::MAGNIFIER.icon(); const QIcon icon = Utils::Icons::MAGNIFIER.icon();
m_ui.findEdit->setButtonIcon(Utils::FancyLineEdit::Left, icon); m_findEdit->setButtonIcon(Utils::FancyLineEdit::Left, icon);
} else { } else {
m_ui.findEdit->setButtonIcon(Utils::FancyLineEdit::Left, m_findEdit->setButtonIcon(Utils::FancyLineEdit::Left,
IFindFilter::pixmapForFindFlags(effectiveFlags)); IFindFilter::pixmapForFindFlags(effectiveFlags));
} }
} }
@@ -754,27 +860,27 @@ bool FindToolBar::toolBarHasFocus() const
FindToolBar::ControlStyle FindToolBar::controlStyle(bool replaceIsVisible) FindToolBar::ControlStyle FindToolBar::controlStyle(bool replaceIsVisible)
{ {
const Qt::ToolButtonStyle currentFindButtonStyle = m_ui.findNextButton->toolButtonStyle(); const Qt::ToolButtonStyle currentFindButtonStyle = m_findNextButton->toolButtonStyle();
const int fullWidth = width(); const int fullWidth = width();
if (replaceIsVisible) { if (replaceIsVisible) {
// Since the replace buttons do not collapse to icons, they have precedence, here. // Since the replace buttons do not collapse to icons, they have precedence, here.
const int replaceFixedWidth = m_ui.replaceLabel->sizeHint().width() const int replaceFixedWidth = m_replaceLabel->sizeHint().width()
+ m_ui.replaceButton->sizeHint().width() + m_replaceButton->sizeHint().width()
+ m_ui.replaceNextButton->sizeHint().width() + m_replaceNextButton->sizeHint().width()
+ m_ui.replaceAllButton->sizeHint().width() + m_replaceAllButton->sizeHint().width()
+ m_ui.advancedButton->sizeHint().width(); + m_advancedButton->sizeHint().width();
return fullWidth - replaceFixedWidth >= MINIMUM_WIDTH_FOR_COMPLEX_LAYOUT ? return fullWidth - replaceFixedWidth >= MINIMUM_WIDTH_FOR_COMPLEX_LAYOUT ?
ControlStyle::Text : ControlStyle::Hidden; ControlStyle::Text : ControlStyle::Hidden;
} }
const auto findWidth = [this] { const auto findWidth = [this] {
const int selectAllWidth = m_currentDocumentFind->supportsSelectAll() ? const int selectAllWidth = m_currentDocumentFind->supportsSelectAll() ?
m_ui.selectAllButton->sizeHint().width() : 0; m_selectAllButton->sizeHint().width() : 0;
return m_ui.findLabel->sizeHint().width() + m_ui.findNextButton->sizeHint().width() return m_findLabel->sizeHint().width() + m_findNextButton->sizeHint().width()
+ m_ui.findPreviousButton->sizeHint().width() + m_findPreviousButton->sizeHint().width()
+ selectAllWidth + FINDBUTTON_SPACER_WIDTH + selectAllWidth + FINDBUTTON_SPACER_WIDTH
+ m_ui.close->sizeHint().width(); + m_close->sizeHint().width();
}; };
setFindButtonStyle(Qt::ToolButtonTextOnly); setFindButtonStyle(Qt::ToolButtonTextOnly);
const int findWithTextWidth = findWidth(); const int findWithTextWidth = findWidth();
@@ -791,8 +897,8 @@ FindToolBar::ControlStyle FindToolBar::controlStyle(bool replaceIsVisible)
void FindToolBar::setFindButtonStyle(Qt::ToolButtonStyle style) void FindToolBar::setFindButtonStyle(Qt::ToolButtonStyle style)
{ {
m_ui.findPreviousButton->setToolButtonStyle(style); m_findPreviousButton->setToolButtonStyle(style);
m_ui.findNextButton->setToolButtonStyle(style); m_findNextButton->setToolButtonStyle(style);
} }
/*! /*!
@@ -819,7 +925,7 @@ void FindToolBar::acceptCandidateAndMoveToolBar()
void FindToolBar::indicateSearchState(IFindSupport::Result searchState) void FindToolBar::indicateSearchState(IFindSupport::Result searchState)
{ {
m_lastResult = searchState; m_lastResult = searchState;
m_ui.findEdit->validate(); m_findEdit->validate();
} }
void FindToolBar::openFind(bool focus) void FindToolBar::openFind(bool focus)
@@ -888,15 +994,15 @@ void FindToolBar::selectAll()
bool FindToolBar::focusNextPrevChild(bool next) bool FindToolBar::focusNextPrevChild(bool next)
{ {
QAbstractButton *optionsButton = m_ui.findEdit->button(Utils::FancyLineEdit::Left); QAbstractButton *optionsButton = m_findEdit->button(Utils::FancyLineEdit::Left);
// close tab order // close tab order
if (next && m_ui.advancedButton->hasFocus()) if (next && m_advancedButton->hasFocus())
optionsButton->setFocus(Qt::TabFocusReason); optionsButton->setFocus(Qt::TabFocusReason);
else if (next && optionsButton->hasFocus()) else if (next && optionsButton->hasFocus())
m_ui.findEdit->setFocus(Qt::TabFocusReason); m_findEdit->setFocus(Qt::TabFocusReason);
else if (!next && optionsButton->hasFocus()) else if (!next && optionsButton->hasFocus())
m_ui.advancedButton->setFocus(Qt::TabFocusReason); m_advancedButton->setFocus(Qt::TabFocusReason);
else if (!next && m_ui.findEdit->hasFocus()) else if (!next && m_findEdit->hasFocus())
optionsButton->setFocus(Qt::TabFocusReason); optionsButton->setFocus(Qt::TabFocusReason);
else else
return Utils::StyledBar::focusNextPrevChild(next); return Utils::StyledBar::focusNextPrevChild(next);
@@ -1005,7 +1111,7 @@ void FindToolBar::setLightColoredIcon(bool lightColored)
: Utils::Icons::NEXT_TOOLBAR.icon()); : Utils::Icons::NEXT_TOOLBAR.icon());
m_localFindPreviousAction->setIcon(lightColored ? Utils::Icons::PREV.icon() m_localFindPreviousAction->setIcon(lightColored ? Utils::Icons::PREV.icon()
: Utils::Icons::PREV_TOOLBAR.icon()); : Utils::Icons::PREV_TOOLBAR.icon());
m_ui.close->setIcon(lightColored ? Utils::Icons::CLOSE_FOREGROUND.icon() m_close->setIcon(lightColored ? Utils::Icons::CLOSE_FOREGROUND.icon()
: Utils::Icons::CLOSE_TOOLBAR.icon()); : Utils::Icons::CLOSE_TOOLBAR.icon());
} }
@@ -1040,5 +1146,4 @@ void FindToolBar::updateReplaceEnabled()
m_replacePreviousAction->setEnabled(globalsEnabled); m_replacePreviousAction->setEnabled(globalsEnabled);
} }
} // namespace Internal } // Core::Internal
} // namespace Core

View File

@@ -3,7 +3,6 @@
#pragma once #pragma once
#include "ui_findwidget.h"
#include "currentdocumentfind.h" #include "currentdocumentfind.h"
#include <utils/id.h> #include <utils/id.h>
@@ -11,6 +10,16 @@
#include <QTimer> #include <QTimer>
QT_BEGIN_NAMESPACE
class QCompleter;
class QHBoxLayout;
class QLabel;
class QSpacerItem;
class QToolButton;
QT_END_NAMESPACE
namespace Utils { class FancyLineEdit; }
namespace Core { namespace Core {
class FindToolBarPlaceHolder; class FindToolBarPlaceHolder;
@@ -122,7 +131,7 @@ private:
void updateReplaceEnabled(); void updateReplaceEnabled();
CurrentDocumentFind *m_currentDocumentFind = nullptr; CurrentDocumentFind *m_currentDocumentFind = nullptr;
Ui::FindWidget m_ui;
QCompleter *m_findCompleter = nullptr; QCompleter *m_findCompleter = nullptr;
QCompleter *m_replaceCompleter = nullptr; QCompleter *m_replaceCompleter = nullptr;
QAction *m_goToCurrentFindAction = nullptr; QAction *m_goToCurrentFindAction = nullptr;
@@ -150,6 +159,21 @@ private:
QAction *m_localReplacePreviousAction = nullptr; QAction *m_localReplacePreviousAction = nullptr;
QAction *m_localReplaceAllAction = nullptr; QAction *m_localReplaceAllAction = nullptr;
QLabel *m_findLabel;
Utils::FancyLineEdit *m_findEdit;
QHBoxLayout *m_findButtonLayout;
QToolButton *m_findPreviousButton;
QToolButton *m_findNextButton;
QToolButton *m_selectAllButton;
QSpacerItem *m_horizontalSpacer;
QToolButton *m_close;
QLabel *m_replaceLabel;
Utils::FancyLineEdit *m_replaceEdit;
QWidget *m_replaceButtonsWidget;
QToolButton *m_replaceButton;
QToolButton *m_replaceNextButton;
QToolButton *m_replaceAllButton;
QToolButton *m_advancedButton;
FindFlags m_findFlags; FindFlags m_findFlags;
QTimer m_findIncrementalTimer; QTimer m_findIncrementalTimer;

View File

@@ -1,290 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Core::Internal::FindWidget</class>
<widget class="QWidget" name="Core::Internal::FindWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>681</width>
<height>88</height>
</rect>
</property>
<property name="windowTitle">
<string>Find</string>
</property>
<layout class="QGridLayout" name="mainLayout">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<property name="horizontalSpacing">
<number>3</number>
</property>
<property name="verticalSpacing">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="findLabel">
<property name="text">
<string>Find:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::FancyLineEdit" name="findEdit">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QWidget" name="findButtonsWidget" native="true">
<layout class="QHBoxLayout" name="findButtonLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="findPreviousButton"/>
</item>
<item>
<widget class="QToolButton" name="findNextButton"/>
</item>
<item>
<widget class="QToolButton" name="selectAllButton">
<property name="text">
<string/>
</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>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="close"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="replaceLabel">
<property name="text">
<string>Replace with:</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="Utils::FancyLineEdit" name="replaceEdit">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="2">
<layout class="QGridLayout" name="gridLayout">
<property name="horizontalSpacing">
<number>3</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWidget" name="replaceButtonsWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="replaceButtonsLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="replaceButton">
<property name="text">
<string>Replace</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextOnly</enum>
</property>
<property name="arrowType">
<enum>Qt::LeftArrow</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="replaceNextButton">
<property name="font">
<font/>
</property>
<property name="text">
<string>Replace &amp;&amp; Find</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextOnly</enum>
</property>
<property name="arrowType">
<enum>Qt::RightArrow</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="replaceAllButton">
<property name="font">
<font/>
</property>
<property name="text">
<string>Replace All</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextOnly</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="advancedButton">
<property name="text">
<string>Advanced...</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextOnly</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::FancyLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/fancylineedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>findEdit</tabstop>
<tabstop>replaceEdit</tabstop>
<tabstop>findPreviousButton</tabstop>
<tabstop>findNextButton</tabstop>
<tabstop>replaceButton</tabstop>
<tabstop>replaceNextButton</tabstop>
<tabstop>replaceAllButton</tabstop>
<tabstop>advancedButton</tabstop>
<tabstop>close</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>