mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-05 11:24:15 +00:00
Move m_searchPattern widget from code to .ui file
This commit is contained in:
parent
a52f9d4ef9
commit
216d98844b
@ -61,7 +61,6 @@
|
||||
#include "mainwindow.h"
|
||||
#include "addnewtorrentdialog.h"
|
||||
#include "guiiconprovider.h"
|
||||
#include "lineedit.h"
|
||||
#include "pluginselectdlg.h"
|
||||
#include "searchsortmodel.h"
|
||||
#include "searchtab.h"
|
||||
@ -78,13 +77,8 @@ SearchWidget::SearchWidget(MainWindow *mainWindow)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
m_searchPattern = new LineEdit(this);
|
||||
searchBarLayout->insertWidget(0, m_searchPattern);
|
||||
connect(m_searchPattern, SIGNAL(returnPressed()), searchButton, SLOT(click()));
|
||||
|
||||
QString searchPatternHint;
|
||||
QTextStream stream(&searchPatternHint, QIODevice::WriteOnly);
|
||||
|
||||
stream << "<html><head/><body><p>"
|
||||
<< tr("A phrase to search for.") << "<br>"
|
||||
<< tr("Spaces in a search term may be protected by double quotes.")
|
||||
@ -99,7 +93,6 @@ SearchWidget::SearchWidget(MainWindow *mainWindow)
|
||||
"Search phrase example, illustrates quotes usage, double quoted"
|
||||
"pair of space delimited words, the whole pair is highlighted")
|
||||
<< "</p></body></html>" << flush;
|
||||
|
||||
m_searchPattern->setToolTip(searchPatternHint);
|
||||
|
||||
// Icons
|
||||
@ -120,6 +113,7 @@ SearchWidget::SearchWidget(MainWindow *mainWindow)
|
||||
fillCatCombobox();
|
||||
fillPluginComboBox();
|
||||
|
||||
connect(m_searchPattern, SIGNAL(returnPressed()), searchButton, SLOT(click()));
|
||||
connect(m_searchPattern, SIGNAL(textEdited(QString)), this, SLOT(searchTextEdited(QString)));
|
||||
connect(selectPlugin, SIGNAL(currentIndexChanged(int)), this, SLOT(selectMultipleBox(int)));
|
||||
}
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include "ui_searchwidget.h"
|
||||
|
||||
class MainWindow;
|
||||
class LineEdit;
|
||||
class SearchEngine;
|
||||
struct SearchResult;
|
||||
class SearchTab;
|
||||
@ -82,7 +81,6 @@ private:
|
||||
QString selectedCategory() const;
|
||||
QString selectedPlugin() const;
|
||||
|
||||
LineEdit *m_searchPattern;
|
||||
SearchEngine *m_searchEngine;
|
||||
QPointer<SearchTab> m_currentSearchTab; // Selected tab
|
||||
QPointer<SearchTab> m_activeSearchTab; // Tab with running search
|
||||
|
@ -16,6 +16,9 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="searchBarLayout">
|
||||
<item>
|
||||
<widget class="LineEdit" name="m_searchPattern"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboCategory">
|
||||
<property name="sizePolicy">
|
||||
@ -114,6 +117,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>lineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
x
Reference in New Issue
Block a user