LeechCraft  %{LEECHCRAFT_VERSION}
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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...
 

Protected Member Functions

bool eventFilter (QObject *, QEvent *)
 

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 60 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.

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 40 of file clearlineeditaddon.cpp.

Member Function Documentation

bool LeechCraft::Util::ClearLineEditAddon::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected

Definition at line 78 of file clearlineeditaddon.cpp.


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