![]() |
LeechCraft
0.6.70-13605-g8cd066ad6a
Modular cross-platform feature rich live environment.
|
Manages additional overlay buttons in a QLineEdit. More...
#include "lineeditbuttonmanager.h"
Inheritance diagram for LC::Util::LineEditButtonManager:
Collaboration diagram for LC::Util::LineEditButtonManager: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 58 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 93 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 113 of file lineeditbuttonmanager.cpp.
|
protected |
Definition at line 126 of file lineeditbuttonmanager.cpp.