Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
BaseObject.cc
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openflipper.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenFlipper. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41 
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49 
50 
51 
52 
53 //=============================================================================
54 //
55 // MyTypes
56 //
57 //=============================================================================
58 
59 #define BASEOBJECT_C
60 
61 
62 //== INCLUDES =================================================================
63 
64 #include "BaseObjectCore.hh"
65 #include "Types.hh"
66 #include <OpenFlipper/BasePlugin/PluginFunctionsCore.hh>
68 
69 
70 //== TYPEDEFS =================================================================
71 
72 //== Variables =================================================================
73 
74 static ObjectManager objectManager_;
75 
76 //== CLASS DEFINITION =========================================================
77 
81 static int idGenerator = 1;
82 
86 int BaseObject::NOOBJECT = -1;
87 
89  QObject(),
90  id_(idGenerator),
91  persistentId_(_object.persistentId_),
92  objectType_(_object.objectType_),
93  flags_(_object.flags_),
94  visible_(_object.visible_),
95  parentItem_(0),
96  path_("."),
97  filename_(""),
98  commentsByKey_(_object.commentsByKey_)
99 
100 {
101  // Increase id generator as we created a new object
102  ++idGenerator;
103 
104  // Generate a usable name based on the copied object
105  name_ = "Copy of " + _object.name_;
106 
107  childItems_.clear();
108  dataMap_.clear();
109 
110  // Iterate over all per Object datas and try to copy them
111  QMap< QString, PerObjectData* >::const_iterator mapIter = _object.dataMap_.begin();
112  while ( mapIter != _object.dataMap_.end() ) {
113  // Try to get a copy of the object.
114  PerObjectData* copiedData = mapIter.value()->copyPerObjectData();
115 
116  if ( copiedData ) {
117  dataMap_.insert(mapIter.key(),copiedData);
118  } else {
119  std::cerr << "Failed to copy per Object Data: " << mapIter.key().toStdString() << std::endl;
120  }
121 
122  ++mapIter;
123  }
124 
125  // If the pointer is 0 then we are creating the object root
126  // and we do not have anything to attach this object to
127  // otherwise, we attach the new object to the object root
128  if ( PluginFunctions::objectRoot() ) {
129 
132 
133  // New object
135 
136  // If the new one is target, we also have to track this
137  if ( target() )
139  }
140 
141  // Add object to object container
142  PluginFunctions::addObjectToMap( id(), this );
143 
144  objectManager_.objectCreated(id());
145 }
146 
148  QObject() ,
149  id_(-1),
150  persistentId_(-1),
151  objectType_(DATA_UNKNOWN),
152  flags_(),
153  visible_(true),
154  parentItem_(_parent),
155  name_("NONAME")
156 {
157  id_ = idGenerator;
158  ++ idGenerator;
159 
160  // If the pointer is 0 then something went wrong or we are the root node
161  if ( _parent ) {
162 
163  _parent->appendChild(this);
165 
166  } else {
167 
168  if ( PluginFunctions::objectRoot() ) {
172  }
173 
174  }
175 
176  // Add object to object container
177  PluginFunctions::addObjectToMap( id(), this );
178 
179  objectManager_.objectCreated(id());
180 }
181 
182 
183 BaseObject::~BaseObject() {
184 
185  deleteData();
186 
188 
189  if ( target() )
191 
192  objectManager_.objectDeleted(id());
193 
194 }
195 
196 
197 // ===============================================================================
198 // Object Identification
199 // ===============================================================================
200 
201 int BaseObject::id() const {
202  return id_;
203 }
204 
206  return persistentId_;
207 }
208 
209 void BaseObject::persistentId( int _id ) {
210  persistentId_ = _id;
211 }
212 
213 
214 // ===============================================================================
215 // Data
216 // ===============================================================================
217 
219  persistentId_ = -1;
220  path_ = ".";
221  flags_.clear();
222 
223  visible_ = true;
224  name_ = "NONAME";
225  filename_ = "";
226 }
227 
228 // ===============================================================================
229 // Data Type Handling
230 // ===============================================================================
231 
232 bool BaseObject::dataType(DataType _type) const {
233  if ( _type == DATA_ALL ) {
234  return true;
235  }
236 
237  return ( objectType_ & _type);
238 }
239 
242 }
243 
245  if ( objectType_ != DATA_UNKNOWN )
246  std::cerr << "BaseObect : overwriting data type" << std::endl;
247  objectType_ = _type;
248 }
249 
250 // ===============================================================================
251 // Object Information
252 // ===============================================================================
253 
254 
256  QString output;
257 
258  output += "Info for Object with id " + QString::number(id()) +"\n";
259  output += "Object is : ";
260  if ( target() )
261  output += "target ";
262  if ( source() )
263  output += " source";
264 
265  if ( visible() )
266  output += " visible";
267  else
268  output += " invisible";
269 
270  output +="\n";
271 
272  return output;
273 }
274 
276  std::cout << getObjectinfo().toStdString();
277 }
278 
279 
280 // ===============================================================================
281 // flag Handling
282 // ===============================================================================
283 
285  return flag("target");
286 }
287 
288 void BaseObject::target(bool _target) {
289 
290  if ( target() != _target ) {
291 
292  if ( _target )
294  else
296  }
297 
298  setFlag("target", _target);
299 
300 }
301 
303  return flag("source");
304 }
305 
306 void BaseObject::source(bool _source) {
307  setFlag("source", _source);
308 }
309 
310 bool BaseObject::flag(QString _flag)
311 {
312  return flags_.contains(_flag);
313 }
314 
315 void BaseObject::setFlag(QString _flag, bool _set)
316 {
317  bool emitted = false;
318 
319  if (flags_.contains(_flag))
320  {
321  if (!_set) {
322  flags_.removeAll(_flag);
323  emit objectSelectionChanged(id());
324  emitted = true;
325  }
326  }
327  else
328  {
329  if (_set) {
330  flags_ << _flag;
331  emit objectSelectionChanged(id());
332  emitted = true;
333  }
334  }
335 
336  //always emit if its a group
337  if ( !emitted && isGroup() )
338  emit objectSelectionChanged(id());
339 }
340 
341 QStringList BaseObject::flags()
342 {
343  return flags_;
344 }
345 
346 // ===============================================================================
347 // Object visualization
348 // ===============================================================================
349 
351  return visible_;
352 }
353 
354 void BaseObject::visible(bool _visible) {
355  // Only do something if this is really a change
356  if ( visible_ != _visible ) {
357  visible_ = _visible;
358 
359  emit visibilityChanged( id() );
360 
361  } else {
362 
363  //always emit if its a group
364  if ( isGroup() )
365  emit visibilityChanged( id() );
366  }
367 }
368 
369 // ===============================================================================
370 // ===============================================================================
371 // Tree Structure :
372 // ===============================================================================
373 // ===============================================================================
374 
376  //indexOf
377 
378 // // Visit child item of this node
379 // if ( childItems_.size() > 0 ) {
380 // return childItems_[0];
381 // }
382 //
383 // // No Child Item so visit the next child of the parentItem_
384 // if ( parentItem_ ) {
385 //
386 // BaseObject* parentPointer = parentItem_;
387 // BaseObject* thisPointer = this;
388 //
389 // // while we are not at the root node
390 // while ( parentPointer ) {
391 //
392 // // If there is an unvisited child of the parent, return this one
393 // if ( parentPointer->childCount() > ( thisPointer->row() + 1) ) {
394 // return parentPointer->childItems_[ thisPointer->row() + 1 ];
395 // }
396 //
397 // // Go to the next level
398 // thisPointer = parentPointer;
399 // parentPointer = parentPointer->parentItem_;
400 //
401 // }
402 //
403 // return thisPointer;
404 // }
405 //
406 // return this;
407  std::cerr << "Last not implemented yet! " << std::endl;
408  return 0;
409 
410 }
411 
412 // ===============================================================================
413 // ===============================================================================
414 
416  // Visit child item of this node
417  if ( childItems_.size() > 0 ) {
418  return childItems_[0];
419  }
420 
421  // No Child Item so visit the next child of the parentItem_
422  if ( parentItem_ ) {
423 
424  BaseObject* parentPointer = parentItem_;
425  BaseObject* thisPointer = this;
426 
427  // while we are not at the root node
428  while ( parentPointer ) {
429 
430  // If there is an unvisited child of the parent, return this one
431  int nextIndex = ( thisPointer->row() + 1);
432  if ( parentPointer->childCount() > nextIndex ) {
433  return parentPointer->childItems_[ nextIndex ];
434  }
435 
436  // Go to the next level
437  thisPointer = parentPointer;
438  parentPointer = parentPointer->parentItem_;
439 
440  }
441 
442  return thisPointer;
443  }
444 
445  return this;
446 
447 }
448 
449 // ===============================================================================
450 // ===============================================================================
451 
453  int level = 0;
454  BaseObject* current = this;
455 
456  // Go up and count the levels to the root node
457  while ( current->parent() != 0 ) {
458  level++;
459  current = current->parent();
460  }
461 
462  return level;
463 }
464 
465 // ===============================================================================
466 // Parent
467 // ===============================================================================
468 
469 int BaseObject::row() const
470 {
471  if (parentItem_)
472  return parentItem_->childItems_.indexOf(const_cast<BaseObject*>(this));
473 
474  return 0;
475 }
476 
478 {
479  return parentItem_;
480 }
481 
483 {
484  return parentItem_;
485 }
486 
489  // remove this child from the old parents list
490  if ( parentItem_ != 0 ) {
491  parentItem_->removeChild(this);
492 
493  if ( !_parent->childItems_.contains(this) )
494  _parent->appendChild(this);
495  }
496 
497  // Store new parent
498  parentItem_ = _parent;
499 
500  // Tell other plugins about this change
501  emit objectPropertiesChanged(id());
502 }
503 
504 
505 // ===============================================================================
506 // Children
507 // ===============================================================================
508 
510 {
511  if ( !childItems_.contains(item) )
512  childItems_.append(item);
513  else
514  std::cerr << "Warning! Trying to append a child twice! Remove the append calls from your File plugin!" << std::endl;
515 }
516 
518 {
519  return childItems_.value(row);
520 }
521 
523 {
524  return childItems_.count();
525 }
526 
528 
529  // Check if this object has the requested id
530  if ( id_ == _objectId )
531  return this;
532 
533  // search in children
534  for ( int i = 0 ; i < childItems_.size(); ++i ) {
535  BaseObject* tmp = childItems_[i]->childExists(_objectId);
536  if ( tmp != 0)
537  return tmp;
538  }
539 
540  return 0;
541 }
542 
544 
545  // Check if this object has the requested id
546  if ( name() == _name )
547  return this;
548 
549  // search in children
550  for ( int i = 0 ; i < childItems_.size(); ++i ) {
551  BaseObject* tmp = childItems_[i]->childExists(_name);
552  if ( tmp != 0)
553  return tmp;
554  }
555 
556  return 0;
557 }
558 
560 
561  bool found = false;
562  QList<BaseObject*>::iterator i;
563  for (i = childItems_.begin(); i != childItems_.end(); ++i) {
564  if ( *i == _item ) {
565  found = true;
566  break;
567  }
568  }
569 
570  if ( !found ) {
571  std::cerr << "Illegal remove request" << std::endl;
572  return;
573  }
574 
575  childItems_.erase(i);
576 }
577 
578 QList< BaseObject* > BaseObject::getLeafs() {
579 
580  QList< BaseObject* > items;
581 
582  for ( int i = 0 ; i < childItems_.size(); ++i ) {
583  items = items + childItems_[i]->getLeafs();
584  }
585 
586  // If we are a leave...
587  if ( childCount() == 0 )
588  items.push_back(this);
589 
590  return items;
591 }
592 
594 
595  // call function for all children of this node
596  for ( int i = 0 ; i < childItems_.size(); ++i) {
597 
598  // remove the subtree recursively
599  childItems_[i]->deleteSubtree();
600 
601  // delete child
602  delete childItems_[i];
603  }
604 
605  // clear the array
606  childItems_.clear();
607 }
608 
609 // ===============================================================================
610 // Grouping
611 // ===============================================================================
612 int BaseObject::group() const {
613  // Skip root node
614  if ( parent() == 0 )
615  return -1;
616 
617  // Dont count root node as a group
618  if ( parent()->parent() == 0 )
619  return -1;
620 
621  // Only consider groups
622  if ( !parent()->dataType(DATA_GROUP) )
623  return -1;
624 
625  // Get the group id
626  return ( parent()->id() );
627 
628 }
629 
630 bool BaseObject::isGroup() const {
631 // return ( (childItems_.size() > 0) || dataType(DATA_GROUP) ) ;
632  return ( dataType(DATA_GROUP) ) ;
633 };
634 
635 
636 bool BaseObject::isInGroup( int _id ) const {
637  const BaseObject* current = this;
638 
639  // Go up and check for the group id
640  do {
641 
642  // Check if we found the id
643  if ( current->id() == _id )
644  return true;
645 
646  // Move on to parent object
647  current = current->parent();
648  } while ( current != 0 );
649 
650  return false;
651 }
652 
653 bool BaseObject::isInGroup( QString _name ) const {
654  const BaseObject* current = this;
655 
656  // Go up and check for the group name
657  do {
658 
659  // Check if this object is a group and if it has the serach name
660  if ( current->dataType( DATA_GROUP ) && (current->name() == _name) )
661  return true;
662 
663  // Move on to parent object
664  current = current->parent();
665 
666  } while ( current != 0 );
667 
668  return false;
669 }
670 
671 std::vector< int > BaseObject::getGroupIds() {
672  std::vector< int > groups;
673 
674  BaseObject* current = this;
675 
676  // Go up and collect all groups in the given order
677  do {
678 
679  // collect only groups
680  if ( current->dataType( DATA_GROUP ) )
681  // Skip the root Object
682  if ( current->parent() != 0 )
683  groups.push_back( current->id() );
684 
685  // Move on to parent object
686  current = current->parent();
687  } while ( current != 0 );
688 
689  return groups;
690 }
691 
693  QStringList groups;
694 
695  BaseObject* current = this;
696 
697  // Go up and collect all groups in the given order
698  do {
699 
700  // collect only groups
701  if ( current->dataType( DATA_GROUP ) )
702  // Skip the root Object
703  if ( current->parent() != 0 )
704  groups.push_back( current->name() );
705 
706  // Move on to parent object
707  current = current->parent();
708  } while ( current != 0 );
709 
710  return groups;
711 }
712 
713 // ===============================================================================
714 // Name and path Handling
715 // ===============================================================================
716 
717 QString BaseObject::filename() const
718 {
719  return filename_;
720 }
721 
722 void BaseObject::setFileName(const QString &_filename)
723 {
724  filename_ = _filename;
725 }
726 
727 void BaseObject::setFromFileName(const QString &_filename ) {
728  QFileInfo file_info(_filename);
729  setPath(file_info.path());
730  QString filename = file_info.fileName();
731  setFileName(filename);
732 }
733 
734 void BaseObject::setName(QString _name ) {
735  name_ = _name;
736 
737  // Tell plugins about the name change
738  emit objectPropertiesChanged(id());
739 }
740 
741 QString BaseObject::name() const {
742  return name_;
743 }
744 
745 QString BaseObject::path() const {
746  return path_;
747 }
748 
749 void BaseObject::setPath(const QString &_path ) {
750  path_ = _path;
751 }
752 
753 // ===============================================================================
754 // Content
755 // ===============================================================================
757 }
758 
760 
761  // Add spaces to visualize level
762  for ( int i = 0 ; i < level() ; ++i )
763  std::cerr << " ";
764 
765  std::cerr << "Node ";
766  std::cerr << std::string(name().toLatin1());
767 
768  std::cerr << " with id : ";
769  std::cerr << id();
770 
771  // Write the type of this Object
772  std::cerr << " and type " << typeName(dataType()).toStdString() << std::endl;
773 
774  // call function for all children of this node
775  for ( int i = 0 ; i < childItems_.size(); ++i)
776  childItems_[i]->dumpTree();
777 
778 }
779 
781  std::cerr << "Copy not supported by this Object" << std::endl;
782  return 0;
783 }
784 
785 
786 // ===============================================================================
787 // per Object data functions
788 // ===============================================================================
789 
790 void
792 setObjectData( QString _dataName , PerObjectData* _data ) {
793  dataMap_.insert( _dataName, _data );
794 }
795 
796 void
798 clearObjectData( QString _dataName ) {
799  if (dataMap_.contains(_dataName))
800  dataMap_.remove(_dataName);
801 }
802 
803 
804 bool
806 hasObjectData( QString _dataName )
807 {
808  return dataMap_.contains(_dataName);
809 }
810 
811 
814 objectData( QString _dataName ) {
815  if (dataMap_.contains(_dataName))
816  return dataMap_.value(_dataName);
817  else
818  return 0;
819 }
820 
821 void
824 
825  QMapIterator<QString, PerObjectData* > i(dataMap_);
826  while (i.hasNext()) {
827  i.next();
828  delete i.value();
829  }
830 
831  dataMap_.clear();
832 
833 }
834 
835 QMap<QString, PerObjectData*>& BaseObject::getPerObjectDataMap() {
836  return dataMap_;
837 }
838 
839 
840 ObjectManager::ObjectManager() {
841 }
842 
843 ObjectManager::~ObjectManager() {
844 
845 }
846 
847 void ObjectManager::objectCreated(int _objectId)
848 {
849  emit newObject(_objectId);
850 }
851 
852 void ObjectManager::objectDeleted(int _objectId)
853 {
854  // Remove deleted object from object container
856 
857  emit deletedObject(_objectId);
858 }
859 
860 
861 ObjectManager* getObjectManager() {
862  return &objectManager_;
863 }
864 
865 
866 
867 
868 //=============================================================================
void decreaseObjectCount()
Increase the number of current Object.
int row() const
get the row of this item from the parent
Definition: BaseObject.cc:469
QMap< QString, PerObjectData * > & getPerObjectDataMap()
get reference to map of all perObject Datas
Definition: BaseObject.cc:835
void deleteSubtree()
delete the whole subtree below this item ( The item itself is not touched )
Definition: BaseObject.cc:593
QString path_
path to the file from which the object is loaded ( defaults to "." )
Definition: BaseObject.hh:478
BaseObject * parent()
Get the parent item ( 0 if rootitem )
Definition: BaseObject.cc:477
QStringList flags()
Definition: BaseObject.cc:341
void appendChild(BaseObject *child)
add a child to this node
Definition: BaseObject.cc:509
PerObjectData * objectData(QString _dataName)
Returns the object data pointer.
Definition: BaseObject.cc:814
virtual QString getObjectinfo()
Get all Info for the Object as a string.
Definition: BaseObject.cc:255
QMap< QString, PerObjectData * > dataMap_
get reference to map of all perObject Datas
Definition: BaseObject.hh:541
QString name() const
return the name of the object. The name defaults to NONAME if unset.
Definition: BaseObject.cc:741
bool visible_
Definition: BaseObject.hh:286
const DataType DATA_UNKNOWN(0)
None of the other Objects.
QString filename() const
return the filename of the object
Definition: BaseObject.cc:717
void deleteData()
Delete all data attached to this object ( calls delete on each object )
Definition: BaseObject.cc:823
Update type class.
Definition: UpdateType.hh:70
virtual void update(UpdateType _type=UPDATE_ALL)
This function is called to update the object.
Definition: BaseObject.cc:756
BaseObject * next()
Definition: BaseObject.cc:415
const DataType DATA_GROUP(1)
Items used for Grouping.
QString path() const
return the path to the object ( defaults to "." if unset )
Definition: BaseObject.cc:745
void setFileName(const QString &_filename)
set the filename for this object
Definition: BaseObject.cc:722
void setFromFileName(const QString &_filename)
Definition: BaseObject.cc:727
virtual bool visible()
return if object is visible
Definition: BaseObject.cc:350
int persistentId() const
Definition: BaseObject.cc:205
void decreaseTargetCount()
Increase the number of current Object.
bool isInGroup(int _id) const
Definition: BaseObject.cc:636
DataType dataType() const
Definition: BaseObject.cc:240
bool isGroup() const
Check if object is a group.
Definition: BaseObject.cc:630
QList< BaseObject * > childItems_
Children of this node.
Definition: BaseObject.hh:347
virtual void printObjectInfo()
Print all information about the object.
Definition: BaseObject.cc:275
DLLEXPORT QString typeName(DataType _id)
Get the name of a type with given id.
Definition: Types.cc:165
bool dataType(DataType _type) const
Definition: BaseObject.cc:232
bool source()
Definition: BaseObject.cc:302
void increaseTargetCount()
Decrease the number of current Object.
DataType objectType_
Definition: BaseObject.hh:179
bool flag(QString _flag)
Definition: BaseObject.cc:310
void addObjectToMap(int _objectId, BaseObject *_object)
Add object to internal object map.
virtual PerObjectData * copyPerObjectData()
Copy Function.
virtual void cleanup()
Definition: BaseObject.cc:218
bool hasObjectData(QString _dataName)
Checks if object data with given name is available.
Definition: BaseObject.cc:806
void setObjectData(QString _dataName, PerObjectData *_data)
Definition: BaseObject.cc:792
void removeChild(BaseObject *_item)
Remove a child from this object.
Definition: BaseObject.cc:559
QString filename_
path to the file from which the object is loaded ( defaults to "." )
Definition: BaseObject.hh:479
void setParent(BaseObject *_parent)
Set the parent pointer.
Definition: BaseObject.cc:488
void increaseObjectCount()
Decrease the number of current Object.
BaseObject * childExists(int _objectId)
Check if the element exists in the subtree of this element.
Definition: BaseObject.cc:527
void setPath(const QString &_path)
set the path to the object.
Definition: BaseObject.cc:749
BaseObject *& objectRoot()
Get the root of the object structure.
static int NOOBJECT
Definition: BaseObject.hh:118
QStringList flags_
Definition: BaseObject.hh:255
std::vector< int > getGroupIds()
Definition: BaseObject.cc:671
void clearObjectData(QString _dataName)
Clear the object data pointer ( this will not delete the object!! )
Definition: BaseObject.cc:798
QList< BaseObject * > getLeafs()
get all leafes of the tree below this object ( These will be all visible objects ) ...
Definition: BaseObject.cc:578
void setDataType(DataType _type)
Definition: BaseObject.cc:244
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
QString name_
Object/FileName ( defaults to NONAME )
Definition: BaseObject.hh:490
BaseObject(const BaseObject &_object)
Definition: BaseObject.cc:88
int group() const
Definition: BaseObject.cc:612
void objectSelectionChanged(int _objectId)
void setFlag(QString _flag, bool _set)
Definition: BaseObject.cc:315
void visibilityChanged(int _objectId)
BaseObject * last()
Definition: BaseObject.cc:375
int childCount() const
get the number of children
Definition: BaseObject.cc:522
int persistentId_
Persistent ID for this Object.
Definition: BaseObject.hh:153
virtual BaseObject * copy()
Returns a full copy of the object.
Definition: BaseObject.cc:780
Predefined datatypes.
Definition: DataTypes.hh:96
int id_
Unique ID for this Object.
Definition: BaseObject.hh:146
virtual void setName(QString _name)
path to the file from which the object is loaded ( defaults to "." )
Definition: BaseObject.cc:734
int level()
Definition: BaseObject.cc:452
BaseObject * child(int row)
return a child
Definition: BaseObject.cc:517
Object Payload.
bool target()
Definition: BaseObject.cc:284
void removeObjectFromMap(int _objectId)
Remove object from internal object map.
QStringList getGroupNames()
Definition: BaseObject.cc:692
void dumpTree()
Debugging function, writing the subtree to output.
Definition: BaseObject.cc:759
void objectPropertiesChanged(int _objectId)
BaseObject * parentItem_
Parent item or 0 if rootnode.
Definition: BaseObject.hh:344
int id() const
Definition: BaseObject.cc:201