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
69 Status insertKeyFrameAtCurrentPosition();
70 void removeKey();
71 void duplicateLayer();
72 void duplicateKey();
73 void moveFrameForward();
74 void moveFrameBackward();
75 void removeSelectedFrames();
76 void reverseSelectedFrames();
77 void addExposureToSelectedFrames();
78 void subtractExposureFromSelectedFrames();
79
80 // Layer
81 Status addNewBitmapLayer();
82 Status addNewVectorLayer();
83 Status addNewCameraLayer();
84 Status addNewSoundLayer();
85 Status deleteCurrentLayer();
86 void changeKeyframeLineColor();
87 void changeallKeyframeLineColor();
88
89 void setLayerVisibilityIndex(int index);
90
91 // Help
92 void help();
93 void quickGuide();
94 void website();
95 void forum();
96 void discord();
97 void reportbug();
98 void checkForUpdates();
99 void openTemporaryDirectory();
100 void about();
101
102private:
103 void showSoundClipWarningIfNeeded();
104
105 void exposeSelectedFrames(int offset);
106
107 Status convertSoundToWav(const QString& filePath);
108
109 Editor* mEditor = nullptr;
110 QWidget* mParent = nullptr;
111
112 bool mSuppressSoundWarning = false;
113};
114
115#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:696
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 May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39