c12e09d9a
고영탁
교정 UI 및 팝업 추가
|
1
|
#include <qdebug.h>
|
1bb5ed9dc
고영탁
popupwindow 삭제
|
2
3
|
#include "adjustmentwindow.h"
#include "ui_adjustmentwindow.h"
|
c12e09d9a
고영탁
교정 UI 및 팝업 추가
|
4
|
#include "yesnopopupdlg.h"
|
66e60ceb5
김태훈
모든 버튼에 음향 효과 추가
|
5
|
#include "soundplayer.h"
|
1bb5ed9dc
고영탁
popupwindow 삭제
|
6
7
8
9
10
11
|
AdjustmentWindow::AdjustmentWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::AdjustmentWindow)
{
ui->setupUi(this);
|
453d18662
김태훈
GUI 버전 0.1.11
|
12
13
14
|
ui->clockContainer->setParent(ui->upperStack);
setAttribute(Qt::WA_DeleteOnClose);
|
66e60ceb5
김태훈
모든 버튼에 음향 효과 추가
|
15
16
17
|
foreach (QPushButton *button, findChildren<QPushButton *>())
connect(button, &QPushButton::pressed, SoundPlayer::playClick);
|
1bb5ed9dc
고영탁
popupwindow 삭제
|
18
19
20
21
22
23
|
}
AdjustmentWindow::~AdjustmentWindow()
{
delete ui;
}
|
c12e09d9a
고영탁
교정 UI 및 팝업 추가
|
24
25
26
27
28
|
void AdjustmentWindow::on_btnAdjust_clicked()
{
YesNoPopupDlg* w = new YesNoPopupDlg(this,tr("모든 설정 값을 공장(출고)초기화
값으로 변경 하시겠습니까?"));
|
937409186
고영탁
config enum 설정 진행...
|
29
|
//w->raise();
|
c12e09d9a
고영탁
교정 UI 및 팝업 추가
|
30
31
32
33
34
35
36
37
|
int dlgrst = w->exec();
dlgrst = w->result();
if(dlgrst == QDialog::Accepted) {
//Process Init Value;
qDebug() << "Accepted";
}
else qDebug() <<"Rejected";
}
|
453d18662
김태훈
GUI 버전 0.1.11
|
38
39
40
41
42
|
void AdjustmentWindow::on_backButton_clicked()
{
close();
}
|
ce39b99ff
고영탁
엔코더 구현 진행중
|
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
|
void AdjustmentWindow::keyPressEvent(QKeyEvent *event){
switch (event->key())
{
case 0x01000030: // Turn left
focusPreviousChild();
break;
case 0x01000032: // Turn right
focusNextChild();
break;
}
}
void AdjustmentWindow::keyReleaseEvent(QKeyEvent *event){
switch (event->key())
{
case 0x01000030: // Turn left
focusPreviousChild();
break;
case 0x01000031: // Push
{
QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
if(btn != NULL){
btn->click();
}
break;
}
case 0x01000032: // Turn right
focusNextChild();
break;
}
}
|