Commit cf095bd105dd42dd32011307bb229a026039cd32

Authored by 고영탁
1 parent 51ac22adfa
Exists in master and in 2 other branches fhd, fhd-demo

메뉴얼 화면 추가

 - 메뉴얼 화면 디자인 적용
app/gui/oven_control/manualviewerdlg.cpp
@@ -3,22 +3,23 @@ @@ -3,22 +3,23 @@
3 #include "manualviewerdlg.h" 3 #include "manualviewerdlg.h"
4 #include "ui_manualviewerdlg.h" 4 #include "ui_manualviewerdlg.h"
5 5
6 -ManualViewerDlg::ManualViewerDlg(QWidget *parent) : 6 +ManualViewerDlg::ManualViewerDlg(QWidget *parent, uint32_t start) :
7 QDialog(parent), 7 QDialog(parent),
8 ui(new Ui::ManualViewerDlg) 8 ui(new Ui::ManualViewerDlg)
9 { 9 {
10 ui->setupUi(this); 10 ui->setupUi(this);
11 - ui->clockContainer->setParent(ui->upperStack);  
12 setAttribute(Qt::WA_DeleteOnClose); 11 setAttribute(Qt::WA_DeleteOnClose);
  12 + this->setFocus();
13 13
  14 + m_nCurPage = start;
  15 + if(m_nCurPage<1 || m_nCurPage > MAX_MANUAL_PAGE) m_nCurPage = 1;
14 16
15 - ui->ctrLbManual->setScaledContents(true);  
16 - //ui->ctrLbManual->setSizePolicy(QSizePolicy::);  
17 - QPixmap image("/prime/manual/manual-15.png");  
18 - int w = ui->ctrLbManual->width();  
19 - int h = ui->ctrLbManual->height();  
20 - ui->ctrLbManual->setPixmap(image);  
21 - //ui->ctrLbManual->setPixmap(image.scaled(w,h,Qt::IgnoreAspectRatio)); 17 +
  18 + m_nCurPage =10;
  19 +
  20 + //ui->ctrLbManual->setScaledContents(true);
  21 + QPixmap image(QString("/prime/manual/manual-%1.png").arg(m_nCurPage,2,10,QLatin1Char('0')));
  22 + ui->ctrLbManual->setPixmap(image.scaled(ui->ctrLbManual->size(),Qt::KeepAspectRatio, Qt::SmoothTransformation));
22 } 23 }
23 24
24 ManualViewerDlg::~ManualViewerDlg() 25 ManualViewerDlg::~ManualViewerDlg()
@@ -30,3 +31,21 @@ void ManualViewerDlg::on_backButton_clicked() @@ -30,3 +31,21 @@ void ManualViewerDlg::on_backButton_clicked()
30 { 31 {
31 deleteLater(); 32 deleteLater();
32 } 33 }
  34 +
  35 +void ManualViewerDlg::on_leftButton_clicked()
  36 +{
  37 + m_nCurPage--;
  38 + if(m_nCurPage<1) m_nCurPage=MAX_MANUAL_PAGE;
  39 + QPixmap image(QString("/prime/manual/manual-%1.png").arg(m_nCurPage,2,10,QLatin1Char('0')));
  40 + ui->ctrLbManual->setPixmap(image.scaled(ui->ctrLbManual->size(),Qt::KeepAspectRatio, Qt::SmoothTransformation));
  41 +}
  42 +
  43 +
  44 +
  45 +void ManualViewerDlg::on_rightButton_clicked()
  46 +{
  47 + m_nCurPage++;
  48 + if(m_nCurPage > MAX_MANUAL_PAGE) m_nCurPage = 1;
  49 + QPixmap image(QString("/prime/manual/manual-%1.png").arg(m_nCurPage,2,10,QLatin1Char('0')));
  50 + ui->ctrLbManual->setPixmap(image.scaled(ui->ctrLbManual->size(),Qt::KeepAspectRatio, Qt::SmoothTransformation));
  51 +}
app/gui/oven_control/manualviewerdlg.h
@@ -3,6 +3,12 @@ @@ -3,6 +3,12 @@
3 3
4 #include <QDialog> 4 #include <QDialog>
5 5
  6 +#define MAX_MANUAL_PAGE 60
  7 +#define START_X 0
  8 +#define START_Y 0
  9 +#define SIZE_WIDTH 900
  10 +#define SIZE_HEIGHT 1450
  11 +
6 namespace Ui { 12 namespace Ui {
7 class ManualViewerDlg; 13 class ManualViewerDlg;
8 } 14 }
@@ -12,14 +18,19 @@ class ManualViewerDlg : public QDialog @@ -12,14 +18,19 @@ class ManualViewerDlg : public QDialog
12 Q_OBJECT 18 Q_OBJECT
13 19
14 public: 20 public:
15 - explicit ManualViewerDlg(QWidget *parent = 0); 21 + explicit ManualViewerDlg(QWidget *parent = 0, uint32_t start=1);
16 ~ManualViewerDlg(); 22 ~ManualViewerDlg();
17 23
18 private slots: 24 private slots:
19 void on_backButton_clicked(); 25 void on_backButton_clicked();
20 26
  27 + void on_leftButton_clicked();
  28 +
  29 + void on_rightButton_clicked();
  30 +
21 private: 31 private:
22 Ui::ManualViewerDlg *ui; 32 Ui::ManualViewerDlg *ui;
  33 + uint32_t m_nCurPage;
23 }; 34 };
24 35
25 #endif // MANUALVIEWERDLG_H 36 #endif // MANUALVIEWERDLG_H
app/gui/oven_control/manualviewerdlg.ui
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </rect> 11 </rect>
12 </property> 12 </property>
13 <property name="styleSheet"> 13 <property name="styleSheet">
14 - <string notr="true">#centralwidget { background-image: url(:/images/background/config_service.png); } 14 + <string notr="true">#centralwidget { background-image: url(:/images/background/original.png); }
15 #bottomBar { background-image: url(:/images/bottom_bar/background.png); } 15 #bottomBar { background-image: url(:/images/bottom_bar/background.png); }
16 #midwidget { background-image: url(:/images/config/service/realtime_parts_bgnd.png); }</string> 16 #midwidget { background-image: url(:/images/config/service/realtime_parts_bgnd.png); }</string>
17 </property> 17 </property>
@@ -20,82 +20,13 @@ @@ -20,82 +20,13 @@
20 <rect> 20 <rect>
21 <x>0</x> 21 <x>0</x>
22 <y>0</y> 22 <y>0</y>
23 - <width>1555</width> 23 + <width>900</width>
24 <height>1600</height> 24 <height>1600</height>
25 </rect> 25 </rect>
26 </property> 26 </property>
27 <property name="styleSheet"> 27 <property name="styleSheet">
28 <string notr="true"/> 28 <string notr="true"/>
29 </property> 29 </property>
30 - <widget class="QStackedWidget" name="upperStack">  
31 - <property name="geometry">  
32 - <rect>  
33 - <x>0</x>  
34 - <y>0</y>  
35 - <width>900</width>  
36 - <height>426</height>  
37 - </rect>  
38 - </property>  
39 - <widget class="QWidget" name="clockContainer">  
40 - <property name="styleSheet">  
41 - <string notr="true">#clockContainer { background-image: url(:/images/clock/background.png); }</string>  
42 - </property>  
43 - <widget class="Clock" name="clock" native="true">  
44 - <property name="geometry">  
45 - <rect>  
46 - <x>272</x>  
47 - <y>36</y>  
48 - <width>356</width>  
49 - <height>355</height>  
50 - </rect>  
51 - </property>  
52 - </widget>  
53 - <widget class="WashWarnIcon" name="label">  
54 - <property name="geometry">  
55 - <rect>  
56 - <x>800</x>  
57 - <y>320</y>  
58 - <width>80</width>  
59 - <height>84</height>  
60 - </rect>  
61 - </property>  
62 - </widget>  
63 - <widget class="DemoIcon" name="label_2">  
64 - <property name="geometry">  
65 - <rect>  
66 - <x>780</x>  
67 - <y>230</y>  
68 - <width>101</width>  
69 - <height>90</height>  
70 - </rect>  
71 - </property>  
72 - </widget>  
73 - <widget class="HalfEnergyIcon" name="label_3">  
74 - <property name="geometry">  
75 - <rect>  
76 - <x>780</x>  
77 - <y>160</y>  
78 - <width>108</width>  
79 - <height>67</height>  
80 - </rect>  
81 - </property>  
82 - </widget>  
83 - <widget class="DigitalClock" name="label_4">  
84 - <property name="geometry">  
85 - <rect>  
86 - <x>20</x>  
87 - <y>310</y>  
88 - <width>600</width>  
89 - <height>100</height>  
90 - </rect>  
91 - </property>  
92 - <property name="alignment">  
93 - <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>  
94 - </property>  
95 - </widget>  
96 - </widget>  
97 - <widget class="QWidget" name="page_2"/>  
98 - </widget>  
99 <widget class="QWidget" name="bottomBar" native="true"> 30 <widget class="QWidget" name="bottomBar" native="true">
100 <property name="geometry"> 31 <property name="geometry">
101 <rect> 32 <rect>
@@ -108,7 +39,7 @@ @@ -108,7 +39,7 @@
108 <widget class="QPushButton" name="backButton"> 39 <widget class="QPushButton" name="backButton">
109 <property name="geometry"> 40 <property name="geometry">
110 <rect> 41 <rect>
111 - <x>343</x> 42 + <x>401</x>
112 <y>26</y> 43 <y>26</y>
113 <width>97</width> 44 <width>97</width>
114 <height>97</height> 45 <height>97</height>
@@ -132,52 +63,63 @@ QPushButton:pressed, QPushButton:focus{ border-image: url(:/images/bottom_bar/ba @@ -132,52 +63,63 @@ QPushButton:pressed, QPushButton:focus{ border-image: url(:/images/bottom_bar/ba
132 <widget class="QLabel" name="ctrLbManual"> 63 <widget class="QLabel" name="ctrLbManual">
133 <property name="geometry"> 64 <property name="geometry">
134 <rect> 65 <rect>
135 - <x>30</x>  
136 - <y>425</y>  
137 - <width>840</width>  
138 - <height>1021</height> 66 + <x>0</x>
  67 + <y>5</y>
  68 + <width>901</width>
  69 + <height>1441</height>
139 </rect> 70 </rect>
140 </property> 71 </property>
141 <property name="text"> 72 <property name="text">
142 - <string notr="true">TextLabel</string> 73 + <string notr="true"/>
143 </property> 74 </property>
144 <property name="scaledContents"> 75 <property name="scaledContents">
145 - <bool>true</bool> 76 + <bool>false</bool>
146 </property> 77 </property>
147 <property name="alignment"> 78 <property name="alignment">
148 <set>Qt::AlignCenter</set> 79 <set>Qt::AlignCenter</set>
149 </property> 80 </property>
150 </widget> 81 </widget>
  82 + <widget class="QPushButton" name="leftButton">
  83 + <property name="geometry">
  84 + <rect>
  85 + <x>14</x>
  86 + <y>770</y>
  87 + <width>100</width>
  88 + <height>100</height>
  89 + </rect>
  90 + </property>
  91 + <property name="styleSheet">
  92 + <string notr="true">QPushButton { border-image: url(:/images/help/page_prev.png); }
  93 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/help/page_prev_over.png); }</string>
  94 + </property>
  95 + <property name="text">
  96 + <string/>
  97 + </property>
  98 + </widget>
  99 + <widget class="QPushButton" name="rightButton">
  100 + <property name="geometry">
  101 + <rect>
  102 + <x>788</x>
  103 + <y>770</y>
  104 + <width>100</width>
  105 + <height>100</height>
  106 + </rect>
  107 + </property>
  108 + <property name="styleSheet">
  109 + <string notr="true">QPushButton { border-image: url(:/images/help/page_next.png); }
  110 +QPushButton:pressed , QPushButton:focus { border-image: url(:/images/help/page_next_over.png); }</string>
  111 + </property>
  112 + <property name="text">
  113 + <string/>
  114 + </property>
  115 + </widget>
151 </widget> 116 </widget>
152 </widget> 117 </widget>
153 - <customwidgets>  
154 - <customwidget>  
155 - <class>Clock</class>  
156 - <extends>QWidget</extends>  
157 - <header>clock.h</header>  
158 - <container>1</container>  
159 - </customwidget>  
160 - <customwidget>  
161 - <class>WashWarnIcon</class>  
162 - <extends>QLabel</extends>  
163 - <header>washwarnicon.h</header>  
164 - </customwidget>  
165 - <customwidget>  
166 - <class>DemoIcon</class>  
167 - <extends>QLabel</extends>  
168 - <header>demoicon.h</header>  
169 - </customwidget>  
170 - <customwidget>  
171 - <class>HalfEnergyIcon</class>  
172 - <extends>QLabel</extends>  
173 - <header>halfenergyicon.h</header>  
174 - </customwidget>  
175 - <customwidget>  
176 - <class>DigitalClock</class>  
177 - <extends>QLabel</extends>  
178 - <header>digitalclock.h</header>  
179 - </customwidget>  
180 - </customwidgets> 118 + <tabstops>
  119 + <tabstop>backButton</tabstop>
  120 + <tabstop>leftButton</tabstop>
  121 + <tabstop>rightButton</tabstop>
  122 + </tabstops>
181 <resources/> 123 <resources/>
182 <connections/> 124 <connections/>
183 </ui> 125 </ui>