Crossfire Server, Trunk
AnimationControl.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef ANIMATION_CONTROL_H
14 #define ANIMATION_CONTROL_H
15 
16 #include <QObject>
17 #include <QtWidgets>
18 
19 #include "global.h"
20 #include "face.h"
21 
22 class AnimationWidget;
23 
27 class AnimationControl : public QWidget {
28  Q_OBJECT
29 
30 public:
31  AnimationControl(QWidget* parent);
32 
38  void setAnimation(const Animations* animation, int facings = -1);
39 
40 protected:
42  int myStep;
44  int myFacings;
45 
46  void display(const Animations* animation, int facings = -1);
47  QList<AnimationWidget*> myWidgets;
48  QTimer* myTimer;
49 
50 private slots:
51  void step();
52 };
53 
54 #endif // ANIMATION_CONTROL_H
global.h
face.h
AnimationControl::myLastStep
int myLastStep
Definition: AnimationControl.h:43
make_face_from_files.facings
list facings
Definition: make_face_from_files.py:45
AnimationControl::myFacings
int myFacings
Definition: AnimationControl.h:44
AnimationControl::step
void step()
Definition: AnimationControl.cpp:94
AnimationWidget
Definition: AnimationWidget.h:22
AnimationControl::display
void display(const Animations *animation, int facings=-1)
Definition: AnimationControl.cpp:49
AnimationControl::myWidgets
QList< AnimationWidget * > myWidgets
Definition: AnimationControl.h:47
Animations
Definition: face.h:25
AnimationControl
Definition: AnimationControl.h:27
AnimationControl::setAnimation
void setAnimation(const Animations *animation, int facings=-1)
Definition: AnimationControl.cpp:41
AnimationControl::myAnimation
const Animations * myAnimation
Definition: AnimationControl.h:41
AnimationControl::myTimer
QTimer * myTimer
Definition: AnimationControl.h:48
AnimationControl::myStep
int myStep
Definition: AnimationControl.h:42
AnimationControl::AnimationControl
AnimationControl(QWidget *parent)
Definition: AnimationControl.cpp:19