kwave  18.07.70
UndoInsertAction.h
Go to the documentation of this file.
1 /***************************************************************************
2  UndoInsertAction.h - UndoAction for insertion of a range of samples
3  -------------------
4  begin : Jun 14 2001
5  copyright : (C) 2001 by Thomas Eschenbacher
6  email : Thomas Eschenbacher <thomas.eschenbacher@gmx.de>
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef UNDO_INSERT_ACTION_H
19 #define UNDO_INSERT_ACTION_H
20 
21 #include "config.h"
22 
23 #include <QList>
24 #include <QObject>
25 #include <QString>
26 
27 #include "libkwave/Sample.h"
29 
30 class QWidget;
31 
32 namespace Kwave
33 {
34 
35  class SignalManager;
36 
37  class UndoInsertAction: public QObject, public Kwave::UndoAction
38  {
39  Q_OBJECT
40  public:
41 
50  UndoInsertAction(QWidget *parent_widget,
51  const QList<unsigned int> &track_list,
52  sample_index_t offset,
53  sample_index_t length);
54 
56  virtual QString description() Q_DECL_OVERRIDE;
57 
59  virtual qint64 undoSize() Q_DECL_OVERRIDE;
60 
62  virtual qint64 redoSize() Q_DECL_OVERRIDE;
63 
67  virtual bool store(Kwave::SignalManager &manager) Q_DECL_OVERRIDE;
68 
74  bool with_redo) Q_DECL_OVERRIDE;
75 
77  virtual void dump(const QString &indent) Q_DECL_OVERRIDE;
78 
79  public slots:
80 
88  void setLength(sample_index_t length);
89 
90  protected:
91 
93  QWidget *m_parent_widget;
94 
96  QList<unsigned int> m_track_list;
97 
100 
103 
104  };
105 }
106 
107 #endif /* UNDO_INSERT_ACTION_H */
108 
109 //***************************************************************************
110 //***************************************************************************
void setLength(sample_index_t length)
virtual qint64 redoSize() Q_DECL_OVERRIDE
Definition: App.h:33
virtual bool store(Kwave::SignalManager &manager) Q_DECL_OVERRIDE
QList< unsigned int > m_track_list
quint64 sample_index_t
Definition: Sample.h:28
virtual QString description() Q_DECL_OVERRIDE
virtual void dump(const QString &indent) Q_DECL_OVERRIDE
UndoInsertAction(QWidget *parent_widget, const QList< unsigned int > &track_list, sample_index_t offset, sample_index_t length)
virtual qint64 undoSize() Q_DECL_OVERRIDE
virtual Kwave::UndoAction * undo(Kwave::SignalManager &manager, bool with_redo) Q_DECL_OVERRIDE