forked from solderinskater/C---Port
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuttons.h
79 lines (58 loc) · 2.03 KB
/
buttons.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
Copyright 2010 Keywan Tonekaboni, Florian Fusco, Stefanie Schirmer, Alexander Lenhard, Erik Weitnauer <eweitnauer at gmail.com>
This file is part of Soldering Skaters Nokia Push Project.
Soldering Skaters Nokia Push Project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Soldering Skaters Nokia Push Project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Soldering Skaters Nokia Push Project. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BUTTONS_H
#define BUTTONS_H
#include <QtGui>
#include <timeline.h>
class SkateLabel : public QLabel {
public:
SkateLabel(QString caption, QString add_style="", bool centered=false);
};
class AnimatedButton : public QPushButton {
Q_OBJECT
public:
AnimatedButton(QString caption, QString image_name, QList<int> timeIntervals, QString addStyle="");
void start();
void stop();
TimeLine& getTimeLine() { return timeLine; }
public Q_SLOTS:
void updateImage(int frame);
protected:
QString get_image_name(int num);
private:
TimeLine timeLine;
QString image_name;
QString add_style;
};
class ShinyButton : public QPushButton
{
public:
ShinyButton(QString caption, QString image_name, QString addStyle="");
};
//class TogglePushButton : public QPushButton {
//public:
// TogglePushButton(QString caption, bool initialState=false, QString image_name="toggle");
// void update_style();
// bool toggle_state();
// bool is_active();
// void set_state(bool on);
//protected:
// void mousePressEvent(QMouseEvent *e);
//private:
// QString image_name;
// QString add_style;
// bool state;
//};
#endif // BUTTONS_H