![]() |
LeechCraft
0.6.70-13729-g7046a9d2a7
Modular cross-platform feature rich live environment.
|
Adds actions to handle some data with relevant IDataFilter plugins to a menu. More...
#include "stddatafiltermenucreator.h"
Inheritance diagram for LC::Util::StdDataFilterMenuCreator:
Collaboration diagram for LC::Util::StdDataFilterMenuCreator: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 67 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 59 of file stddatafiltermenucreator.cpp.
References LC::FromUserInitiated, IDataFilter::GetFilterVariants(), IEntityManager::GetPossibleHandlers(), IEntityManager::HandleEntity(), IDataFilter::FilterVariant::ID_, LC::Util::MakeEntity(), and LC::OnlyHandle.
Here is the call graph for this function:| const QByteArray & LC::Util::StdDataFilterMenuCreator::GetChosenPlugin | ( | ) | const |
Returns the ID of the chosen plugin.
Definition at line 99 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 104 of file stddatafiltermenucreator.cpp.