All Classes Namespaces Functions Variables Enumerations Properties Pages
actioncommands.h
1 /*
2 
3 Pencil2D - Traditional Animation Software
4 Copyright (C) 2012-2020 Matthew Chiawen Chang
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; version 2 of the License.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 */
16 
17 #ifndef COMMANDCENTER_H
18 #define COMMANDCENTER_H
19 
20 #include <QObject>
21 #include "pencilerror.h"
22 
23 class Editor;
24 class QWidget;
25 class ExportMovieDialog;
26 
27 
28 class ActionCommands : public QObject
29 {
30  Q_OBJECT
31 
32 public:
33  explicit ActionCommands(QWidget* parent = nullptr);
34  virtual ~ActionCommands();
35 
36  void setCore(Editor* e) { mEditor = e; }
37 
38  // file
39  Status importMovieVideo();
40  Status importMovieAudio();
41  Status importSound();
42  Status exportMovie(bool isGif = false);
43  Status exportImageSequence();
44  Status exportImage();
45  Status exportGif();
46 
47  // edit
48  void flipSelectionX();
49  void flipSelectionY();
50  void selectAll();
51  void deselectAll();
52 
53  // view
54  void ZoomIn();
55  void ZoomOut();
56  void rotateClockwise();
57  void rotateCounterClockwise();
58 
59  // Animation
60  void PlayStop();
61  void GotoNextFrame();
62  void GotoPrevFrame();
63  void GotoNextKeyFrame();
64  void GotoPrevKeyFrame();
65  Status addNewKey();
66  void removeKey();
67  void duplicateKey();
68  void moveFrameForward();
69  void moveFrameBackward();
70 
71  // Layer
72  Status addNewBitmapLayer();
73  Status addNewVectorLayer();
74  Status addNewCameraLayer();
75  Status addNewSoundLayer();
76  Status deleteCurrentLayer();
77  void changeKeyframeLineColor();
78  void changeallKeyframeLineColor();
79 
80  void setLayerVisibilityIndex(int index);
81 
82  // Help
83  void help();
84  void quickGuide();
85  void website();
86  void forum();
87  void discord();
88  void reportbug();
89  void checkForUpdates();
90  void openTemporaryDirectory();
91  void about();
92 
93 private:
94 
95  Status convertSoundToWav(const QString& filePath);
96 
97  Editor* mEditor = nullptr;
98  QWidget* mParent = nullptr;
99 };
100 
101 #endif // COMMANDCENTER_H
Q_OBJECTQ_OBJECT
Definition: editor.h:51
QObject * parent() const const