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)  

SignallingUndoCommand.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : SignallingUndoCommand.h
3  Project : SciDAVis / LabPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2010 Knut Franke
6  Email (use @ for *) : Knut.Franke*gmx.net
7  Description : An undo command calling a method/signal/slot on a
8  QObject on redo/undo.
9 
10  ***************************************************************************/
11 
12 /***************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the Free Software *
26  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
27  * Boston, MA 02110-1301 USA *
28  * *
29  ***************************************************************************/
30 
31 #ifndef SIGNALLING_UNDO_COMMAND_H
32 #define SIGNALLING_UNDO_COMMAND_H
33 
34 #include <QUndoCommand>
35 #include <QByteArray>
36 
37 class SignallingUndoCommand : public QUndoCommand {
38 public:
39  SignallingUndoCommand(const QString &text, QObject* receiver, const char* redoMethod, const char* undoMethod,
40  QGenericArgument val0 = QGenericArgument(), QGenericArgument val1 = QGenericArgument(),
41  QGenericArgument val2 = QGenericArgument(), QGenericArgument val3 = QGenericArgument());
42  ~SignallingUndoCommand() override;
43 
44  void redo() override;
45  void undo() override;
46 
47 private:
48  QGenericArgument arg(int index);
49  QByteArray m_redo, m_undo;
50  QObject* m_receiver;
54 };
55 
56 #endif // ifndef SIGNALLING_UNDO_COMMAND_H
An undo command calling a method/signal/slot on a QObject on redo/undo.
SignallingUndoCommand(const QString &text, QObject *receiver, const char *redoMethod, const char *undoMethod, QGenericArgument val0=QGenericArgument(), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument())
Constructor.
QGenericArgument arg(int index)