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)  

AspectNameChangeCmd Class Reference

#include <aspectcommands.h>

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

Public Member Functions

 AspectNameChangeCmd (AbstractAspect::Private *target, const QString &new_name)
 
virtual void redo ()
 
virtual void undo ()
 

Private Attributes

AbstractAspect::Privated_target
 
QString d_other_name
 

Detailed Description

File : aspectcommands.h

Project : SciDAVis

Copyright : (C) 2007-2009 by Knut Franke, Tilman Benkert Email (use @ for *) : knut.franke*gmx.de, thzs*gmx.net Description : Undo commands used by AbstractAspect. Only meant to be used within AbstractAspect.cpp

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
    • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
    • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 35 of file aspectcommands.h.

Constructor & Destructor Documentation

◆ AspectNameChangeCmd()

AspectNameChangeCmd::AspectNameChangeCmd ( AbstractAspect::Private target,
const QString &  new_name 
)
inline

Definition at line 38 of file aspectcommands.h.

39  : d_target(target), d_other_name(new_name) {
40  setText(QObject::tr("%1: rename to %2").arg(d_target->name()).arg(new_name));
41  }

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

Here is the call graph for this function:

Member Function Documentation

◆ redo()

virtual void AspectNameChangeCmd::redo ( )
inlinevirtual

Definition at line 43 of file aspectcommands.h.

43  {
44  QString tmp = d_target->name();
46  d_other_name = tmp;
47  }

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

Referenced by undo().

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

◆ undo()

virtual void AspectNameChangeCmd::undo ( )
inlinevirtual

Definition at line 49 of file aspectcommands.h.

49 { redo(); }

References redo().

Here is the call graph for this function:

Member Data Documentation

◆ d_other_name

QString AspectNameChangeCmd::d_other_name
private

Definition at line 53 of file aspectcommands.h.

Referenced by redo().

◆ d_target

AbstractAspect::Private* AspectNameChangeCmd::d_target
private

Definition at line 52 of file aspectcommands.h.

Referenced by AspectNameChangeCmd(), and redo().


The documentation for this class was generated from the following file:
AspectNameChangeCmd::d_target
AbstractAspect::Private * d_target
Definition: aspectcommands.h:52
AspectNameChangeCmd::d_other_name
QString d_other_name
Definition: aspectcommands.h:53
AspectNameChangeCmd::redo
virtual void redo()
Definition: aspectcommands.h:43
AbstractAspect::Private::name
QString name() const
Definition: AspectPrivate.cpp:122
AbstractAspect::Private::setName
void setName(const QString &value)
Definition: AspectPrivate.cpp:127