LeechCraft  %{LEECHCRAFT_VERSION}
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LeechCraft::Util::ClearLineEditAddon Class Reference

Provides a "clear text" action for line edits. More...

#include "clearlineeditaddon.h"

+ Inheritance diagram for LeechCraft::Util::ClearLineEditAddon:
+ Collaboration diagram for LeechCraft::Util::ClearLineEditAddon:

Public Member Functions

 ClearLineEditAddon (ICoreProxy_ptr proxy, QLineEdit *edit)
 Creates the addon and installs it on the given edit. More...
 
 ClearLineEditAddon (ICoreProxy_ptr proxy, QLineEdit *edit, LineEditButtonManager *manager)
 Creates the addon and installs it on the given edit. More...
 

Detailed Description

Provides a "clear text" action for line edits.

Using this class is as simple as this:

QLineEdit *edit = ...; // or some QLineEdit-derived class
new ClearLineEditAddon { proxy, edit }; // proxy is the one passed to IInfo::Init()

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.

See also
IInfo::Init()

Definition at line 64 of file clearlineeditaddon.h.

Constructor & Destructor Documentation

LeechCraft::Util::ClearLineEditAddon::ClearLineEditAddon ( 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.

Parameters
[in]proxyThe proxy passed to IInfo::Init() of the plugin.
[in]editThe line edit to install this addon into. The edit takes ownership of the addon.

Definition at line 43 of file clearlineeditaddon.cpp.

LeechCraft::Util::ClearLineEditAddon::ClearLineEditAddon ( 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.

Parameters
[in]proxyThe proxy passed to IInfo::Init() of the plugin.
[in]editThe line edit to install this addon into. The edit takes ownership of the addon.
[in]managerThe line edit button manager to use instead of the default internal one.

Definition at line 48 of file clearlineeditaddon.cpp.

References LeechCraft::Util::LineEditButtonManager::Add().

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: