Refactor fancy line edit to optionally have two buttons.

Also unify some method naming.
Use the new feature to add clear buttons to the Locator,
and the find tool bar.

Task-number: QTCREATORBUG-705
This commit is contained in:
con
2010-07-01 09:32:47 +02:00
parent 1d88741086
commit 6dc4a039f2
12 changed files with 209 additions and 167 deletions

View File

@@ -70,11 +70,10 @@ QWidget *CommandMappings::createPage(QWidget *parent)
QWidget *w = new QWidget(parent);
m_page->setupUi(w);
m_page->resetButton->setIcon(QPixmap(Constants::ICON_RESET));
m_page->targetEdit->setSide(Utils::FancyLineEdit::Right);
m_page->targetEdit->setAutoHideIcon(true);
m_page->targetEdit->setAutoHideButton(Utils::FancyLineEdit::Right, true);
m_page->targetEdit->installEventFilter(this);
connect(m_page->targetEdit, SIGNAL(buttonClicked()),
connect(m_page->targetEdit, SIGNAL(buttonClicked(Utils::FancyLineEdit::Side)),
this, SLOT(removeTargetIdentifier()));
connect(m_page->resetButton, SIGNAL(clicked()),
this, SLOT(resetTargetIdentifier()));