#include <commands.h>
Public Member Functions | |
CloudCommand (ConstItemList input_data, QUndoCommand *parent=0) | |
virtual void | redo ()=0 |
virtual bool | runCommand (AbstractTool *tool)=0 |
void | setInputData (ConstItemList input_data) |
void | setProjectModel (ProjectModel *model) |
virtual void | undo ()=0 |
virtual | ~CloudCommand () |
Protected Member Functions | |
bool | canUseTemplates (ConstItemList &input_data) |
This is used to check if a templated version of a tool can be used For this to return true, all items must be clouds, and must have the same template type. | |
bool | replaceOriginalWithNew (QList< const CloudComposerItem * > originals, QList< CloudComposerItem * > new_items) |
Removes the original item(s) from the model and replaces with the replacement(s) Replacements are only inserted once, original items must have same parent This stores the removed items in removed_items_. | |
bool | restoreOriginalRemoveNew (QList< const CloudComposerItem * > originals, QList< CloudComposerItem * > new_items) |
This removes new_items from the model and restores originals. | |
Protected Attributes | |
bool | can_use_templates_ |
bool | last_was_undo_ |
This determines if we delete original items or not on destruction If the command is being deleted because stack is at limit, then we want to only delete the originals, since the command is staying for good (new items shouldn't be deleted) On the other hand, if we destruct after an undo, then we want to delete the new items (but not the originals) | |
ConstItemList | original_data_ |
QList< OutputPair > | output_data_ |
ProjectModel * | project_model_ |
QMap< QStandardItem *, QStandardItem * > | removed_to_parent_map_ |
int | template_type_ |
Definition at line 59 of file commands.h.
pcl::cloud_composer::CloudCommand::CloudCommand | ( | ConstItemList | input_data, |
QUndoCommand * | parent = 0 |
||
) |
Definition at line 6 of file commands.cpp.
pcl::cloud_composer::CloudCommand::~CloudCommand | ( | ) | [virtual] |
Definition at line 15 of file commands.cpp.
bool pcl::cloud_composer::CloudCommand::canUseTemplates | ( | ConstItemList & | input_data | ) | [protected] |
This is used to check if a templated version of a tool can be used For this to return true, all items must be clouds, and must have the same template type.
Definition at line 51 of file commands.cpp.
virtual void pcl::cloud_composer::CloudCommand::redo | ( | ) | [pure virtual] |
bool pcl::cloud_composer::CloudCommand::replaceOriginalWithNew | ( | QList< const CloudComposerItem * > | originals, |
QList< CloudComposerItem * > | new_items | ||
) | [protected] |
Removes the original item(s) from the model and replaces with the replacement(s) Replacements are only inserted once, original items must have same parent This stores the removed items in removed_items_.
Definition at line 118 of file commands.cpp.
bool pcl::cloud_composer::CloudCommand::restoreOriginalRemoveNew | ( | QList< const CloudComposerItem * > | originals, |
QList< CloudComposerItem * > | new_items | ||
) | [protected] |
This removes new_items from the model and restores originals.
Definition at line 164 of file commands.cpp.
virtual bool pcl::cloud_composer::CloudCommand::runCommand | ( | AbstractTool * | tool | ) | [pure virtual] |
void pcl::cloud_composer::CloudCommand::setInputData | ( | ConstItemList | input_data | ) | [inline] |
Definition at line 83 of file commands.h.
void pcl::cloud_composer::CloudCommand::setProjectModel | ( | ProjectModel * | model | ) |
Definition at line 45 of file commands.cpp.
virtual void pcl::cloud_composer::CloudCommand::undo | ( | ) | [pure virtual] |
bool pcl::cloud_composer::CloudCommand::can_use_templates_ [protected] |
Definition at line 118 of file commands.h.
bool pcl::cloud_composer::CloudCommand::last_was_undo_ [protected] |
This determines if we delete original items or not on destruction If the command is being deleted because stack is at limit, then we want to only delete the originals, since the command is staying for good (new items shouldn't be deleted) On the other hand, if we destruct after an undo, then we want to delete the new items (but not the originals)
Definition at line 110 of file commands.h.
Definition at line 99 of file commands.h.
QList<OutputPair> pcl::cloud_composer::CloudCommand::output_data_ [protected] |
Definition at line 102 of file commands.h.
Definition at line 103 of file commands.h.
QMap<QStandardItem*, QStandardItem*> pcl::cloud_composer::CloudCommand::removed_to_parent_map_ [protected] |
Definition at line 101 of file commands.h.
int pcl::cloud_composer::CloudCommand::template_type_ [protected] |
Definition at line 119 of file commands.h.