scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

AspectChildReparentCmd Class Reference

#include <aspectcommands.h>

Inheritance diagram for AspectChildReparentCmd:
[legend]
Collaboration diagram for AspectChildReparentCmd:
[legend]

Public Member Functions

 AspectChildReparentCmd (AbstractAspect::Private *target, AbstractAspect::Private *new_parent, AbstractAspect *child, int new_index)
 
 ~AspectChildReparentCmd ()
 
virtual void redo ()
 
virtual void undo ()
 

Protected Attributes

AbstractAspect::Privated_target
 
AbstractAspect::Privated_new_parent
 
AbstractAspectd_child
 
int d_index
 
int d_new_index
 

Detailed Description

Definition at line 194 of file aspectcommands.h.

Constructor & Destructor Documentation

◆ AspectChildReparentCmd()

AspectChildReparentCmd::AspectChildReparentCmd ( AbstractAspect::Private target,
AbstractAspect::Private new_parent,
AbstractAspect child,
int  new_index 
)
inline

Definition at line 197 of file aspectcommands.h.

199  : d_target(target), d_new_parent(new_parent), d_child(child), d_index(-1), d_new_index(new_index)
200  {
201  setText(QObject::tr("%1: move %2 to %3.").arg(d_target->name()).arg(d_child->name()).arg(d_new_parent->name()));
202  }

References d_child, d_new_parent, d_target, AbstractAspect::name(), and AbstractAspect::Private::name().

Here is the call graph for this function:

◆ ~AspectChildReparentCmd()

AspectChildReparentCmd::~AspectChildReparentCmd ( )
inline

Definition at line 203 of file aspectcommands.h.

203 {}

Member Function Documentation

◆ redo()

virtual void AspectChildReparentCmd::redo ( )
inlinevirtual

Definition at line 206 of file aspectcommands.h.

References d_child, d_index, d_new_index, d_new_parent, d_target, AbstractAspect::Private::insertChild(), and AbstractAspect::Private::removeChild().

Here is the call graph for this function:

◆ undo()

virtual void AspectChildReparentCmd::undo ( )
inlinevirtual

Definition at line 213 of file aspectcommands.h.

214  {
215  Q_ASSERT(d_index != -1);
218  }

References d_child, d_index, d_new_parent, d_target, AbstractAspect::Private::insertChild(), and AbstractAspect::Private::removeChild().

Here is the call graph for this function:

Member Data Documentation

◆ d_child

AbstractAspect* AspectChildReparentCmd::d_child
protected

Definition at line 223 of file aspectcommands.h.

Referenced by AspectChildReparentCmd(), redo(), and undo().

◆ d_index

int AspectChildReparentCmd::d_index
protected

Definition at line 224 of file aspectcommands.h.

Referenced by redo(), and undo().

◆ d_new_index

int AspectChildReparentCmd::d_new_index
protected

Definition at line 225 of file aspectcommands.h.

Referenced by redo().

◆ d_new_parent

AbstractAspect::Private* AspectChildReparentCmd::d_new_parent
protected

Definition at line 222 of file aspectcommands.h.

Referenced by AspectChildReparentCmd(), redo(), and undo().

◆ d_target

AbstractAspect::Private* AspectChildReparentCmd::d_target
protected

Definition at line 221 of file aspectcommands.h.

Referenced by AspectChildReparentCmd(), redo(), and undo().


The documentation for this class was generated from the following file:
AbstractAspect::Private::removeChild
int removeChild(AbstractAspect *child)
Definition: AspectPrivate.cpp:98
AspectChildReparentCmd::d_new_index
int d_new_index
Definition: aspectcommands.h:225
AbstractAspect::name
QString name() const
Definition: AbstractAspect.cpp:229
AbstractAspect::Private::name
QString name() const
Definition: AspectPrivate.cpp:122
AspectChildReparentCmd::d_target
AbstractAspect::Private * d_target
Definition: aspectcommands.h:221
AspectChildReparentCmd::d_index
int d_index
Definition: aspectcommands.h:224
AbstractAspect::Private::insertChild
void insertChild(int index, AbstractAspect *child)
Definition: AspectPrivate.cpp:61
AspectChildReparentCmd::d_new_parent
AbstractAspect::Private * d_new_parent
Definition: aspectcommands.h:222
AspectChildReparentCmd::d_child
AbstractAspect * d_child
Definition: aspectcommands.h:223