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:
Collaboration diagram for AspectCommentChangeCmd:

Public Member Functions

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

Private Attributes

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 

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

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

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

Definition at line 74 of file aspectcommands.h.

Referenced by redo().

◆ d_target

AbstractAspect::Private* AspectCommentChangeCmd::d_target

Definition at line 73 of file aspectcommands.h.

Referenced by AspectCommentChangeCmd(), and redo().

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