LeechCraft
0.6.70-15082-g543737046d
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 *) override |
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 36 of file lineeditbuttonmanager.h.
|
explicit |
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 25 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 48 of file lineeditbuttonmanager.cpp.
|
overrideprotected |
Definition at line 61 of file lineeditbuttonmanager.cpp.