PeriDyno 1.0.0
Loading...
Searching...
No Matches
PAnimationWidget.h
Go to the documentation of this file.
1#ifndef PANIMATIONWIDGET_H
2#define PANIMATIONWIDGET_H
3
4#include <QWidget>
5#include <QMouseEvent>
6#include <QSlider>
7#include <QLabel>
8#include <QCheckBox>
9#include "PAnimationQSlider.h"
10
11QT_FORWARD_DECLARE_CLASS(QSpinBox)
12QT_FORWARD_DECLARE_CLASS(QScrollBar)
13QT_FORWARD_DECLARE_CLASS(QPushButton)
14
15namespace dyno
16{
17 QT_FORWARD_DECLARE_CLASS(PSimulationThread)
18
19 class PAnimationWidget : public QWidget
20 {
21 Q_OBJECT
22
23 public:
24 explicit PAnimationWidget(QWidget *parent = nullptr);
26
27 signals:
30
31 public slots:
32 void toggleSimulation();
33 void resetSimulation();
34 void takeOneStep();
35
36 void simulationFinished();
37
38 void updateSlider(int frame);
39
40 void buildIconLabel(QLabel* Label, QPixmap* Icon, QPushButton*btn, int size);
41
42 void totalFrameChanged(int num);
43
44 void runForever(int state);
45
46 private:
47 QPushButton* mStartSim;
48 QPushButton* mNextStep;
49 QPushButton* mResetSim;
50
51 QPixmap* mStartIcon;
52 QPixmap* mPauseIcon;
53 QPixmap* mResetIcon;
54 QPixmap* mNextStepIcon;
55 QPixmap* mFinishIcon;
56
57 QLabel* mResetLabel;
58 QLabel* mStartLabel;
60
61 QCheckBox* mPersistent;
63
65
66 private:
68 static const int labelSize = 6;
69 QLabel* label[labelSize];
70 };
71}
72
73#endif // PANIMATIONWIDGET_H
PAnimationWidget(QWidget *parent=nullptr)
static const int labelSize
PAnimationQSlider * mFrameSlider
void buildIconLabel(QLabel *Label, QPixmap *Icon, QPushButton *btn, int size)
QLabel * label[labelSize]
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25