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)  

Double2StringFilterSetDigitsCmd Class Reference

#include <Double2StringFilter.h>

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

Public Member Functions

 Double2StringFilterSetDigitsCmd (Double2StringFilter *target, int new_digits)
 
virtual void redo ()
 
virtual void undo ()
 

Private Attributes

Double2StringFilterd_target
 
int d_other_digits
 

Detailed Description

Definition at line 103 of file Double2StringFilter.h.

Constructor & Destructor Documentation

◆ Double2StringFilterSetDigitsCmd()

Double2StringFilterSetDigitsCmd::Double2StringFilterSetDigitsCmd ( Double2StringFilter target,
int  new_digits 
)

Definition at line 96 of file Double2StringFilter.cpp.

97  : d_target(target), d_other_digits(new_digits)
98 {
99  if(d_target->parentAspect())
100  setText(QObject::tr("%1: set decimal digits to %2").arg(d_target->parentAspect()->name()).arg(new_digits));
101  else
102  setText(QObject::tr("set decimal digits to %1").arg(new_digits));
103 }

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

Here is the call graph for this function:

Member Function Documentation

◆ redo()

void Double2StringFilterSetDigitsCmd::redo ( )
virtual

Definition at line 105 of file Double2StringFilter.cpp.

106 {
107  int tmp = d_target->d_digits;
109  d_other_digits = tmp;
110  emit d_target->formatChanged();
111 }

References Double2StringFilter::d_digits, d_other_digits, d_target, and Double2StringFilter::formatChanged().

Referenced by undo().

Here is the caller graph for this function:

◆ undo()

void Double2StringFilterSetDigitsCmd::undo ( )
virtual

Definition at line 113 of file Double2StringFilter.cpp.

114 {
115  redo();
116 }

References redo().

Here is the call graph for this function:

Member Data Documentation

◆ d_other_digits

int Double2StringFilterSetDigitsCmd::d_other_digits
private

Definition at line 113 of file Double2StringFilter.h.

Referenced by redo().

◆ d_target

Double2StringFilter* Double2StringFilterSetDigitsCmd::d_target
private

Definition at line 112 of file Double2StringFilter.h.

Referenced by Double2StringFilterSetDigitsCmd(), and redo().


The documentation for this class was generated from the following files:
Double2StringFilterSetDigitsCmd::d_target
Double2StringFilter * d_target
Definition: Double2StringFilter.h:112
Double2StringFilter::formatChanged
void formatChanged()
Double2StringFilterSetDigitsCmd::redo
virtual void redo()
Definition: Double2StringFilter.cpp:105
AbstractAspect::name
QString name() const
Definition: AbstractAspect.cpp:229
AbstractAspect::parentAspect
AbstractAspect * parentAspect() const
Return my parent Aspect or 0 if I currently don't have one.
Definition: AbstractAspect.cpp:109
Double2StringFilterSetDigitsCmd::d_other_digits
int d_other_digits
Definition: Double2StringFilter.h:113
Double2StringFilter::d_digits
int d_digits
Display digits or precision as in QString::number
Definition: Double2StringFilter.h:66