labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

abstractcolumncommands.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : abstractcolumncommands.h
3  Project : LabPlot
4  Description : Commands to be called by AbstractColumn to modify AbstractColumnPrivate
5  --------------------------------------------------------------------
6  Copyright : (C) 2007-2009 Tilman Benkert (thzs@gmx.net)
7  Copyright : (C) 2010 Knut Franke (knut.franke@gmx.de)
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 
30 #ifndef ABSTRACTCOLUMNCOMMANDS_H
31 #define ABSTRACTCOLUMNCOMMANDS_H
32 
33 #include "AbstractColumnPrivate.h"
34 #include <QUndoCommand>
35 
36 class AbstractColumnClearMasksCmd : public QUndoCommand {
37 public:
38  explicit AbstractColumnClearMasksCmd(AbstractColumnPrivate* col, QUndoCommand* parent = nullptr);
40 
41  void redo() override;
42  void undo() override;
43 
44 private:
47  bool m_copied;
48 };
49 
50 class AbstractColumnSetMaskedCmd : public QUndoCommand {
51 public:
52  explicit AbstractColumnSetMaskedCmd(AbstractColumnPrivate* col, const Interval<int>& interval, bool masked, QUndoCommand* parent = nullptr);
54 
55  void redo() override;
56  void undo() override;
57 
58 private:
61  bool m_masked;
63  bool m_copied;
64 };
65 
66 class AbstractColumnInsertRowsCmd : public QUndoCommand {
67 public:
68  explicit AbstractColumnInsertRowsCmd(AbstractColumn* col, int before, int count, QUndoCommand* parent = nullptr);
70 
71  void redo() override;
72  void undo() override;
73 
74 protected:
76  int m_before;
77  int m_count;
78 };
79 
80 class AbstractColumnRemoveRowsCmd : public QUndoCommand {
81 public:
82  explicit AbstractColumnRemoveRowsCmd(AbstractColumn* col, int first, int count, QUndoCommand* parent = nullptr);
84 
85  void redo() override;
86  void undo() override;
87 
88 protected:
90  int m_first;
91  int m_count;
93 };
94 
95 #endif // ifndef ABSTRACTCOLUMNCOMMANDS_H
Clear masking information.
void redo() override
Execute the command.
~AbstractColumnClearMasksCmd() override
Dtor.
IntervalAttribute< bool > m_masking
The old masks.
AbstractColumnClearMasksCmd(AbstractColumnPrivate *col, QUndoCommand *parent=nullptr)
Ctor.
AbstractColumnPrivate * m_col
The private column data to modify.
void undo() override
Undo the command.
Insert empty rows into a column.
~AbstractColumnInsertRowsCmd() override
Dtor.
int m_before
Row number before which to insert the new rows.
AbstractColumnPrivate * m_col
Private object of AbstractColumn to be modified.
int m_count
Number of rows to be inserted.
AbstractColumnInsertRowsCmd(AbstractColumn *col, int before, int count, QUndoCommand *parent=nullptr)
Ctor.
Private data class of AbstractColumn.
Remove rows from a column.
~AbstractColumnRemoveRowsCmd() override
Dtor.
int m_count
Number of rows to be removed.
AbstractColumnPrivate * m_col
Private object of AbstractColumn to be modified.
int m_first
First row number to be removed.
IntervalAttribute< bool > m_masking
AbstractColumnRemoveRowsCmd(AbstractColumn *col, int first, int count, QUndoCommand *parent=nullptr)
Ctor.
Mark an interval of rows as masked.
IntervalAttribute< bool > m_masking
Interval attribute backup.
void undo() override
Undo the command.
AbstractColumnSetMaskedCmd(AbstractColumnPrivate *col, const Interval< int > &interval, bool masked, QUndoCommand *parent=nullptr)
Ctor.
void redo() override
Execute the command.
AbstractColumnPrivate * m_col
The private AbstractColumn data to modify.
bool m_masked
Mask/unmask flag.
~AbstractColumnSetMaskedCmd() override
Dtor.
Interval< int > m_interval
The interval.
Interface definition for data with column logic.
A class representing an interval-based attribute (bool version)
Auxiliary class for interval based data.
Definition: Interval.h:212