50 #include "ObjectSelectionPlugin.hh"
63 emit scriptInfo(
"selectAllObjects()");
69 for(IdList::iterator it = _list.begin(); it != _list.end(); ++it) {
77 emit scriptInfo(
"selectObjects(IdList)");
89 emit scriptInfo(
"deselectAllObjects()");
98 o_it->target(!o_it->target());
101 emit scriptInfo(
"invertObjectSelection()");
107 if(!OpenFlipper::Options::nogui()) {
108 int ret = QMessageBox::warning(0, tr(
"Open Flipper"),
109 tr(
"Do you really want to delete the selected objects?"),
110 QMessageBox::Yes | QMessageBox::Cancel,
111 QMessageBox::Cancel);
113 if(ret == QMessageBox::Cancel)
return;
116 std::vector<int> deleteIds;
121 deleteIds.push_back(o_it->id());
124 for(std::vector<int>::iterator it = deleteIds.begin(); it != deleteIds.end(); ++it) {
125 emit deleteObject(*it);
128 emit scriptInfo(
"invertObjectSelection()");
138 list.push_back(o_it->id());
const QStringList ALL_OBJECTS
Iterable object range.
void selectObjects(IdList _list)
Select specified objects.
bool getObject(int _identifier, BSplineCurveObject *&_object)
void deselectAllObjects()
Deselect all objects.
const QStringList TARGET_OBJECTS("target")
Iterable object range.
void deleteSelectedObjects()
Delete selected objects.
void invertObjectSelection()
Invert object selection.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
DLLEXPORT ObjectIterator objectsEnd()
Return Iterator to Object End.
IdList getObjectSelection()
Get selected objects.
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
void selectAllObjects()
Select all objects.