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)  

TableSetNumberOfRowsCmd Class Reference

Set the number of rows in the table. More...

#include <tablecommands.h>

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

Public Member Functions

 TableSetNumberOfRowsCmd (future::Table::Private &private_obj, int rows, QUndoCommand *parent=0)
 
void redo () override
 
void undo () override
 

Private Attributes

future::Table::Privated_private_obj
 The private object to modify. More...
 
int d_rows
 Number of rows. More...
 
int d_old_rows
 Number of rows before. More...
 

Detailed Description

Set the number of rows in the table.

Definition at line 78 of file tablecommands.h.

Constructor & Destructor Documentation

◆ TableSetNumberOfRowsCmd()

TableSetNumberOfRowsCmd::TableSetNumberOfRowsCmd ( future::Table::Private private_obj,
int  rows,
QUndoCommand *  parent = 0 
)

Definition at line 66 of file tablecommands.cpp.

67  : QUndoCommand( parent ), d_private_obj(private_obj), d_rows(rows)
68 {
69  setText(QObject::tr("%1: set the number of rows to %2").arg(d_private_obj.name()).arg(rows));
70 }

References d_private_obj, and future::Table::Private::name().

Here is the call graph for this function:

Member Function Documentation

◆ redo()

void TableSetNumberOfRowsCmd::redo ( )
override

Definition at line 72 of file tablecommands.cpp.

References d_old_rows, d_private_obj, d_rows, future::Table::Private::rowCount(), and future::Table::Private::setRowCount().

Here is the call graph for this function:

◆ undo()

void TableSetNumberOfRowsCmd::undo ( )
override

Definition at line 78 of file tablecommands.cpp.

79 {
81 }

References d_old_rows, d_private_obj, and future::Table::Private::setRowCount().

Here is the call graph for this function:

Member Data Documentation

◆ d_old_rows

int TableSetNumberOfRowsCmd::d_old_rows
private

Number of rows before.

Definition at line 92 of file tablecommands.h.

Referenced by redo(), and undo().

◆ d_private_obj

future::Table::Private& TableSetNumberOfRowsCmd::d_private_obj
private

The private object to modify.

Definition at line 88 of file tablecommands.h.

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

◆ d_rows

int TableSetNumberOfRowsCmd::d_rows
private

Number of rows.

Definition at line 90 of file tablecommands.h.

Referenced by redo().


The documentation for this class was generated from the following files:
future::Table::Private::setRowCount
void setRowCount(int count)
Set the number of rows of the table.
Definition: future_Table.cpp:2551
future::Table::Private::rowCount
int rowCount() const
Return the number of rows in the table.
Definition: future_Table.h:522
future::Table::Private::name
QString name() const
Definition: future_Table.h:541
TableSetNumberOfRowsCmd::d_old_rows
int d_old_rows
Number of rows before.
Definition: tablecommands.h:92
TableSetNumberOfRowsCmd::d_private_obj
future::Table::Private & d_private_obj
The private object to modify.
Definition: tablecommands.h:88
TableSetNumberOfRowsCmd::d_rows
int d_rows
Number of rows.
Definition: tablecommands.h:90