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)  

TableMoveColumnCmd Class Reference

Move a column. More...

#include <tablecommands.h>

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

Public Member Functions

 TableMoveColumnCmd (future::Table::Private &private_obj, int from, int to, QUndoCommand *parent=0)
 
void redo () override
 
void undo () override
 

Private Attributes

future::Table::Privated_private_obj
 The private object to modify. More...
 
int d_from
 The old column index. More...
 
int d_to
 The new column index. More...
 

Detailed Description

Move a column.

Definition at line 130 of file tablecommands.h.

Constructor & Destructor Documentation

◆ TableMoveColumnCmd()

TableMoveColumnCmd::TableMoveColumnCmd ( future::Table::Private private_obj,
int  from,
int  to,
QUndoCommand *  parent = 0 
)

Definition at line 113 of file tablecommands.cpp.

114  : QUndoCommand( parent ), d_private_obj(private_obj), d_from(from), d_to(to)
115 {
116  setText(QObject::tr("%1: move column %2 from position %3 to %4")
117  .arg(d_private_obj.name())
118  .arg(d_private_obj.column(from)->name())
119  .arg(d_from+1).arg(d_to+1));
120 }

References future::Table::Private::column(), d_from, d_private_obj, d_to, AbstractAspect::name(), and future::Table::Private::name().

Here is the call graph for this function:

Member Function Documentation

◆ redo()

void TableMoveColumnCmd::redo ( )
override

Definition at line 122 of file tablecommands.cpp.

123 {
125 }

References d_from, d_private_obj, d_to, and future::Table::Private::moveColumn().

Here is the call graph for this function:

◆ undo()

void TableMoveColumnCmd::undo ( )
override

Definition at line 127 of file tablecommands.cpp.

128 {
130 }

References d_from, d_private_obj, d_to, and future::Table::Private::moveColumn().

Here is the call graph for this function:

Member Data Documentation

◆ d_from

int TableMoveColumnCmd::d_from
private

The old column index.

Definition at line 142 of file tablecommands.h.

Referenced by redo(), TableMoveColumnCmd(), and undo().

◆ d_private_obj

future::Table::Private& TableMoveColumnCmd::d_private_obj
private

The private object to modify.

Definition at line 140 of file tablecommands.h.

Referenced by redo(), TableMoveColumnCmd(), and undo().

◆ d_to

int TableMoveColumnCmd::d_to
private

The new column index.

Definition at line 144 of file tablecommands.h.

Referenced by redo(), TableMoveColumnCmd(), and undo().


The documentation for this class was generated from the following files:
TableMoveColumnCmd::d_from
int d_from
The old column index.
Definition: tablecommands.h:142
TableMoveColumnCmd::d_to
int d_to
The new column index.
Definition: tablecommands.h:144
future::Table::Private::moveColumn
void moveColumn(int from, int to)
Move a column to another position.
Definition: future_Table.cpp:2537
TableMoveColumnCmd::d_private_obj
future::Table::Private & d_private_obj
The private object to modify.
Definition: tablecommands.h:140
future::Table::Private::name
QString name() const
Definition: future_Table.h:541
AbstractAspect::name
QString name() const
Definition: AbstractAspect.cpp:229
future::Table::Private::column
Column * column(int index) const
Return column number 'index'.
Definition: future_Table.cpp:2453