Public Member Functions | Protected Member Functions | Protected Attributes
pcl::cloud_composer::CloudCommand Class Reference

#include <commands.h>

Inheritance diagram for pcl::cloud_composer::CloudCommand:
Inheritance graph
[legend]

List of all members.

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< OutputPairoutput_data_
ProjectModelproject_model_
QMap< QStandardItem
*, QStandardItem * > 
removed_to_parent_map_
int template_type_

Detailed Description

Definition at line 59 of file commands.h.


Constructor & Destructor Documentation

pcl::cloud_composer::CloudCommand::CloudCommand ( ConstItemList  input_data,
QUndoCommand *  parent = 0 
)

Definition at line 6 of file commands.cpp.

Definition at line 15 of file commands.cpp.


Member Function Documentation

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]

Definition at line 83 of file commands.h.

Definition at line 45 of file commands.cpp.

virtual void pcl::cloud_composer::CloudCommand::undo ( ) [pure virtual]

Member Data Documentation

Definition at line 118 of file commands.h.

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.

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.

Definition at line 119 of file commands.h.


The documentation for this class was generated from the following files:


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:43:47