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
timeline.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17#ifndef TIMELINE_H
18#define TIMELINE_H
19
20#include "basedockwidget.h"
21
22class QScrollBar;
23class Editor;
24class TimeLineCells;
25class TimeControls;
26
27class QToolButton;
28class QWheelEvent;
29
30
31class TimeLine : public BaseDockWidget
32{
33 Q_OBJECT
34
35public:
36 TimeLine( QWidget* parent );
37
38 void initUI() override;
39 void updateUI() override;
40 void updateUICached();
41
42 void updateFrame( int frameNumber );
43 void updateLayerNumber( int number );
44 void updateLayerView();
45 void updateLength();
46 void updateContent();
47 void setLoop( bool loop );
48 void setRangeState( bool range );
49 void setPlaying( bool isPlaying );
50
51 void extendLength(int frame);
52
53 int getRangeLower();
54 int getRangeUpper();
55
56 void onObjectLoaded();
57 void onCurrentLayerChanged();
58 void onScrollbarValueChanged();
59
60signals:
61 void selectionChanged();
62 void modification();
63
64 void deleteCurrentLayerClick();
65
66 void insertKeyClick();
67 void removeKeyClick();
68 void duplicateLayerClick();
69 void duplicateKeyClick();
70
71 void newBitmapLayer();
72 void newVectorLayer();
73 void newSoundLayer();
74 void newCameraLayer();
75
76 void soundClick( bool );
77 void fpsChanged( int );
78 void onionPrevClick();
79 void onionNextClick();
80 void playButtonTriggered();
81
82public:
83 bool scrubbing = false;
84
85protected:
86 void resizeEvent( QResizeEvent* event ) override;
87 void wheelEvent( QWheelEvent* ) override;
88
89private:
90 void updateVerticalScrollbarPosition();
91
92 QScrollBar* mHScrollbar = nullptr;
93 QScrollBar* mVScrollbar = nullptr;
94 TimeLineCells* mTracks = nullptr;
95 TimeLineCells* mLayerList = nullptr;
96 TimeControls* mTimeControls = nullptr;
97
98 QTimer* mScrollingStoppedTimer = nullptr;
99
100 QToolButton* mLayerDeleteButton = nullptr;
101 int mNumLayers = 0;
102 int mLastUpdatedFrame = 0;
103};
104
105#endif
BaseDockWidget
Definition: basedockwidget.h:27
Editor
Definition: editor.h:71
TimeControls
Definition: timecontrols.h:33
TimeLineCells
Definition: timelinecells.h:44
TimeLine
Definition: timeline.h:32
TimeLine::extendLength
void extendLength(int frame)
Extends the timeline frame length if necessary.
Definition: timeline.cpp:262
QDockWidget::event
virtual bool event(QEvent *event) override
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QResizeEvent
QScrollBar
QTimer
QToolButton
QWheelEvent
QWidget
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39