forked from qt-creator/qt-creator
Utils: Merge FilterLineEdit into FancyLineEdit
Change-Id: Ic53836dade3985c36b0f6767e43b5af0ddb80d72 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -77,11 +77,14 @@ public:
|
|||||||
bool m_iconEnabled[2];
|
bool m_iconEnabled[2];
|
||||||
|
|
||||||
HistoryCompleter *m_historyCompleter;
|
HistoryCompleter *m_historyCompleter;
|
||||||
|
|
||||||
|
bool m_isFiltering;
|
||||||
|
QString m_lastFilterText;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) :
|
FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) :
|
||||||
QObject(parent), m_lineEdit(parent), m_historyCompleter(0)
|
QObject(parent), m_lineEdit(parent), m_historyCompleter(0), m_isFiltering(false)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
m_menu[i] = 0;
|
m_menu[i] = 0;
|
||||||
@@ -297,6 +300,45 @@ void FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)
|
|||||||
d->m_iconbutton[side]->setFocusPolicy(policy);
|
d->m_iconbutton[side]->setFocusPolicy(policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::setFiltering(bool on)
|
||||||
|
{
|
||||||
|
if (on == d->m_isFiltering)
|
||||||
|
return;
|
||||||
|
|
||||||
|
d->m_isFiltering = on;
|
||||||
|
if (on) {
|
||||||
|
d->m_lastFilterText = text();
|
||||||
|
// KDE has custom icons for this. Notice that icon namings are counter intuitive.
|
||||||
|
// If these icons are not available we use the freedesktop standard name before
|
||||||
|
// falling back to a bundled resource.
|
||||||
|
QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ?
|
||||||
|
QLatin1String("edit-clear-locationbar-rtl") :
|
||||||
|
QLatin1String("edit-clear-locationbar-ltr"),
|
||||||
|
QIcon::fromTheme(QLatin1String("edit-clear"), QIcon(QLatin1String(":/core/images/editclear.png"))));
|
||||||
|
|
||||||
|
setButtonPixmap(Right, icon.pixmap(16));
|
||||||
|
setButtonVisible(Right, true);
|
||||||
|
setPlaceholderText(tr("Filter"));
|
||||||
|
setButtonToolTip(Right, tr("Clear text"));
|
||||||
|
setAutoHideButton(Right, true);
|
||||||
|
connect(this, SIGNAL(rightButtonClicked()), this, SLOT(clear()));
|
||||||
|
connect(this, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged()));
|
||||||
|
} else {
|
||||||
|
disconnect(this, SIGNAL(rightButtonClicked()), this, SLOT(clear()));
|
||||||
|
disconnect(this, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FancyLineEdit::slotTextChanged()
|
||||||
|
{
|
||||||
|
const QString newlyTypedText = text();
|
||||||
|
if (newlyTypedText != d->m_lastFilterText) {
|
||||||
|
d->m_lastFilterText = newlyTypedText;
|
||||||
|
emit filterChanged(d->m_lastFilterText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// IconButton - helper class to represent a clickable icon
|
// IconButton - helper class to represent a clickable icon
|
||||||
|
|
||||||
IconButton::IconButton(QWidget *parent)
|
IconButton::IconButton(QWidget *parent)
|
||||||
|
@@ -103,14 +103,19 @@ public:
|
|||||||
// Sets a completer that is not a history completer.
|
// Sets a completer that is not a history completer.
|
||||||
void setSpecialCompleter(QCompleter *completer);
|
void setSpecialCompleter(QCompleter *completer);
|
||||||
|
|
||||||
|
// Enables fitering
|
||||||
|
void setFiltering(bool on);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void buttonClicked(Utils::FancyLineEdit::Side side);
|
void buttonClicked(Utils::FancyLineEdit::Side side);
|
||||||
void leftButtonClicked();
|
void leftButtonClicked();
|
||||||
void rightButtonClicked();
|
void rightButtonClicked();
|
||||||
|
void filterChanged(const QString &);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void checkButtons(const QString &);
|
void checkButtons(const QString &);
|
||||||
void iconClicked();
|
void iconClicked();
|
||||||
|
void slotTextChanged(); // For filtering.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
@@ -1,72 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
** Contact: http://www.qt-project.org/legal
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and Digia. For licensing terms and
|
|
||||||
** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "filterlineedit.h"
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\class Utils::FilterLineEdit
|
|
||||||
|
|
||||||
\brief The FilterLineEdit class is a fancy line edit customized for
|
|
||||||
filtering purposes with a clear button.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Utils {
|
|
||||||
|
|
||||||
FilterLineEdit::FilterLineEdit(QWidget *parent) :
|
|
||||||
FancyLineEdit(parent),
|
|
||||||
m_lastFilterText(text())
|
|
||||||
{
|
|
||||||
// KDE has custom icons for this. Notice that icon namings are counter intuitive.
|
|
||||||
// If these icons are not available we use the freedesktop standard name before
|
|
||||||
// falling back to a bundled resource.
|
|
||||||
QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ?
|
|
||||||
QLatin1String("edit-clear-locationbar-rtl") :
|
|
||||||
QLatin1String("edit-clear-locationbar-ltr"),
|
|
||||||
QIcon::fromTheme(QLatin1String("edit-clear"), QIcon(QLatin1String(":/core/images/editclear.png"))));
|
|
||||||
|
|
||||||
setButtonPixmap(Right, icon.pixmap(16));
|
|
||||||
setButtonVisible(Right, true);
|
|
||||||
setPlaceholderText(tr("Filter"));
|
|
||||||
setButtonToolTip(Right, tr("Clear text"));
|
|
||||||
setAutoHideButton(Right, true);
|
|
||||||
connect(this, SIGNAL(rightButtonClicked()), this, SLOT(clear()));
|
|
||||||
connect(this, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void FilterLineEdit::slotTextChanged()
|
|
||||||
{
|
|
||||||
const QString newlyTypedText = text();
|
|
||||||
if (newlyTypedText != m_lastFilterText) {
|
|
||||||
m_lastFilterText = newlyTypedText;
|
|
||||||
emit filterChanged(m_lastFilterText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Utils
|
|
@@ -1,55 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
** Contact: http://www.qt-project.org/legal
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and Digia. For licensing terms and
|
|
||||||
** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FILTERLINEEDIT_H
|
|
||||||
#define FILTERLINEEDIT_H
|
|
||||||
|
|
||||||
#include "fancylineedit.h"
|
|
||||||
|
|
||||||
namespace Utils {
|
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT FilterLineEdit : public FancyLineEdit
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit FilterLineEdit(QWidget *parent = 0);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void filterChanged(const QString &);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotTextChanged();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QString m_lastFilterText;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Utils
|
|
||||||
|
|
||||||
#endif // FILTERLINEEDIT_H
|
|
@@ -53,7 +53,6 @@ SOURCES += $$PWD/environment.cpp \
|
|||||||
$$PWD/detailsbutton.cpp \
|
$$PWD/detailsbutton.cpp \
|
||||||
$$PWD/detailswidget.cpp \
|
$$PWD/detailswidget.cpp \
|
||||||
$$PWD/changeset.cpp \
|
$$PWD/changeset.cpp \
|
||||||
$$PWD/filterlineedit.cpp \
|
|
||||||
$$PWD/faketooltip.cpp \
|
$$PWD/faketooltip.cpp \
|
||||||
$$PWD/htmldocextractor.cpp \
|
$$PWD/htmldocextractor.cpp \
|
||||||
$$PWD/navigationtreeview.cpp \
|
$$PWD/navigationtreeview.cpp \
|
||||||
@@ -143,7 +142,6 @@ HEADERS += \
|
|||||||
$$PWD/detailsbutton.h \
|
$$PWD/detailsbutton.h \
|
||||||
$$PWD/detailswidget.h \
|
$$PWD/detailswidget.h \
|
||||||
$$PWD/changeset.h \
|
$$PWD/changeset.h \
|
||||||
$$PWD/filterlineedit.h \
|
|
||||||
$$PWD/faketooltip.h \
|
$$PWD/faketooltip.h \
|
||||||
$$PWD/htmldocextractor.h \
|
$$PWD/htmldocextractor.h \
|
||||||
$$PWD/navigationtreeview.h \
|
$$PWD/navigationtreeview.h \
|
||||||
|
@@ -89,8 +89,6 @@ QtcLibrary {
|
|||||||
"filewizardpage.cpp",
|
"filewizardpage.cpp",
|
||||||
"filewizardpage.h",
|
"filewizardpage.h",
|
||||||
"filewizardpage.ui",
|
"filewizardpage.ui",
|
||||||
"filterlineedit.cpp",
|
|
||||||
"filterlineedit.h",
|
|
||||||
"flowlayout.cpp",
|
"flowlayout.cpp",
|
||||||
"flowlayout.h",
|
"flowlayout.h",
|
||||||
"function.cpp",
|
"function.cpp",
|
||||||
|
@@ -59,6 +59,9 @@ QWidget *CommandMappings::widget()
|
|||||||
m_page->targetEdit->setAutoHideButton(Utils::FancyLineEdit::Right, true);
|
m_page->targetEdit->setAutoHideButton(Utils::FancyLineEdit::Right, true);
|
||||||
m_page->targetEdit->setPlaceholderText(QString());
|
m_page->targetEdit->setPlaceholderText(QString());
|
||||||
m_page->targetEdit->installEventFilter(this);
|
m_page->targetEdit->installEventFilter(this);
|
||||||
|
m_page->targetEdit->setFiltering(true);
|
||||||
|
|
||||||
|
m_page->filterEdit->setFiltering(true);
|
||||||
|
|
||||||
connect(m_page->targetEdit, SIGNAL(buttonClicked(Utils::FancyLineEdit::Side)),
|
connect(m_page->targetEdit, SIGNAL(buttonClicked(Utils::FancyLineEdit::Side)),
|
||||||
this, SLOT(removeTargetIdentifier()));
|
this, SLOT(removeTargetIdentifier()));
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="Utils::FilterLineEdit" name="filterEdit"/>
|
<widget class="Utils::FancyLineEdit" name="filterEdit"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Utils::FilterLineEdit" name="targetEdit"/>
|
<widget class="Utils::FancyLineEdit" name="targetEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="resetButton">
|
<widget class="QPushButton" name="resetButton">
|
||||||
@@ -159,11 +159,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/fancylineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>Utils::FilterLineEdit</class>
|
|
||||||
<extends>Utils::FancyLineEdit</extends>
|
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
@@ -304,7 +304,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
|
|||||||
m_proxyModel(new CategoryFilterModel(this)),
|
m_proxyModel(new CategoryFilterModel(this)),
|
||||||
m_model(new CategoryModel(this)),
|
m_model(new CategoryModel(this)),
|
||||||
m_stackedLayout(new QStackedLayout),
|
m_stackedLayout(new QStackedLayout),
|
||||||
m_filterLineEdit(new Utils::FilterLineEdit),
|
m_filterLineEdit(new Utils::FancyLineEdit),
|
||||||
m_categoryList(new CategoryListView),
|
m_categoryList(new CategoryListView),
|
||||||
m_headerLabel(new QLabel),
|
m_headerLabel(new QLabel),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
@@ -312,6 +312,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
|
|||||||
m_finished(false)
|
m_finished(false)
|
||||||
{
|
{
|
||||||
m_applied = false;
|
m_applied = false;
|
||||||
|
m_filterLineEdit->setFiltering(true);
|
||||||
|
|
||||||
createGui();
|
createGui();
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
@@ -45,7 +45,7 @@ class QLabel;
|
|||||||
class QListView;
|
class QListView;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Utils { class FilterLineEdit; }
|
namespace Utils { class FancyLineEdit; }
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -99,7 +99,7 @@ private:
|
|||||||
Id m_currentCategory;
|
Id m_currentCategory;
|
||||||
Id m_currentPage;
|
Id m_currentPage;
|
||||||
QStackedLayout *m_stackedLayout;
|
QStackedLayout *m_stackedLayout;
|
||||||
Utils::FilterLineEdit *m_filterLineEdit;
|
Utils::FancyLineEdit *m_filterLineEdit;
|
||||||
QListView *m_categoryList;
|
QListView *m_categoryList;
|
||||||
QLabel *m_headerLabel;
|
QLabel *m_headerLabel;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
|
@@ -171,7 +171,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="Utils::FilterLineEdit" name="searchTerm"/>
|
<widget class="Utils::FancyLineEdit" name="searchTerm"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="3" column="0" colspan="2">
|
||||||
<widget class="QWidget" name="configWidget" native="true">
|
<widget class="QWidget" name="configWidget" native="true">
|
||||||
@@ -191,11 +191,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/fancylineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>Utils::FilterLineEdit</class>
|
|
||||||
<extends>Utils::FancyLineEdit</extends>
|
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>filterList</tabstop>
|
<tabstop>filterList</tabstop>
|
||||||
|
@@ -104,6 +104,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
|
|||||||
m_ui.findEdit->setButtonMenu(Utils::FancyLineEdit::Left, lineEditMenu);
|
m_ui.findEdit->setButtonMenu(Utils::FancyLineEdit::Left, lineEditMenu);
|
||||||
m_ui.findEdit->setButtonVisible(Utils::FancyLineEdit::Left, true);
|
m_ui.findEdit->setButtonVisible(Utils::FancyLineEdit::Left, true);
|
||||||
m_ui.findEdit->setPlaceholderText(QString());
|
m_ui.findEdit->setPlaceholderText(QString());
|
||||||
|
m_ui.findEdit->setFiltering(true);
|
||||||
m_ui.replaceEdit->setPlaceholderText(QString());
|
m_ui.replaceEdit->setPlaceholderText(QString());
|
||||||
|
|
||||||
connect(m_ui.findEdit, SIGNAL(textChanged(QString)), this, SLOT(invokeFindIncremental()));
|
connect(m_ui.findEdit, SIGNAL(textChanged(QString)), this, SLOT(invokeFindIncremental()));
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="Utils::FilterLineEdit" name="findEdit">
|
<widget class="Utils::FancyLineEdit" name="findEdit">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Utils::FilterLineEdit" name="replaceEdit">
|
<widget class="Utils::FancyLineEdit" name="replaceEdit">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>100</width>
|
||||||
@@ -275,11 +275,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/fancylineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>Utils::FilterLineEdit</class>
|
|
||||||
<extends>Utils::FancyLineEdit</extends>
|
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>findEdit</tabstop>
|
<tabstop>findEdit</tabstop>
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
#include <coreplugin/fileiconprovider.h>
|
#include <coreplugin/fileiconprovider.h>
|
||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
#include <utils/appmainwindow.h>
|
#include <utils/appmainwindow.h>
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/runextensions.h>
|
#include <utils/runextensions.h>
|
||||||
@@ -224,7 +224,7 @@ LocatorWidget::LocatorWidget(Locator *qop) :
|
|||||||
m_filterMenu(new QMenu(this)),
|
m_filterMenu(new QMenu(this)),
|
||||||
m_refreshAction(new QAction(tr("Refresh"), this)),
|
m_refreshAction(new QAction(tr("Refresh"), this)),
|
||||||
m_configureAction(new QAction(tr("Configure..."), this)),
|
m_configureAction(new QAction(tr("Configure..."), this)),
|
||||||
m_fileLineEdit(new Utils::FilterLineEdit),
|
m_fileLineEdit(new Utils::FancyLineEdit),
|
||||||
m_updateRequested(false),
|
m_updateRequested(false),
|
||||||
m_acceptRequested(false),
|
m_acceptRequested(false),
|
||||||
m_possibleToolTipRequest(false)
|
m_possibleToolTipRequest(false)
|
||||||
@@ -248,6 +248,7 @@ LocatorWidget::LocatorWidget(Locator *qop) :
|
|||||||
|
|
||||||
setWindowIcon(QIcon(QLatin1String(":/locator/images/locator.png")));
|
setWindowIcon(QIcon(QLatin1String(":/locator/images/locator.png")));
|
||||||
const QPixmap image = QPixmap(QLatin1String(Core::Constants::ICON_MAGNIFIER));
|
const QPixmap image = QPixmap(QLatin1String(Core::Constants::ICON_MAGNIFIER));
|
||||||
|
m_fileLineEdit->setFiltering(true);
|
||||||
m_fileLineEdit->setButtonPixmap(Utils::FancyLineEdit::Left, image);
|
m_fileLineEdit->setButtonPixmap(Utils::FancyLineEdit::Left, image);
|
||||||
m_fileLineEdit->setButtonToolTip(Utils::FancyLineEdit::Left, tr("Options"));
|
m_fileLineEdit->setButtonToolTip(Utils::FancyLineEdit::Left, tr("Options"));
|
||||||
m_fileLineEdit->setFocusPolicy(Qt::ClickFocus);
|
m_fileLineEdit->setFocusPolicy(Qt::ClickFocus);
|
||||||
|
@@ -42,7 +42,7 @@ class QMenu;
|
|||||||
class QTreeView;
|
class QTreeView;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Utils { class FilterLineEdit; }
|
namespace Utils { class FancyLineEdit; }
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -90,7 +90,7 @@ private:
|
|||||||
QMenu *m_filterMenu;
|
QMenu *m_filterMenu;
|
||||||
QAction *m_refreshAction;
|
QAction *m_refreshAction;
|
||||||
QAction *m_configureAction;
|
QAction *m_configureAction;
|
||||||
Utils::FilterLineEdit *m_fileLineEdit;
|
Utils::FancyLineEdit *m_fileLineEdit;
|
||||||
QTimer *m_showPopupTimer;
|
QTimer *m_showPopupTimer;
|
||||||
QFutureWatcher<LocatorFilterEntry> *m_entriesWatcher;
|
QFutureWatcher<LocatorFilterEntry> *m_entriesWatcher;
|
||||||
QMap<Core::Id, QAction *> m_filterActionMap;
|
QMap<Core::Id, QAction *> m_filterActionMap;
|
||||||
|
@@ -57,11 +57,12 @@ static const int layoutSpacing = 5;
|
|||||||
static const int maxTitleWidth = 350;
|
static const int maxTitleWidth = 350;
|
||||||
|
|
||||||
QueryValidatingLineEdit::QueryValidatingLineEdit(QWidget *parent)
|
QueryValidatingLineEdit::QueryValidatingLineEdit(QWidget *parent)
|
||||||
: Utils::FilterLineEdit(parent)
|
: Utils::FancyLineEdit(parent)
|
||||||
, m_valid(true)
|
, m_valid(true)
|
||||||
, m_okTextColor(palette().color(QPalette::Active, QPalette::Text))
|
, m_okTextColor(palette().color(QPalette::Active, QPalette::Text))
|
||||||
, m_errorTextColor(Qt::red)
|
, m_errorTextColor(Qt::red)
|
||||||
{
|
{
|
||||||
|
setFiltering(true);
|
||||||
connect(this, SIGNAL(textChanged(QString)), this, SLOT(setValid()));
|
connect(this, SIGNAL(textChanged(QString)), this, SLOT(setValid()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p,
|
|||||||
, m_treeView(new QTreeView)
|
, m_treeView(new QTreeView)
|
||||||
, m_detailsBrowser(new QTextBrowser)
|
, m_detailsBrowser(new QTextBrowser)
|
||||||
, m_queryLineEdit(new QueryValidatingLineEdit)
|
, m_queryLineEdit(new QueryValidatingLineEdit)
|
||||||
, m_filterLineEdit(new Utils::FilterLineEdit)
|
, m_filterLineEdit(new Utils::FancyLineEdit)
|
||||||
, m_repositoryChooser(new Utils::PathChooser)
|
, m_repositoryChooser(new Utils::PathChooser)
|
||||||
, m_buttonBox(new QDialogButtonBox(QDialogButtonBox::Close))
|
, m_buttonBox(new QDialogButtonBox(QDialogButtonBox::Close))
|
||||||
, m_repositoryChooserLabel(new QLabel(tr("Apply in:") + QLatin1Char(' '), this))
|
, m_repositoryChooserLabel(new QLabel(tr("Apply in:") + QLatin1Char(' '), this))
|
||||||
@@ -123,6 +124,7 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p,
|
|||||||
filterLayout->addWidget(m_queryLineEdit);
|
filterLayout->addWidget(m_queryLineEdit);
|
||||||
filterLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Ignored));
|
filterLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Ignored));
|
||||||
m_filterLineEdit->setFixedWidth(300);
|
m_filterLineEdit->setFixedWidth(300);
|
||||||
|
m_filterLineEdit->setFiltering(true);
|
||||||
filterLayout->addWidget(m_filterLineEdit);
|
filterLayout->addWidget(m_filterLineEdit);
|
||||||
connect(m_filterLineEdit, SIGNAL(filterChanged(QString)),
|
connect(m_filterLineEdit, SIGNAL(filterChanged(QString)),
|
||||||
m_filterModel, SLOT(setFilterFixedString(QString)));
|
m_filterModel, SLOT(setFilterFixedString(QString)));
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#ifndef GERRIT_INTERNAL_GERRITDIALOG_H
|
#ifndef GERRIT_INTERNAL_GERRITDIALOG_H
|
||||||
#define GERRIT_INTERNAL_GERRITDIALOG_H
|
#define GERRIT_INTERNAL_GERRITDIALOG_H
|
||||||
|
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
@@ -54,7 +54,7 @@ class GerritParameters;
|
|||||||
class GerritModel;
|
class GerritModel;
|
||||||
class GerritChange;
|
class GerritChange;
|
||||||
|
|
||||||
class QueryValidatingLineEdit : public Utils::FilterLineEdit
|
class QueryValidatingLineEdit : public Utils::FancyLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ private:
|
|||||||
QTreeView *m_treeView;
|
QTreeView *m_treeView;
|
||||||
QTextBrowser *m_detailsBrowser;
|
QTextBrowser *m_detailsBrowser;
|
||||||
QueryValidatingLineEdit *m_queryLineEdit;
|
QueryValidatingLineEdit *m_queryLineEdit;
|
||||||
Utils::FilterLineEdit *m_filterLineEdit;
|
Utils::FancyLineEdit *m_filterLineEdit;
|
||||||
Utils::PathChooser *m_repositoryChooser;
|
Utils::PathChooser *m_repositoryChooser;
|
||||||
QDialogButtonBox *m_buttonBox;
|
QDialogButtonBox *m_buttonBox;
|
||||||
QPushButton *m_displayButton;
|
QPushButton *m_displayButton;
|
||||||
|
@@ -49,7 +49,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="Utils::FilterLineEdit" name="filterLineEdit"/>
|
<widget class="Utils::FancyLineEdit" name="filterLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -59,11 +59,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/fancylineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>Utils::FilterLineEdit</class>
|
|
||||||
<extends>Utils::FancyLineEdit</extends>
|
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="Utils::FilterLineEdit" name="filterLineEdit">
|
<widget class="Utils::FancyLineEdit" name="filterLineEdit">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::ClickFocus</enum>
|
<enum>Qt::ClickFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -32,11 +32,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/fancylineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>Utils::FilterLineEdit</class>
|
|
||||||
<extends>Utils::FancyLineEdit</extends>
|
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>filterLineEdit</tabstop>
|
<tabstop>filterLineEdit</tabstop>
|
||||||
|
@@ -115,6 +115,7 @@ StashDialog::StashDialog(QWidget *parent) :
|
|||||||
setAttribute(Qt::WA_DeleteOnClose, true); // Do not update unnecessarily
|
setAttribute(Qt::WA_DeleteOnClose, true); // Do not update unnecessarily
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->filterLineEdit->setFiltering(true);
|
||||||
// Buttons
|
// Buttons
|
||||||
ui->buttonBox->addButton(m_showCurrentButton, QDialogButtonBox::ActionRole);
|
ui->buttonBox->addButton(m_showCurrentButton, QDialogButtonBox::ActionRole);
|
||||||
connect(m_showCurrentButton, SIGNAL(clicked()), this, SLOT(showCurrent()));
|
connect(m_showCurrentButton, SIGNAL(clicked()), this, SLOT(showCurrent()));
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Utils::FilterLineEdit" name="filterLineEdit"/>
|
<widget class="Utils::FancyLineEdit" name="filterLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="stashView"/>
|
<widget class="QTreeView" name="stashView"/>
|
||||||
@@ -49,11 +49,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/fancylineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>Utils::FilterLineEdit</class>
|
|
||||||
<extends>Utils::FancyLineEdit</extends>
|
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <projectexplorer/kitchooser.h>
|
#include <projectexplorer/kitchooser.h>
|
||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
|
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
@@ -115,7 +115,7 @@ public:
|
|||||||
|
|
||||||
QTreeView *procView;
|
QTreeView *procView;
|
||||||
QTextBrowser *errorText;
|
QTextBrowser *errorText;
|
||||||
FilterLineEdit *processFilterLineEdit;
|
FancyLineEdit *processFilterLineEdit;
|
||||||
QPushButton *updateListButton;
|
QPushButton *updateListButton;
|
||||||
QPushButton *killProcessButton;
|
QPushButton *killProcessButton;
|
||||||
QPushButton *acceptButton;
|
QPushButton *acceptButton;
|
||||||
@@ -135,10 +135,11 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
|
|||||||
|
|
||||||
processList = 0;
|
processList = 0;
|
||||||
|
|
||||||
processFilterLineEdit = new FilterLineEdit(q);
|
processFilterLineEdit = new FancyLineEdit(q);
|
||||||
processFilterLineEdit->setPlaceholderText(DeviceProcessesDialog::tr("Filter"));
|
processFilterLineEdit->setPlaceholderText(DeviceProcessesDialog::tr("Filter"));
|
||||||
processFilterLineEdit->setFocus(Qt::TabFocusReason);
|
processFilterLineEdit->setFocus(Qt::TabFocusReason);
|
||||||
processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter"));
|
processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter"));
|
||||||
|
processFilterLineEdit->setFiltering(true);
|
||||||
|
|
||||||
kitChooser->populate();
|
kitChooser->populate();
|
||||||
|
|
||||||
|
@@ -115,12 +115,13 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
|
|||||||
connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(setCurrentIndexOfStackedWidget(int)));
|
connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(setCurrentIndexOfStackedWidget(int)));
|
||||||
connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(updateSearch()));
|
connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(updateSearch()));
|
||||||
|
|
||||||
m_filterLineEdit = new Utils::FilterLineEdit(this);
|
m_filterLineEdit = new Utils::FancyLineEdit(this);
|
||||||
m_filterLineEdit->setObjectName(QLatin1String("itemLibrarySearchInput"));
|
m_filterLineEdit->setObjectName(QLatin1String("itemLibrarySearchInput"));
|
||||||
m_filterLineEdit->setPlaceholderText(tr("<Filter>", "Library search input hint text"));
|
m_filterLineEdit->setPlaceholderText(tr("<Filter>", "Library search input hint text"));
|
||||||
m_filterLineEdit->setDragEnabled(false);
|
m_filterLineEdit->setDragEnabled(false);
|
||||||
m_filterLineEdit->setMinimumWidth(75);
|
m_filterLineEdit->setMinimumWidth(75);
|
||||||
m_filterLineEdit->setTextMargins(0, 0, 20, 0);
|
m_filterLineEdit->setTextMargins(0, 0, 20, 0);
|
||||||
|
m_filterLineEdit->setFiltering(true);
|
||||||
QWidget *lineEditFrame = new QWidget(this);
|
QWidget *lineEditFrame = new QWidget(this);
|
||||||
lineEditFrame->setObjectName(QLatin1String("itemLibrarySearchInputFrame"));
|
lineEditFrame->setObjectName(QLatin1String("itemLibrarySearchInputFrame"));
|
||||||
QGridLayout *lineEditLayout = new QGridLayout(lineEditFrame);
|
QGridLayout *lineEditLayout = new QGridLayout(lineEditFrame);
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#include "itemlibraryinfo.h"
|
#include "itemlibraryinfo.h"
|
||||||
#include "itemlibrarycomponents.h"
|
#include "itemlibrarycomponents.h"
|
||||||
|
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
@@ -132,7 +132,7 @@ private:
|
|||||||
|
|
||||||
QWeakPointer<QStackedWidget> m_stackedWidget;
|
QWeakPointer<QStackedWidget> m_stackedWidget;
|
||||||
|
|
||||||
QWeakPointer<Utils::FilterLineEdit> m_filterLineEdit;
|
QWeakPointer<Utils::FancyLineEdit> m_filterLineEdit;
|
||||||
QScopedPointer<QQuickView> m_itemsView;
|
QScopedPointer<QQuickView> m_itemsView;
|
||||||
QScopedPointer<Internal::ItemLibraryTreeView> m_resourcesView;
|
QScopedPointer<Internal::ItemLibraryTreeView> m_resourcesView;
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="Utils::FilterLineEdit" name="filterLineEdit"/>
|
<widget class="Utils::FancyLineEdit" name="filterLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="filterTreeView"/>
|
<widget class="QTreeView" name="filterTreeView"/>
|
||||||
@@ -38,11 +38,6 @@
|
|||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/fancylineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>Utils::FilterLineEdit</class>
|
|
||||||
<extends>Utils::FancyLineEdit</extends>
|
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <localhelpmanager.h>
|
#include <localhelpmanager.h>
|
||||||
|
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
#include <utils/styledbar.h>
|
#include <utils/styledbar.h>
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@@ -424,7 +424,8 @@ void BookmarkWidget::setup(bool showButtons)
|
|||||||
vlayout->setMargin(0);
|
vlayout->setMargin(0);
|
||||||
vlayout->setSpacing(0);
|
vlayout->setSpacing(0);
|
||||||
|
|
||||||
searchField = new Utils::FilterLineEdit(this);
|
searchField = new Utils::FancyLineEdit(this);
|
||||||
|
searchField->setFiltering(true);
|
||||||
setFocusProxy(searchField);
|
setFocusProxy(searchField);
|
||||||
|
|
||||||
Utils::StyledBar *toolbar = new Utils::StyledBar(this);
|
Utils::StyledBar *toolbar = new Utils::StyledBar(this);
|
||||||
|
@@ -45,7 +45,6 @@
|
|||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QEvent;
|
class QEvent;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class QTreeView;
|
class QTreeView;
|
||||||
@@ -53,9 +52,10 @@ class QToolButton;
|
|||||||
class QStandardItem;
|
class QStandardItem;
|
||||||
class QAbstractItemModel;
|
class QAbstractItemModel;
|
||||||
class QSortFilterProxyModel;
|
class QSortFilterProxyModel;
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
namespace Utils { class FancyLineEdit; }
|
||||||
|
|
||||||
class BookmarkManager;
|
class BookmarkManager;
|
||||||
|
|
||||||
class BookmarkDialog : public QDialog
|
class BookmarkDialog : public QDialog
|
||||||
@@ -133,7 +133,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
QRegExp regExp;
|
QRegExp regExp;
|
||||||
TreeView *treeView;
|
TreeView *treeView;
|
||||||
QLineEdit *searchField;
|
Utils::FancyLineEdit *searchField;
|
||||||
QToolButton *addButton;
|
QToolButton *addButton;
|
||||||
QToolButton *removeButton;
|
QToolButton *removeButton;
|
||||||
BookmarkManager *bookmarkManager;
|
BookmarkManager *bookmarkManager;
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
#include <localhelpmanager.h>
|
#include <localhelpmanager.h>
|
||||||
#include <openpagesmanager.h>
|
#include <openpagesmanager.h>
|
||||||
|
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/styledbar.h>
|
#include <utils/styledbar.h>
|
||||||
|
|
||||||
@@ -59,8 +59,9 @@ IndexWindow::IndexWindow()
|
|||||||
{
|
{
|
||||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||||
|
|
||||||
m_searchLineEdit = new Utils::FilterLineEdit();
|
m_searchLineEdit = new Utils::FancyLineEdit();
|
||||||
m_searchLineEdit->setPlaceholderText(QString());
|
m_searchLineEdit->setPlaceholderText(QString());
|
||||||
|
m_searchLineEdit->setFiltering(true);
|
||||||
setFocusProxy(m_searchLineEdit);
|
setFocusProxy(m_searchLineEdit);
|
||||||
connect(m_searchLineEdit, SIGNAL(textChanged(QString)), this,
|
connect(m_searchLineEdit, SIGNAL(textChanged(QString)), this,
|
||||||
SLOT(filterIndices(QString)));
|
SLOT(filterIndices(QString)));
|
||||||
@@ -191,6 +192,11 @@ void IndexWindow::setSearchLineEditText(const QString &text)
|
|||||||
m_searchLineEdit->setText(text);
|
m_searchLineEdit->setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString IndexWindow::searchLineEditText() const
|
||||||
|
{
|
||||||
|
return m_searchLineEdit->text();
|
||||||
|
}
|
||||||
|
|
||||||
void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index)
|
void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index)
|
||||||
{
|
{
|
||||||
QHelpIndexModel *model = qobject_cast<QHelpIndexModel*>(indexWidget->model());
|
QHelpIndexModel *model = qobject_cast<QHelpIndexModel*>(indexWidget->model());
|
||||||
|
@@ -32,15 +32,14 @@
|
|||||||
|
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QLineEdit>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QHelpIndexWidget;
|
class QHelpIndexWidget;
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
namespace Utils { class FancyLineEdit; }
|
||||||
|
|
||||||
class IndexWindow : public QWidget
|
class IndexWindow : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -50,10 +49,7 @@ public:
|
|||||||
~IndexWindow();
|
~IndexWindow();
|
||||||
|
|
||||||
void setSearchLineEditText(const QString &text);
|
void setSearchLineEditText(const QString &text);
|
||||||
QString searchLineEditText() const
|
QString searchLineEditText() const;
|
||||||
{
|
|
||||||
return m_searchLineEdit->text();
|
|
||||||
}
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void linkActivated(const QUrl &link);
|
void linkActivated(const QUrl &link);
|
||||||
@@ -69,7 +65,7 @@ private:
|
|||||||
bool eventFilter(QObject *obj, QEvent *e);
|
bool eventFilter(QObject *obj, QEvent *e);
|
||||||
void open(QHelpIndexWidget* indexWidget, const QModelIndex &index);
|
void open(QHelpIndexWidget* indexWidget, const QModelIndex &index);
|
||||||
|
|
||||||
QLineEdit *m_searchLineEdit;
|
Utils::FancyLineEdit *m_searchLineEdit;
|
||||||
QHelpIndexWidget *m_indexWidget;
|
QHelpIndexWidget *m_indexWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Utils::FilterLineEdit" name="lineEdit"/>
|
<widget class="Utils::FancyLineEdit" name="lineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListView" name="listWidget"/>
|
<widget class="QListView" name="listWidget"/>
|
||||||
@@ -86,9 +86,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>Utils::FilterLineEdit</class>
|
<class>Utils::FancyLineEdit</class>
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header location="global">utils/filterlineedit.h</header>
|
<header location="global">utils/fancylineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@@ -125,18 +125,6 @@ FancyLineEdit_CW::FancyLineEdit_CW(QObject *parent) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterLineEdit_CW::FilterLineEdit_CW(QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
CustomWidget<Utils::FilterLineEdit>
|
|
||||||
(QLatin1String("<utils/filterlineedit.h>"),
|
|
||||||
false,
|
|
||||||
QLatin1String(groupC),
|
|
||||||
QIcon(),
|
|
||||||
QLatin1String("A Line edit customized for filtering"))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QtColorButton_CW::QtColorButton_CW(QObject *parent) :
|
QtColorButton_CW::QtColorButton_CW(QObject *parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
CustomWidget<Utils::QtColorButton>
|
CustomWidget<Utils::QtColorButton>
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
#include <utils/linecolumnlabel.h>
|
#include <utils/linecolumnlabel.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/projectnamevalidatinglineedit.h>
|
#include <utils/projectnamevalidatinglineedit.h>
|
||||||
#include <utils/filterlineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
#include <utils/qtcolorbutton.h>
|
#include <utils/qtcolorbutton.h>
|
||||||
#include <utils/submiteditorwidget.h>
|
#include <utils/submiteditorwidget.h>
|
||||||
#include <utils/submitfieldwidget.h>
|
#include <utils/submitfieldwidget.h>
|
||||||
@@ -144,16 +144,6 @@ public:
|
|||||||
virtual QWidget *createWidget(QWidget *parent);
|
virtual QWidget *createWidget(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class FilterLineEdit_CW :
|
|
||||||
public QObject,
|
|
||||||
public CustomWidget<Utils::FilterLineEdit>
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
||||||
public:
|
|
||||||
explicit FilterLineEdit_CW(QObject *parent = 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
class QtColorButton_CW :
|
class QtColorButton_CW :
|
||||||
public QObject,
|
public QObject,
|
||||||
public CustomWidget<Utils::QtColorButton>
|
public CustomWidget<Utils::QtColorButton>
|
||||||
|
Reference in New Issue
Block a user