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)  

AspectCreationTimeChangeCmd Class Reference

#include <aspectcommands.h>

Inheritance diagram for AspectCreationTimeChangeCmd:
Collaboration diagram for AspectCreationTimeChangeCmd:

Public Member Functions

 AspectCreationTimeChangeCmd (AbstractAspect::Private *target, const QDateTime &new_creation_time)
virtual void redo ()
virtual void undo ()

Private Attributes

QDateTime d_other_creation_time

Detailed Description

Definition at line 99 of file aspectcommands.h.

Constructor & Destructor Documentation

◆ AspectCreationTimeChangeCmd()

AspectCreationTimeChangeCmd::AspectCreationTimeChangeCmd ( AbstractAspect::Private target,
const QDateTime &  new_creation_time 

Definition at line 102 of file aspectcommands.h.

103  : d_target(target), d_other_creation_time(new_creation_time) {
104  setText(QObject::tr("%1: set creation time").arg(d_target->name()));
105  }

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

Here is the call graph for this function:

Member Function Documentation

◆ redo()

virtual void AspectCreationTimeChangeCmd::redo ( )

Definition at line 107 of file aspectcommands.h.

107  {
108  QDateTime tmp = d_target->creationTime();
110  d_other_creation_time = tmp;
111  }

References AbstractAspect::Private::creationTime(), d_other_creation_time, d_target, and AbstractAspect::Private::setCreationTime().

Referenced by undo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ undo()

virtual void AspectCreationTimeChangeCmd::undo ( )

Definition at line 113 of file aspectcommands.h.

113 { redo(); }

References redo().

Here is the call graph for this function:

Member Data Documentation

◆ d_other_creation_time

QDateTime AspectCreationTimeChangeCmd::d_other_creation_time

Definition at line 117 of file aspectcommands.h.

Referenced by redo().

◆ d_target

AbstractAspect::Private* AspectCreationTimeChangeCmd::d_target

Definition at line 116 of file aspectcommands.h.

Referenced by AspectCreationTimeChangeCmd(), and redo().

The documentation for this class was generated from the following file:
QDateTime d_other_creation_time
Definition: aspectcommands.h:117
AbstractAspect::Private * d_target
Definition: aspectcommands.h:116
QString name() const
Definition: AspectPrivate.cpp:122
QDateTime creationTime() const
Definition: AspectPrivate.cpp:196
virtual void redo()
Definition: aspectcommands.h:107
void setCreationTime(const QDateTime &time)
Definition: AspectPrivate.cpp:158