LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Provides a "clear text" action for line edits. More...
#include "clearlineeditaddon.h"
Public Member Functions | |
ClearLineEditAddon (const ICoreProxy_ptr &proxy, QLineEdit *edit) | |
Creates the addon and installs it on the given edit. More... | |
ClearLineEditAddon (const ICoreProxy_ptr &proxy, QLineEdit *edit, LineEditButtonManager *manager) | |
Creates the addon and installs it on the given edit. More... | |
void | SetEscClearsEdit (bool clears) |
Toggles whether Esc button clears the line edit. More... | |
Provides a "clear text" action for line edits.
Using this class is as simple as this:
The constructor takes a pointer to the proxy object that is passed to IInfo::Init() method of the plugin instance object and the pointer to the line edit where the addon should be installed.
The line edit takes the ownership of the addon, so there is no need to keep track of it or explicitly delete it.
Definition at line 42 of file clearlineeditaddon.h.
LC::Util::ClearLineEditAddon::ClearLineEditAddon | ( | const ICoreProxy_ptr & | proxy, |
QLineEdit * | edit | ||
) |
Creates the addon and installs it on the given edit.
Please note that if you want to use this addon with other buttons on the line edit you may consider using another constructor overload, taking an additional LineEditButtonManager parameter.
[in] | proxy | The proxy passed to IInfo::Init() of the plugin. |
[in] | edit | The line edit to install this addon into. The edit takes ownership of the addon. |
Definition at line 26 of file clearlineeditaddon.cpp.
LC::Util::ClearLineEditAddon::ClearLineEditAddon | ( | const ICoreProxy_ptr & | proxy, |
QLineEdit * | edit, | ||
LineEditButtonManager * | manager | ||
) |
Creates the addon and installs it on the given edit.
This constructors allows the line edit addon to be used easily with other buttons installed on the line edit using the passed button manager.
[in] | proxy | The proxy passed to IInfo::Init() of the plugin. |
[in] | edit | The line edit to install this addon into. The edit takes ownership of the addon. |
[in] | manager | The line edit button manager to use instead of the default internal one. |
Definition at line 31 of file clearlineeditaddon.cpp.
void LC::Util::ClearLineEditAddon::SetEscClearsEdit | ( | bool | clears | ) |
Toggles whether Esc button clears the line edit.
By default, Esc clears the line edit.
[in] | clears | Whether pressing Esc should clear the line edit. |
Definition at line 62 of file clearlineeditaddon.cpp.