LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Adds actions to handle some data with relevant IDataFilter plugins to a menu. More...
#include "stddatafiltermenucreator.h"
Public Member Functions | |
StdDataFilterMenuCreator (const QVariant &data, IEntityManager *iem, QMenu *menu) | |
Constructs the StdDataFilterMenuCreator. More... | |
const QByteArray & | GetChosenPlugin () const |
Returns the ID of the chosen plugin. More... | |
const QByteArray & | GetChosenVariant () const |
Returns the ID of the chosen data filter variant. More... | |
Adds actions to handle some data with relevant IDataFilter plugins to a menu.
This class can be used to offer a list of possible variants of handling an piece of data (like selected text, image, and so on) to the user.
For example, a hypothetical text editor could handle context menu requests in the following way:
Definition at line 44 of file stddatafiltermenucreator.h.
LC::Util::StdDataFilterMenuCreator::StdDataFilterMenuCreator | ( | const QVariant & | data, |
IEntityManager * | iem, | ||
QMenu * | menu | ||
) |
Constructs the StdDataFilterMenuCreator.
The newly created StdDataFilterMenuCreator becomes a child of the passed menu, so there is no need to delete it explicitly.
The actions corresponding to the data filter plugins are appended to the end of the menu.
[in] | data | The data to try to handle with IDataFilter plugins. |
[in] | iem | The IEntityManager object for obtaining the list of IDataFilter plugins. |
[in] | menu | The menu to add actions to. |
Definition at line 37 of file stddatafiltermenucreator.cpp.
const QByteArray & LC::Util::StdDataFilterMenuCreator::GetChosenPlugin | ( | ) | const |
Returns the ID of the chosen plugin.
Definition at line 76 of file stddatafiltermenucreator.cpp.
const QByteArray & LC::Util::StdDataFilterMenuCreator::GetChosenVariant | ( | ) | const |
Returns the ID of the chosen data filter variant.
The ID corresponds to the ID of the IDataFilter::FilterVariant structure.
Definition at line 81 of file stddatafiltermenucreator.cpp.