Commit 70a9c535 authored by Mike Kremer's avatar Mike Kremer

Allow selection plugins to restrict its selection metaphors to specified data...

Allow selection plugins to restrict its selection metaphors to specified data types (or all if none is given).

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14971 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 63115ad8
This diff is collapsed.
......@@ -258,6 +258,9 @@ signals:
/// SelectionInterface: This signal is emitted when a custom selection mode is added
void addCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QIcon _icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier);
void addCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QIcon _icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier,
DataType _objectTypeRestriction);
/// SelectionInterface: This signal is used to add non-interactive operations for a specific primitive type
void addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type);
......@@ -501,6 +504,9 @@ signals:
/// SelectionInterface: Add new selection mode for specified type
void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QIcon _icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier);
void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QIcon _icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier,
DataType _objectTypeRestriction);
/// SelectionInterface: Called in order to add non-interactive operations for a specific primitive type
void slotAddSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type);
......
......@@ -1251,9 +1251,17 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
connect(plugin , SIGNAL(addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)),
this , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)),Qt::DirectConnection);
if ( checkSignal(plugin,"addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)") )
connect(plugin , SIGNAL(addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)),
this , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)" ) )
connect(this , SIGNAL(addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)),
plugin , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)" ) )
connect(this , SIGNAL(addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)),
plugin , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)),Qt::DirectConnection);
if ( checkSignal(plugin,"addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)") )
connect(plugin , SIGNAL(addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),
......
......@@ -74,6 +74,12 @@ void Core::slotAddCustomSelectionMode(QString _handleName, QString _modeName, QS
emit addCustomSelectionMode(_handleName, _modeName, _description, _icon, _associatedTypes, _customIdentifier);
}
void Core::slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QIcon _icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier,
DataType _objectTypeRestriction) {
emit addCustomSelectionMode(_handleName, _modeName, _description, _icon, _associatedTypes, _customIdentifier, _objectTypeRestriction);
}
void Core::slotAddSelectionOperations(QString _handleName,QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type) {
emit addSelectionOperations(_handleName, _operationsList, _category, _type);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment