![]() |
LeechCraft
0.6.70-13729-g7046a9d2a7
Modular cross-platform feature rich live environment.
|
Manages additional overlay buttons in a QLineEdit. More...
#include "lineeditbuttonmanager.h"
Public Member Functions | |
LineEditButtonManager (QLineEdit *edit) | |
Constructs the manager for the line edit. More... | |
void | Add (QToolButton *button) |
Adds a button to the line edit. More... | |
Protected Member Functions | |
bool | eventFilter (QObject *, QEvent *) |
Manages additional overlay buttons in a QLineEdit.
This class manages custom buttons (like "Clear") on a QLineEdit or a derived class. Particularly, it lays outs the buttons next to each other and updates their positions when the managed line edit is moved or resized.
Only one LineEditButtonManager can be installed on a single QLineEdit. Installing more than one manager will result in an exception thrown from the constructor.
The managed line edit owns the created LineEditButtonManager.
Definition at line 59 of file lineeditbuttonmanager.h.
LC::Util::LineEditButtonManager::LineEditButtonManager | ( | QLineEdit * | edit | ) |
Constructs the manager for the line edit.
Constructs the LineEditButtonManager managing the given line edit.
edit becomes the owner of the manager.
[in] | edit | The line edit to manage. |
std::runtime_error | the line edit is already managed by another LineEditButtonManager instance. |
Definition at line 42 of file lineeditbuttonmanager.cpp.
void LC::Util::LineEditButtonManager::Add | ( | QToolButton * | button | ) |
Adds a button to the line edit.
[in] | button | The button to add to the managed line edit. |
Definition at line 62 of file lineeditbuttonmanager.cpp.
Referenced by LC::Util::TagsLineEdit::AddSelector().
|
protected |
Definition at line 75 of file lineeditbuttonmanager.cpp.
References LC::Util::Move, and LC::Util::Resize.