-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflow_view.h
More file actions
51 lines (41 loc) · 1.05 KB
/
flow_view.h
File metadata and controls
51 lines (41 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <memory>
#include <QList>
#include <QGraphicsView>
#include <QParallelAnimationGroup>
#include <QPropertyAnimation>
#include "stepped_animation.h"
namespace fv
{
class pixmap_widget;
class placer;
//! Window for showing widgets on the scene
class flow_view : public QGraphicsView
{
Q_OBJECT
public:
flow_view(QWidget* parent = nullptr);
virtual ~flow_view();
protected:
virtual void resizeEvent(QResizeEvent* e);
virtual void keyPressEvent(QKeyEvent* e);
virtual void keyReleaseEvent(QKeyEvent* e);
private slots:
void animation_value_changed(qreal value);
void step(bool forward);
private:
void load_scene();
void place();
void run_flow(bool forward);
void run_mode_animation();
bool process_ctrl(QKeyEvent* e);
QPropertyAnimation* add_mode_animation(pixmap_widget* icon, const QByteArray& property_name);
private:
QList<pixmap_widget*> icons_;
QParallelAnimationGroup mode_animation_;
stepped_animation flow_animation_;
std::unique_ptr<placer> normal_placer_;
std::unique_ptr<placer> flow_placer_;
placer* placer_;
};
}