From cf095bd105dd42dd32011307bb229a026039cd32 Mon Sep 17 00:00:00 2001 From: byloveletter Date: Thu, 28 Sep 2017 17:36:34 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=94=EB=89=B4=EC=96=BC=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 메뉴얼 화면 디자인 적용 --- app/gui/oven_control/manualviewerdlg.cpp | 37 ++++++-- app/gui/oven_control/manualviewerdlg.h | 13 ++- app/gui/oven_control/manualviewerdlg.ui | 154 ++++++++++--------------------- 3 files changed, 88 insertions(+), 116 deletions(-) diff --git a/app/gui/oven_control/manualviewerdlg.cpp b/app/gui/oven_control/manualviewerdlg.cpp index 181a573..1135399 100644 --- a/app/gui/oven_control/manualviewerdlg.cpp +++ b/app/gui/oven_control/manualviewerdlg.cpp @@ -3,22 +3,23 @@ #include "manualviewerdlg.h" #include "ui_manualviewerdlg.h" -ManualViewerDlg::ManualViewerDlg(QWidget *parent) : +ManualViewerDlg::ManualViewerDlg(QWidget *parent, uint32_t start) : QDialog(parent), ui(new Ui::ManualViewerDlg) { ui->setupUi(this); - ui->clockContainer->setParent(ui->upperStack); setAttribute(Qt::WA_DeleteOnClose); + this->setFocus(); + m_nCurPage = start; + if(m_nCurPage<1 || m_nCurPage > MAX_MANUAL_PAGE) m_nCurPage = 1; - ui->ctrLbManual->setScaledContents(true); - //ui->ctrLbManual->setSizePolicy(QSizePolicy::); - QPixmap image("/prime/manual/manual-15.png"); - int w = ui->ctrLbManual->width(); - int h = ui->ctrLbManual->height(); - ui->ctrLbManual->setPixmap(image); - //ui->ctrLbManual->setPixmap(image.scaled(w,h,Qt::IgnoreAspectRatio)); + + m_nCurPage =10; + + //ui->ctrLbManual->setScaledContents(true); + QPixmap image(QString("/prime/manual/manual-%1.png").arg(m_nCurPage,2,10,QLatin1Char('0'))); + ui->ctrLbManual->setPixmap(image.scaled(ui->ctrLbManual->size(),Qt::KeepAspectRatio, Qt::SmoothTransformation)); } ManualViewerDlg::~ManualViewerDlg() @@ -30,3 +31,21 @@ void ManualViewerDlg::on_backButton_clicked() { deleteLater(); } + +void ManualViewerDlg::on_leftButton_clicked() +{ + m_nCurPage--; + if(m_nCurPage<1) m_nCurPage=MAX_MANUAL_PAGE; + QPixmap image(QString("/prime/manual/manual-%1.png").arg(m_nCurPage,2,10,QLatin1Char('0'))); + ui->ctrLbManual->setPixmap(image.scaled(ui->ctrLbManual->size(),Qt::KeepAspectRatio, Qt::SmoothTransformation)); +} + + + +void ManualViewerDlg::on_rightButton_clicked() +{ + m_nCurPage++; + if(m_nCurPage > MAX_MANUAL_PAGE) m_nCurPage = 1; + QPixmap image(QString("/prime/manual/manual-%1.png").arg(m_nCurPage,2,10,QLatin1Char('0'))); + ui->ctrLbManual->setPixmap(image.scaled(ui->ctrLbManual->size(),Qt::KeepAspectRatio, Qt::SmoothTransformation)); +} diff --git a/app/gui/oven_control/manualviewerdlg.h b/app/gui/oven_control/manualviewerdlg.h index 0df4ad8..1294289 100644 --- a/app/gui/oven_control/manualviewerdlg.h +++ b/app/gui/oven_control/manualviewerdlg.h @@ -3,6 +3,12 @@ #include +#define MAX_MANUAL_PAGE 60 +#define START_X 0 +#define START_Y 0 +#define SIZE_WIDTH 900 +#define SIZE_HEIGHT 1450 + namespace Ui { class ManualViewerDlg; } @@ -12,14 +18,19 @@ class ManualViewerDlg : public QDialog Q_OBJECT public: - explicit ManualViewerDlg(QWidget *parent = 0); + explicit ManualViewerDlg(QWidget *parent = 0, uint32_t start=1); ~ManualViewerDlg(); private slots: void on_backButton_clicked(); + void on_leftButton_clicked(); + + void on_rightButton_clicked(); + private: Ui::ManualViewerDlg *ui; + uint32_t m_nCurPage; }; #endif // MANUALVIEWERDLG_H diff --git a/app/gui/oven_control/manualviewerdlg.ui b/app/gui/oven_control/manualviewerdlg.ui index 349a120..8421430 100644 --- a/app/gui/oven_control/manualviewerdlg.ui +++ b/app/gui/oven_control/manualviewerdlg.ui @@ -11,7 +11,7 @@ - #centralwidget { background-image: url(:/images/background/config_service.png); } + #centralwidget { background-image: url(:/images/background/original.png); } #bottomBar { background-image: url(:/images/bottom_bar/background.png); } #midwidget { background-image: url(:/images/config/service/realtime_parts_bgnd.png); } @@ -20,82 +20,13 @@ 0 0 - 1555 + 900 1600 - - - - 0 - 0 - 900 - 426 - - - - - #clockContainer { background-image: url(:/images/clock/background.png); } - - - - - 272 - 36 - 356 - 355 - - - - - - - 800 - 320 - 80 - 84 - - - - - - - 780 - 230 - 101 - 90 - - - - - - - 780 - 160 - 108 - 67 - - - - - - - 20 - 310 - 600 - 100 - - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - @@ -108,7 +39,7 @@ - 343 + 401 26 97 97 @@ -132,52 +63,63 @@ QPushButton:pressed, QPushButton:focus{ border-image: url(:/images/bottom_bar/ba - 30 - 425 - 840 - 1021 + 0 + 5 + 901 + 1441 - TextLabel + - true + false Qt::AlignCenter + + + + 14 + 770 + 100 + 100 + + + + QPushButton { border-image: url(:/images/help/page_prev.png); } +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/help/page_prev_over.png); } + + + + + + + + + 788 + 770 + 100 + 100 + + + + QPushButton { border-image: url(:/images/help/page_next.png); } +QPushButton:pressed , QPushButton:focus { border-image: url(:/images/help/page_next_over.png); } + + + + + - - - Clock - QWidget -
clock.h
- 1 -
- - WashWarnIcon - QLabel -
washwarnicon.h
-
- - DemoIcon - QLabel -
demoicon.h
-
- - HalfEnergyIcon - QLabel -
halfenergyicon.h
-
- - DigitalClock - QLabel -
digitalclock.h
-
-
+ + backButton + leftButton + rightButton + -- 2.1.4