Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • app
  • src
actioncommands.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2012-2020 Matthew Chiawen Chang
5
6This program is free software; you can redistribute it and/or
7modify it under the terms of the GNU General Public License
8as published by the Free Software Foundation; version 2 of the License.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU 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#include "filetype.h"
23
24class Editor;
25class QWidget;
26class ExportMovieDialog;
27
28
29class ActionCommands : public QObject
30{
31 Q_OBJECT
32
33public:
34 explicit ActionCommands(QWidget* parent);
35 virtual ~ActionCommands();
36
37 void setCore(Editor* e) { mEditor = e; }
38
39 // file
40 Status importAnimatedImage();
41 Status importMovieVideo();
42 Status importSound(FileType type);
43 Status exportMovie(bool isGif = false);
44 Status exportImageSequence();
45 Status exportImage();
46 Status exportGif();
47
48 // edit
49 void flipSelectionX();
50 void flipSelectionY();
51 void selectAll();
52 void deselectAll();
53
54 // view
55 void ZoomIn();
56 void ZoomOut();
57 void rotateClockwise();
58 void rotateCounterClockwise();
59
60 // Animation
61 void PlayStop();
62 void GotoNextFrame();
63 void GotoPrevFrame();
64 void GotoNextKeyFrame();
65 void GotoPrevKeyFrame();
66 Status addNewKey();
67
68 void resetAllTools();
69
71 Status insertKeyFrameAtCurrentPosition();
72 void removeKey();
73 void duplicateLayer();
74 void duplicateKey();
75 void moveFrameForward();
76 void moveFrameBackward();
77 void removeSelectedFrames();
78 void reverseSelectedFrames();
79 void addExposureToSelectedFrames();
80 void subtractExposureFromSelectedFrames();
81
82 // Layer
83 Status addNewBitmapLayer();
84 Status addNewVectorLayer();
85 Status addNewCameraLayer();
86 Status addNewSoundLayer();
87 Status deleteCurrentLayer();
88 void changeKeyframeLineColor();
89 void changeallKeyframeLineColor();
90
91 void setLayerVisibilityIndex(int index);
92
93 // Help
94 void help();
95 void quickGuide();
96 void website();
97 void forum();
98 void discord();
99 void reportbug();
100 void checkForUpdates();
101 void openTemporaryDirectory();
102 void about();
103
104private:
105 void showSoundClipWarningIfNeeded();
106
107 void exposeSelectedFrames(int offset);
108
109 Status convertSoundToWav(const QString& filePath);
110
111 Editor* mEditor = nullptr;
112 QWidget* mParent = nullptr;
113
114 bool mSuppressSoundWarning = false;
115};
116
117#endif // COMMANDCENTER_H
ActionCommands
Definition: actioncommands.h:30
ActionCommands::insertKeyFrameAtCurrentPosition
Status insertKeyFrameAtCurrentPosition()
Will insert a keyframe at the current position and push connected frames to the right.
Definition: actioncommands.cpp:697
Editor
Definition: editor.h:71
ExportMovieDialog
Definition: exportmoviedialog.h:30
Status
Definition: pencilerror.h:40
QObject
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QString
QWidget
Generated on Thu Jun 5 2025 14:06:43 for Pencil2D by doxygen 1.9.6 based on revision 4c63407997b2c03e5048716586dec6fbbb755173