forked from Greedysky/TTKWidgetTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.cpp
127 lines (120 loc) · 4.29 KB
/
mainwindow.cpp
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "ttkwidgettools.h"
#include <QButtonGroup>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QButtonGroup *group = new QButtonGroup(this);
group->addButton(ui->pushButton, 0);
group->addButton(ui->pushButton_1, 1);
group->addButton(ui->pushButton_2, 2);
group->addButton(ui->pushButton_3, 3);
group->addButton(ui->pushButton_4, 4);
group->addButton(ui->pushButton_5, 5);
group->addButton(ui->pushButton_6, 6);
group->addButton(ui->pushButton_7, 7);
group->addButton(ui->pushButton_8, 8);
group->addButton(ui->pushButton_9, 9);
group->addButton(ui->pushButton_10, 10);
group->addButton(ui->pushButton_11, 11);
group->addButton(ui->pushButton_12, 12);
group->addButton(ui->pushButton_13, 13);
group->addButton(ui->pushButton_14, 14);
group->addButton(ui->pushButton_15, 15);
group->addButton(ui->pushButton_16, 16);
group->addButton(ui->pushButton_17, 17);
group->addButton(ui->pushButton_18, 18);
group->addButton(ui->pushButton_19, 19);
group->addButton(ui->pushButton_20, 20);
group->addButton(ui->pushButton_21, 21);
group->addButton(ui->pushButton_22, 22);
group->addButton(ui->pushButton_23, 23);
group->addButton(ui->pushButton_24, 24);
group->addButton(ui->pushButton_25, 25);
group->addButton(ui->pushButton_26, 26);
group->addButton(ui->pushButton_27, 27);
group->addButton(ui->pushButton_28, 28);
group->addButton(ui->pushButton_29, 29);
group->addButton(ui->pushButton_30, 30);
group->addButton(ui->pushButton_31, 31);
connect(group, SIGNAL(buttonClicked(int)), SLOT(changed(int)));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::changed(int index)
{
switch(index)
{
case 0: (new TTKAnimationStackedWindow(this))->show();
break;
case 1: (new TTKTransitionAnimationWindow(this))->show();
break;
case 2: (new TTKGifLabelWindow(this))->show();
break;
case 3: (new TTKCodeAreaWindow(this))->show();
break;
case 4: (new TTKToastWindow(this))->show();
break;
case 5: (new TTKMarqueeWindow(this))->show();
break;
case 6: (new TTKRoundAnimationWindow(this))->show();
break;
case 7: (new TTKMovingLabelWindow(this))->show();
break;
case 8: (new TTKSmoothMovingTableWindow(this))->show();
break;
case 9: (new TTKColorWindow(this))->show();
break;
case 10:(new TTKLayoutAnimationWindow(this))->show();
break;
case 11:(new TTKShiningSliderWindow(this))->show();
break;
case 12:(new TTKSplitItemWindow(this))->show();
break;
case 13:(new TTKGrabItemWindow(this))->show();
break;
case 14:(new TTKFunctionAnimationHWindow(this))->show();
break;
case 15:(new TTKToolMenuWindow(this))->show();
break;
case 16:(new TTKMoveDialogWindow(this))->show();
break;
case 17:(new TTKMoveWidgetWindow(this))->show();
break;
case 18:(new TTKMoveResizeWidgetWindow(this))->show();
break;
case 19:(new TTKCircleClickPlaneWindow(this))->show();
break;
case 20:(new TTKLineEditWindow(this))->show();
break;
case 21:(new TTKToggleWindow(this))->show();
break;
case 22:(new TTKRadioButtonWindow(this))->show();
break;
case 23:(new TTKCheckButtonWindow(this))->show();
break;
case 24:(new TTKProgressWindow(this))->show();
break;
case 25:(new TTKFlatButtonWindow(this))->show();
break;
case 26:(new TTKCircularProgressWindow(this))->show();
break;
case 27:(new TTKSliderWindow(this))->show();
break;
case 28:(new TTKColorTablePlaneWindow(this))->show();
break;
case 29:(new TTKFunctionAnimationVWindow(this))->show();
break;
case 30:(new TTKFunctionListHWindow(this))->show();
break;
case 31:(new TTKFunctionListVWindow(this))->show();
break;
default:
break;
}
}