43 #include "ObjectSelectionPlugin.hh" 47 #include <QMessageBox> 58 emit scriptInfo(
"selectAllObjects()");
64 for(IdList::iterator it = _list.begin(); it != _list.end(); ++it) {
72 emit scriptInfo(
"selectObjects(IdList)");
84 emit scriptInfo(
"deselectAllObjects()");
93 o_it->target(!o_it->target());
96 emit scriptInfo(
"invertObjectSelection()");
102 if(!OpenFlipper::Options::nogui()) {
103 int ret = QMessageBox::warning(0, tr(
"Open Flipper"),
104 tr(
"Do you really want to delete the selected objects?"),
105 QMessageBox::Yes | QMessageBox::Cancel,
106 QMessageBox::Cancel);
108 if(ret == QMessageBox::Cancel)
return;
111 std::vector<int> deleteIds;
116 deleteIds.push_back(o_it->id());
119 for(std::vector<int>::iterator it = deleteIds.begin(); it != deleteIds.end(); ++it) {
120 emit deleteObject(*it);
123 emit scriptInfo(
"invertObjectSelection()");
133 list.push_back(o_it->id());
void selectObjects(IdList _list)
Select specified objects.
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
const QStringList ALL_OBJECTS
Iterable object range.
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.
void invertObjectSelection()
Invert object selection.
const QStringList TARGET_OBJECTS("target")
Iterable object range.
void deselectAllObjects()
Deselect all objects.
void selectAllObjects()
Select all objects.
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
void deleteSelectedObjects()
Delete selected objects.