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)  

String2DateTimeFilterSetFormatCmd Class Reference

#include <String2DateTimeFilter.h>

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

Public Member Functions

 String2DateTimeFilterSetFormatCmd (String2DateTimeFilter *target, const QString &new_format)
 
virtual void redo ()
 
virtual void undo ()
 

Private Attributes

String2DateTimeFilterd_target
 
QString d_other_format
 

Detailed Description

Definition at line 118 of file String2DateTimeFilter.h.

Constructor & Destructor Documentation

◆ String2DateTimeFilterSetFormatCmd()

String2DateTimeFilterSetFormatCmd::String2DateTimeFilterSetFormatCmd ( String2DateTimeFilter target,
const QString &  new_format 
)

Definition at line 135 of file String2DateTimeFilter.cpp.

136  : d_target(target), d_other_format(new_format)
137 {
138  if(d_target->parentAspect())
139  setText(QObject::tr("%1: set date-time format to %2").arg(d_target->parentAspect()->name()).arg(new_format));
140  else
141  setText(QObject::tr("set date-time format to %1").arg(new_format));
142 }

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

Here is the call graph for this function:

Member Function Documentation

◆ redo()

void String2DateTimeFilterSetFormatCmd::redo ( )
virtual

Definition at line 144 of file String2DateTimeFilter.cpp.

145 {
146  QString tmp = d_target->d_format;
148  d_other_format = tmp;
149  emit d_target->formatChanged();
150 }

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

Referenced by undo().

Here is the caller graph for this function:

◆ undo()

void String2DateTimeFilterSetFormatCmd::undo ( )
virtual

Definition at line 152 of file String2DateTimeFilter.cpp.

153 {
154  redo();
155 }

References redo().

Here is the call graph for this function:

Member Data Documentation

◆ d_other_format

QString String2DateTimeFilterSetFormatCmd::d_other_format
private

Definition at line 128 of file String2DateTimeFilter.h.

Referenced by redo().

◆ d_target

String2DateTimeFilter* String2DateTimeFilterSetFormatCmd::d_target
private

Definition at line 127 of file String2DateTimeFilter.h.

Referenced by redo(), and String2DateTimeFilterSetFormatCmd().


The documentation for this class was generated from the following files:
String2DateTimeFilterSetFormatCmd::d_other_format
QString d_other_format
Definition: String2DateTimeFilter.h:128
String2DateTimeFilterSetFormatCmd::d_target
String2DateTimeFilter * d_target
Definition: String2DateTimeFilter.h:127
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
String2DateTimeFilterSetFormatCmd::redo
virtual void redo()
Definition: String2DateTimeFilter.cpp:144
String2DateTimeFilter::formatChanged
void formatChanged()
String2DateTimeFilter::d_format
QString d_format
The format string.
Definition: String2DateTimeFilter.h:78