46 #include "Actionbutton.hh" 48 #include <QPushButton> 49 #include <QGridLayout> 56 QAction(_icon, _description, _parent),
58 objectTypeRestriction_(_objectTypeRestriction) {}
72 void addAssociatedType(
unsigned int _associatedType) { associatedTypes_ |= _associatedType; }
73 void removeAssociatedType(
unsigned int _associatedType) { associatedTypes_ &= ~_associatedType; }
74 bool isAssociated(
unsigned int _type,
bool _associatedWithAll =
false) {
76 if(_associatedWithAll && _type != 0u)
77 return ((associatedTypes_ | _type) == associatedTypes_);
79 return ((associatedTypes_ & _type) != 0);
82 void objectTypeRestriction(
const DataType& _type) {
83 objectTypeRestriction_ = _type;
86 const DataType& objectTypeRestriction()
const {
87 return objectTypeRestriction_;
91 QString selectionEnvHandle_;
92 QString selectionModeHandle_;
94 unsigned int associatedTypes_;
104 QAction(_icon, _description, _parent),
106 selectionEnvironmentHandle_(
"")
114 unsigned int primitiveType() {
return primitiveType_; }
118 selectionEnvironmentHandle_ = _handle;
120 QString selectionEnvironmentHandle()
const {
121 return selectionEnvironmentHandle_;
125 unsigned int primitiveType_;
126 QString selectionEnvironmentHandle_;
137 numColumns_(_numColumns) {};
139 void addWidget(QWidget* _widget) {
141 QGridLayout::addWidget(_widget, currentRow_, currentColumn_);
144 if(currentColumn_ == numColumns_) {
151 unsigned int currentRow_;
152 unsigned int currentColumn_;
153 unsigned int numColumns_;
PrimitiveAction(QIcon _icon, QString _description, QObject *_parent=0)
Default constructor.
HandleAction(QIcon _icon, QString _description, QObject *_parent=0, DataType _objectTypeRestriction=DATA_ALL)
Default constructor.
void selectionEnvironmentHandle(QString _handle)
Get/Set selection environment handle name.
~HandleAction()
Default destructor.
void addAssociatedType(unsigned int _associatedType)
Get/Set associated primitive types.
void primitiveType(unsigned int _type)
Get/Set primitive type.
~PrimitiveAction()
Default destructor.
FillingLayout(int _numColumns)
Default Constructor.
void selectionEnvironmentHandle(const QString _handle)
Get/Set associated selection environment handle.
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
void selectionModeHandle(QString _handle)
Get/Set selection mode handle name.