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)  

Double2StringFilterSetFormatCmd Class Reference

#include <Double2StringFilter.h>

Inheritance diagram for Double2StringFilterSetFormatCmd:
Collaboration diagram for Double2StringFilterSetFormatCmd:

Public Member Functions

 Double2StringFilterSetFormatCmd (Double2StringFilter *target, char new_format)
virtual void redo ()
virtual void undo ()

Private Attributes

char d_other_format

Detailed Description

Definition at line 90 of file Double2StringFilter.h.

Constructor & Destructor Documentation

◆ Double2StringFilterSetFormatCmd()

Double2StringFilterSetFormatCmd::Double2StringFilterSetFormatCmd ( Double2StringFilter target,
char  new_format 

Definition at line 74 of file Double2StringFilter.cpp.

75  : d_target(target), d_other_format(new_format)
76 {
77  if(d_target->parentAspect())
78  setText(QObject::tr("%1: set numeric format to '%2'").arg(d_target->parentAspect()->name()).arg(new_format));
79  else
80  setText(QObject::tr("set numeric format to '%1'").arg(new_format));
81 }

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

Here is the call graph for this function:

Member Function Documentation

◆ redo()

void Double2StringFilterSetFormatCmd::redo ( )

Definition at line 83 of file Double2StringFilter.cpp.

84 {
85  char tmp = d_target->d_format;
87  d_other_format = tmp;
88  emit d_target->formatChanged();
89 }

References Double2StringFilter::d_format, d_other_format, d_target, and Double2StringFilter::formatChanged().

Referenced by undo().

Here is the caller graph for this function:

◆ undo()

void Double2StringFilterSetFormatCmd::undo ( )

Definition at line 91 of file Double2StringFilter.cpp.

92 {
93  redo();
94 }

References redo().

Here is the call graph for this function:

Member Data Documentation

◆ d_other_format

char Double2StringFilterSetFormatCmd::d_other_format

Definition at line 100 of file Double2StringFilter.h.

Referenced by redo().

◆ d_target

Double2StringFilter* Double2StringFilterSetFormatCmd::d_target

Definition at line 99 of file Double2StringFilter.h.

Referenced by Double2StringFilterSetFormatCmd(), and redo().

The documentation for this class was generated from the following files:
char d_format
Format character as in QString::number.
Definition: Double2StringFilter.h:64
char d_other_format
Definition: Double2StringFilter.h:100
Double2StringFilter * d_target
Definition: Double2StringFilter.h:99
void formatChanged()
virtual void redo()
Definition: Double2StringFilter.cpp:83
QString name() const
Definition: AbstractAspect.cpp:229
AbstractAspect * parentAspect() const
Return my parent Aspect or 0 if I currently don't have one.
Definition: AbstractAspect.cpp:109