Commit 25ec23561cf98dd8042de53a09ad48197b08c51d
1 parent
382b586e92
Exists in
master
and in
2 other branches
누락된 파일 추가
Showing
3 changed files
with
193 additions
and
10 deletions
Show diff stats
app/gui/oven_control/programmingnamepopup.cpp
1 | #include "programmingnamepopup.h" | 1 | #include "programmingnamepopup.h" |
2 | #include "ui_programmingnamepopup.h" | 2 | #include "ui_programmingnamepopup.h" |
3 | 3 | ||
4 | -ProgrammingNamePopup::ProgrammingNamePopup(QWidget *parent) : | 4 | +ProgrammingNamePopup::ProgrammingNamePopup(QWidget *parent, CookRecord record) : |
5 | QWidget(parent), | 5 | QWidget(parent), |
6 | - ui(new Ui::ProgrammingNamePopup) | 6 | + ui(new Ui::ProgrammingNamePopup), |
7 | + record(record) | ||
7 | { | 8 | { |
8 | ui->setupUi(this); | 9 | ui->setupUi(this); |
10 | + | ||
11 | + setAttribute(Qt::WA_DeleteOnClose); | ||
12 | + | ||
13 | + ui->lineEdit->setText(record.name); | ||
9 | } | 14 | } |
10 | 15 | ||
11 | ProgrammingNamePopup::~ProgrammingNamePopup() | 16 | ProgrammingNamePopup::~ProgrammingNamePopup() |
12 | { | 17 | { |
13 | delete ui; | 18 | delete ui; |
14 | } | 19 | } |
20 | + | ||
21 | +void ProgrammingNamePopup::on_okButton_clicked() | ||
22 | +{ | ||
23 | + CookProgram::rename(record, ui->lineEdit->text()); | ||
24 | + | ||
25 | + emit changed(); | ||
26 | + | ||
27 | + close(); | ||
28 | +} | ||
29 | + | ||
30 | +void ProgrammingNamePopup::on_cancelButton_clicked() | ||
31 | +{ | ||
32 | + close(); | ||
33 | +} |
app/gui/oven_control/programmingnamepopup.h
@@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
3 | 3 | ||
4 | #include <QWidget> | 4 | #include <QWidget> |
5 | 5 | ||
6 | +#include "cookprogram.h" | ||
7 | + | ||
6 | namespace Ui { | 8 | namespace Ui { |
7 | class ProgrammingNamePopup; | 9 | class ProgrammingNamePopup; |
8 | } | 10 | } |
@@ -12,11 +14,21 @@ class ProgrammingNamePopup : public QWidget | @@ -12,11 +14,21 @@ class ProgrammingNamePopup : public QWidget | ||
12 | Q_OBJECT | 14 | Q_OBJECT |
13 | 15 | ||
14 | public: | 16 | public: |
15 | - explicit ProgrammingNamePopup(QWidget *parent = 0); | 17 | + explicit ProgrammingNamePopup(QWidget *parent, CookRecord record); |
16 | ~ProgrammingNamePopup(); | 18 | ~ProgrammingNamePopup(); |
17 | 19 | ||
20 | +private slots: | ||
21 | + void on_okButton_clicked(); | ||
22 | + | ||
23 | + void on_cancelButton_clicked(); | ||
24 | + | ||
18 | private: | 25 | private: |
19 | Ui::ProgrammingNamePopup *ui; | 26 | Ui::ProgrammingNamePopup *ui; |
27 | + | ||
28 | + CookRecord record; | ||
29 | + | ||
30 | +signals: | ||
31 | + void changed(); | ||
20 | }; | 32 | }; |
21 | 33 | ||
22 | #endif // PROGRAMMINGNAMEPOPUP_H | 34 | #endif // PROGRAMMINGNAMEPOPUP_H |
app/gui/oven_control/programmingnamepopup.ui
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
1 | <ui version="4.0"> | 2 | <ui version="4.0"> |
2 | - <author/> | ||
3 | - <comment/> | ||
4 | - <exportmacro/> | ||
5 | <class>ProgrammingNamePopup</class> | 3 | <class>ProgrammingNamePopup</class> |
6 | - <widget name="ProgrammingNamePopup" class="QWidget"> | 4 | + <widget class="QWidget" name="ProgrammingNamePopup"> |
7 | <property name="geometry"> | 5 | <property name="geometry"> |
8 | <rect> | 6 | <rect> |
9 | <x>0</x> | 7 | <x>0</x> |
10 | <y>0</y> | 8 | <y>0</y> |
11 | - <width>400</width> | ||
12 | - <height>300</height> | 9 | + <width>900</width> |
10 | + <height>1600</height> | ||
13 | </rect> | 11 | </rect> |
14 | </property> | 12 | </property> |
15 | <property name="windowTitle"> | 13 | <property name="windowTitle"> |
16 | <string>Form</string> | 14 | <string>Form</string> |
17 | </property> | 15 | </property> |
16 | + <property name="styleSheet"> | ||
17 | + <string notr="true">#background { background-image: url(:/images/background/popup/503.png); } | ||
18 | +QLabel, QPushButton, QLineEdit { color: white; } | ||
19 | +QLineEdit { background : transparent; border: none; } | ||
20 | +QPushButton { border: none; } | ||
21 | +QPushButton:pressed { color: yellow; }</string> | ||
22 | + </property> | ||
23 | + <widget class="KeyboardWidget" name="keyboard" native="true"> | ||
24 | + <property name="geometry"> | ||
25 | + <rect> | ||
26 | + <x>0</x> | ||
27 | + <y>850</y> | ||
28 | + <width>900</width> | ||
29 | + <height>600</height> | ||
30 | + </rect> | ||
31 | + </property> | ||
32 | + </widget> | ||
33 | + <widget class="QWidget" name="background" native="true"> | ||
34 | + <property name="geometry"> | ||
35 | + <rect> | ||
36 | + <x>0</x> | ||
37 | + <y>426</y> | ||
38 | + <width>900</width> | ||
39 | + <height>1024</height> | ||
40 | + </rect> | ||
41 | + </property> | ||
42 | + <widget class="Line" name="line"> | ||
43 | + <property name="geometry"> | ||
44 | + <rect> | ||
45 | + <x>0</x> | ||
46 | + <y>95</y> | ||
47 | + <width>900</width> | ||
48 | + <height>3</height> | ||
49 | + </rect> | ||
50 | + </property> | ||
51 | + <property name="styleSheet"> | ||
52 | + <string notr="true">color: rgb(255, 255, 255);</string> | ||
53 | + </property> | ||
54 | + <property name="orientation"> | ||
55 | + <enum>Qt::Horizontal</enum> | ||
56 | + </property> | ||
57 | + </widget> | ||
58 | + <widget class="QWidget" name="horizontalLayoutWidget"> | ||
59 | + <property name="geometry"> | ||
60 | + <rect> | ||
61 | + <x>460</x> | ||
62 | + <y>320</y> | ||
63 | + <width>371</width> | ||
64 | + <height>101</height> | ||
65 | + </rect> | ||
66 | + </property> | ||
67 | + <layout class="QHBoxLayout" name="horizontalLayout"> | ||
68 | + <item> | ||
69 | + <widget class="QPushButton" name="okButton"> | ||
70 | + <property name="sizePolicy"> | ||
71 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
72 | + <horstretch>0</horstretch> | ||
73 | + <verstretch>0</verstretch> | ||
74 | + </sizepolicy> | ||
75 | + </property> | ||
76 | + <property name="font"> | ||
77 | + <font> | ||
78 | + <family>나눔고딕</family> | ||
79 | + <pointsize>12</pointsize> | ||
80 | + <underline>true</underline> | ||
81 | + </font> | ||
82 | + </property> | ||
83 | + <property name="text"> | ||
84 | + <string>확인</string> | ||
85 | + </property> | ||
86 | + <property name="flat"> | ||
87 | + <bool>true</bool> | ||
88 | + </property> | ||
89 | + </widget> | ||
90 | + </item> | ||
91 | + <item> | ||
92 | + <widget class="QPushButton" name="cancelButton"> | ||
93 | + <property name="sizePolicy"> | ||
94 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
95 | + <horstretch>0</horstretch> | ||
96 | + <verstretch>0</verstretch> | ||
97 | + </sizepolicy> | ||
98 | + </property> | ||
99 | + <property name="font"> | ||
100 | + <font> | ||
101 | + <family>나눔고딕</family> | ||
102 | + <pointsize>12</pointsize> | ||
103 | + <underline>true</underline> | ||
104 | + </font> | ||
105 | + </property> | ||
106 | + <property name="text"> | ||
107 | + <string>취소</string> | ||
108 | + </property> | ||
109 | + <property name="flat"> | ||
110 | + <bool>true</bool> | ||
111 | + </property> | ||
112 | + </widget> | ||
113 | + </item> | ||
114 | + </layout> | ||
115 | + </widget> | ||
116 | + <widget class="QLabel" name="titleLabel"> | ||
117 | + <property name="geometry"> | ||
118 | + <rect> | ||
119 | + <x>0</x> | ||
120 | + <y>0</y> | ||
121 | + <width>900</width> | ||
122 | + <height>95</height> | ||
123 | + </rect> | ||
124 | + </property> | ||
125 | + <property name="font"> | ||
126 | + <font> | ||
127 | + <pointsize>14</pointsize> | ||
128 | + </font> | ||
129 | + </property> | ||
130 | + <property name="text"> | ||
131 | + <string>이름 변경</string> | ||
132 | + </property> | ||
133 | + <property name="alignment"> | ||
134 | + <set>Qt::AlignCenter</set> | ||
135 | + </property> | ||
136 | + </widget> | ||
137 | + <widget class="QLineEdit" name="lineEdit"> | ||
138 | + <property name="geometry"> | ||
139 | + <rect> | ||
140 | + <x>0</x> | ||
141 | + <y>100</y> | ||
142 | + <width>900</width> | ||
143 | + <height>200</height> | ||
144 | + </rect> | ||
145 | + </property> | ||
146 | + <property name="font"> | ||
147 | + <font> | ||
148 | + <pointsize>12</pointsize> | ||
149 | + <underline>true</underline> | ||
150 | + </font> | ||
151 | + </property> | ||
152 | + <property name="text"> | ||
153 | + <string>즐겨찾기 이름</string> | ||
154 | + </property> | ||
155 | + <property name="alignment"> | ||
156 | + <set>Qt::AlignCenter</set> | ||
157 | + </property> | ||
158 | + </widget> | ||
159 | + </widget> | ||
160 | + <zorder>background</zorder> | ||
161 | + <zorder>keyboard</zorder> | ||
18 | </widget> | 162 | </widget> |
19 | - <pixmapfunction/> | 163 | + <customwidgets> |
164 | + <customwidget> | ||
165 | + <class>KeyboardWidget</class> | ||
166 | + <extends>QWidget</extends> | ||
167 | + <header>keyboardwidget.h</header> | ||
168 | + <container>1</container> | ||
169 | + </customwidget> | ||
170 | + </customwidgets> | ||
171 | + <resources/> | ||
20 | <connections/> | 172 | <connections/> |
21 | </ui> | 173 | </ui> |