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)  

AspectCommentChangeCmd Class Reference

#include <aspectcommands.h>

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

Public Member Functions

 AspectCommentChangeCmd (AbstractAspect::Private *target, const QString &new_comment)
 
virtual void redo ()
 
virtual void undo ()
 

Private Attributes

AbstractAspect::Privated_target
 
QString d_other_comment
 

Detailed Description

Definition at line 56 of file aspectcommands.h.

Constructor & Destructor Documentation

◆ AspectCommentChangeCmd()

AspectCommentChangeCmd::AspectCommentChangeCmd ( AbstractAspect::Private target,
const QString &  new_comment 
)
inline

Definition at line 59 of file aspectcommands.h.

60  : d_target(target), d_other_comment(new_comment) {
61  setText(QObject::tr("%1: change comment").arg(d_target->name()));
62  }

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

Here is the call graph for this function:

Member Function Documentation

◆ redo()

virtual void AspectCommentChangeCmd::redo ( )
inlinevirtual

Definition at line 64 of file aspectcommands.h.

64  {
65  QString tmp = d_target->comment();
67  d_other_comment = tmp;
68  }

References AbstractAspect::Private::comment(), d_other_comment, d_target, and AbstractAspect::Private::setComment().

Referenced by undo().

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

◆ undo()

virtual void AspectCommentChangeCmd::undo ( )
inlinevirtual

Definition at line 70 of file aspectcommands.h.

70 { redo(); }

References redo().

Here is the call graph for this function:

Member Data Documentation

◆ d_other_comment

QString AspectCommentChangeCmd::d_other_comment
private

Definition at line 74 of file aspectcommands.h.

Referenced by redo().

◆ d_target

AbstractAspect::Private* AspectCommentChangeCmd::d_target
private

Definition at line 73 of file aspectcommands.h.

Referenced by AspectCommentChangeCmd(), and redo().


The documentation for this class was generated from the following file:
AbstractAspect::Private::comment
QString comment() const
Definition: AspectPrivate.cpp:134
AspectCommentChangeCmd::d_target
AbstractAspect::Private * d_target
Definition: aspectcommands.h:73
AbstractAspect::Private::setComment
void setComment(const QString &value)
Definition: AspectPrivate.cpp:139
AbstractAspect::Private::name
QString name() const
Definition: AspectPrivate.cpp:122
AspectCommentChangeCmd::redo
virtual void redo()
Definition: aspectcommands.h:64
AspectCommentChangeCmd::d_other_comment
QString d_other_comment
Definition: aspectcommands.h:74