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:
[legend]
Collaboration diagram for AspectCreationTimeChangeCmd:
[legend]

Public Member Functions

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

Private Attributes

AbstractAspect::Privated_target
 
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 
)
inline

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 ( )
inlinevirtual

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 ( )
inlinevirtual

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
private

Definition at line 117 of file aspectcommands.h.

Referenced by redo().

◆ d_target

AbstractAspect::Private* AspectCreationTimeChangeCmd::d_target
private

Definition at line 116 of file aspectcommands.h.

Referenced by AspectCreationTimeChangeCmd(), and redo().


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