From b857261320b9f7f733ecc5114dc5eee70756ebb3 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 10 May 2017 13:29:24 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=80=EA=B0=80=20=EA=B8=B0=EB=8A=A5=20UI=20?= =?UTF-8?q?=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/cookhistory.cpp | 6 + app/gui/oven_control/cookhistory.h | 15 ++ app/gui/oven_control/cookpanelbutton.cpp | 19 ++ app/gui/oven_control/cookpanelbutton.h | 29 +++ app/gui/oven_control/cookpanelbutton.ui | 121 ++++++++++++ app/gui/oven_control/mainwindow.cpp | 9 + app/gui/oven_control/mainwindow.h | 2 + app/gui/oven_control/oven_control.pro | 14 +- app/gui/oven_control/primewindow.cpp | 26 +++ app/gui/oven_control/primewindow.h | 37 ++++ app/gui/oven_control/primewindow.ui | 317 +++++++++++++++++++++++++++++++ 11 files changed, 592 insertions(+), 3 deletions(-) create mode 100644 app/gui/oven_control/cookhistory.cpp create mode 100644 app/gui/oven_control/cookhistory.h create mode 100644 app/gui/oven_control/cookpanelbutton.cpp create mode 100644 app/gui/oven_control/cookpanelbutton.h create mode 100644 app/gui/oven_control/cookpanelbutton.ui create mode 100644 app/gui/oven_control/primewindow.cpp create mode 100644 app/gui/oven_control/primewindow.h create mode 100644 app/gui/oven_control/primewindow.ui diff --git a/app/gui/oven_control/cookhistory.cpp b/app/gui/oven_control/cookhistory.cpp new file mode 100644 index 0000000..1eb3b2b --- /dev/null +++ b/app/gui/oven_control/cookhistory.cpp @@ -0,0 +1,6 @@ +#include "cookhistory.h" + +CookHistory::CookHistory() +{ + +} diff --git a/app/gui/oven_control/cookhistory.h b/app/gui/oven_control/cookhistory.h new file mode 100644 index 0000000..4f2d4bb --- /dev/null +++ b/app/gui/oven_control/cookhistory.h @@ -0,0 +1,15 @@ +#ifndef COOKHISTORY_H +#define COOKHISTORY_H + + +class CookHistory +{ + static CookHistory *instance; + + CookHistory(); + +public: + static CookHistory *getInstance(); +}; + +#endif // COOKHISTORY_H diff --git a/app/gui/oven_control/cookpanelbutton.cpp b/app/gui/oven_control/cookpanelbutton.cpp new file mode 100644 index 0000000..42e0c1b --- /dev/null +++ b/app/gui/oven_control/cookpanelbutton.cpp @@ -0,0 +1,19 @@ +#include "cookpanelbutton.h" +#include "ui_cookpanelbutton.h" + +CookPanelButton::CookPanelButton(QWidget *parent) : + QWidget(parent), + ui(new Ui::CookPanelButton) +{ + ui->setupUi(this); +} + +CookPanelButton::~CookPanelButton() +{ + delete ui; +} + +void CookPanelButton::setText(QString text) +{ + ui->pushButton->setText(text); +} diff --git a/app/gui/oven_control/cookpanelbutton.h b/app/gui/oven_control/cookpanelbutton.h new file mode 100644 index 0000000..51e35db --- /dev/null +++ b/app/gui/oven_control/cookpanelbutton.h @@ -0,0 +1,29 @@ +#ifndef COOKPANELBUTTON_H +#define COOKPANELBUTTON_H + +#include + +namespace Ui { +class CookPanelButton; +} + +class CookPanelButton : public QWidget +{ + Q_OBJECT + +signals: + void clicked(QWidget *); + void showInfoRequested(QWidget *); + void deleteRequested(QWidget *); + +public: + explicit CookPanelButton(QWidget *parent = 0); + ~CookPanelButton(); + + void setText(QString text); + +private: + Ui::CookPanelButton *ui; +}; + +#endif // COOKPANELBUTTON_H diff --git a/app/gui/oven_control/cookpanelbutton.ui b/app/gui/oven_control/cookpanelbutton.ui new file mode 100644 index 0000000..6d8677d --- /dev/null +++ b/app/gui/oven_control/cookpanelbutton.ui @@ -0,0 +1,121 @@ + + + CookPanelButton + + + + 0 + 0 + 821 + 65 + + + + + 0 + 0 + + + + + 821 + 65 + + + + Form + + + QPushButton { +background-position: center; +background-repeat: no-repeat; +border: none; +} + + + + + 0 + 0 + 821 + 65 + + + + + 0 + 0 + + + + + 821 + 65 + + + + + 821 + 65 + + + + + Roboto + 11 + + + + QPushButton { +background-image: url(:/images/etc/bar_03.png); +color: white; +text-align: left; +padding: 0px 40px; +} +QPushButton:pressed { background-image: url(:/images/etc/bar_02.png); } +QPushButton:focus { background-image: url(:/images/etc/bar_02.png); } + + + + + + + + + 670 + 0 + 70 + 65 + + + + QPushButton { background-image: url(:/images/etc/bar_icon_01.png); } +QPushButton:pressed { background-image: url(:/images/etc/bar_icon_01_ov.png); } +QPushButton:focus { background-image: url(:/images/etc/bar_icon_01_ov.png); } + + + + + + + + + 750 + 0 + 60 + 65 + + + + QPushButton { background-image: url(:/images/etc/bar_icon_02.png); } +QPushButton:pressed { background-image: url(:/images/etc/bar_icon_02_ov.png); } +QPushButton:focus { background-image: url(:/images/etc/bar_icon_02_ov.png); } + + + + + + + + + diff --git a/app/gui/oven_control/mainwindow.cpp b/app/gui/oven_control/mainwindow.cpp index f8f4679..b3fcf5c 100644 --- a/app/gui/oven_control/mainwindow.cpp +++ b/app/gui/oven_control/mainwindow.cpp @@ -13,6 +13,7 @@ #include "washwindow.h" #include "engineermenuwindow.h" #include "programmingwindow.h" +#include "primewindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), @@ -92,6 +93,14 @@ void MainWindow::on_etcButton_clicked() showAutoCookSelectionWindow(Define::Etc); } +void MainWindow::on_primeButton_clicked() +{ + PrimeWindow *w = new PrimeWindow(this); + w->setWindowModality(Qt::WindowModal); + w->showFullScreen(); + w->raise(); +} + void MainWindow::on_washButton_clicked() { WashWindow *w = new WashWindow(this); diff --git a/app/gui/oven_control/mainwindow.h b/app/gui/oven_control/mainwindow.h index f2bf39e..82bfd4f 100644 --- a/app/gui/oven_control/mainwindow.h +++ b/app/gui/oven_control/mainwindow.h @@ -41,6 +41,8 @@ private slots: void on_programmingButton_clicked(); + void on_primeButton_clicked(); + private: Ui::MainWindow *ui; }; diff --git a/app/gui/oven_control/oven_control.pro b/app/gui/oven_control/oven_control.pro index 70b1c08..1ea4a01 100644 --- a/app/gui/oven_control/oven_control.pro +++ b/app/gui/oven_control/oven_control.pro @@ -66,7 +66,10 @@ SOURCES += main.cpp\ configpanelbutton.cpp \ config.cpp \ basicsettingwindow.cpp \ - programmingwindow.cpp + programmingwindow.cpp \ + primewindow.cpp \ + cookpanelbutton.cpp \ + cookhistory.cpp HEADERS += mainwindow.h \ cook.h \ @@ -122,7 +125,10 @@ HEADERS += mainwindow.h \ configpanelbutton.h \ config.h \ basicsettingwindow.h \ - programmingwindow.h + programmingwindow.h \ + primewindow.h \ + cookpanelbutton.h \ + cookhistory.h FORMS += mainwindow.ui \ manualcookwindow.ui \ @@ -156,7 +162,9 @@ FORMS += mainwindow.ui \ yesnopopupdlg.ui \ configpanelbutton.ui \ basicsettingwindow.ui \ - programmingwindow.ui + programmingwindow.ui \ + primewindow.ui \ + cookpanelbutton.ui RESOURCES += \ resources.qrc diff --git a/app/gui/oven_control/primewindow.cpp b/app/gui/oven_control/primewindow.cpp new file mode 100644 index 0000000..8aba297 --- /dev/null +++ b/app/gui/oven_control/primewindow.cpp @@ -0,0 +1,26 @@ +#include "primewindow.h" +#include "ui_primewindow.h" + +#include "cookpanelbutton.h" + +PrimeWindow::PrimeWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::PrimeWindow) +{ + ui->setupUi(this); + + ui->clockContainer->setParent(ui->upperStack); + setAttribute(Qt::WA_DeleteOnClose); + + ui->verticalScrollLayout->setAlignment(Qt::AlignTop); +} + +PrimeWindow::~PrimeWindow() +{ + delete ui; +} + +void PrimeWindow::on_backButton_clicked() +{ + close(); +} diff --git a/app/gui/oven_control/primewindow.h b/app/gui/oven_control/primewindow.h new file mode 100644 index 0000000..b8968a1 --- /dev/null +++ b/app/gui/oven_control/primewindow.h @@ -0,0 +1,37 @@ +#ifndef PRIMEWINDOW_H +#define PRIMEWINDOW_H + +#include + +#include + +namespace Ui { +class PrimeWindow; +} + +class PrimeWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit PrimeWindow(QWidget *parent = 0); + ~PrimeWindow(); + +private slots: +// void showMostCooked(); +// void showRecents(); +// void showFavorites(); +// void array(); + +// void onInfoButtonClicked(QWidget *entry); +// void onDeleteButtonClicked(QWidget *entry); + + void on_backButton_clicked(); + +private: + Ui::PrimeWindow *ui; + + QList list; +}; + +#endif // PRIMEWINDOW_H diff --git a/app/gui/oven_control/primewindow.ui b/app/gui/oven_control/primewindow.ui new file mode 100644 index 0000000..461109c --- /dev/null +++ b/app/gui/oven_control/primewindow.ui @@ -0,0 +1,317 @@ + + + PrimeWindow + + + + 0 + 0 + 900 + 1600 + + + + MainWindow + + + #centralwidget { background-image: url(:/images/background/etc.png); } +#bottomBar { background-image: url(:/images/bottom_bar/background.png); } +QScrollArea { background: transparent; } +QScrollArea > QWidget > QWidget { background: transparent; } + +QPushButton[style="mode"] { +background-repeat: no-repeat; +background-position: center; +background-clip: border; +background-origin: border; +margin-bottom: 50px; + +border-top: 130px; +border-bottom: -50px; +border-style: hidden; +color: white; +font-size: 30px; +} + +QPushButton[style="mode"]:checked { +image: url(:/images/cook_mode/indicator.png); +image-position: bottom; +} + +QScrollBar:vertical { +border: none; +background: transparent; +width: 35px; +margin: 30px 15px 30px 0px; +} +QScrollBar::handle:vertical { +background: #B7B7B7; +border-radius: 10px; +min-height: 100px; +} +QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { +border: none; +background: none; +height: 0px; +} +QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { +border: none; +} +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { +background: none; +} + + + + + + 0 + 426 + 900 + 221 + + + + + 0 + + + + + + 0 + 0 + + + + QPushButton { background-image: url(:/images/etc/main_btn_04.png); } +QPushButton:pressed { background-image: url(:/images/etc/main_btn_04_ov.png); } + + + 선호 요리 + + + true + + + true + + + mode + + + + + + + + 0 + 0 + + + + QPushButton { background-image: url(:/images/etc/main_btn_03.png); } +QPushButton:pressed { background-image: url(:/images/etc/main_btn_03_ov.png); } + + + 최근 요리 + + + true + + + true + + + mode + + + + + + + + 0 + 0 + + + + QPushButton { background-image: url(:/images/etc/main_btn_05.png); } +QPushButton:pressed { background-image: url(:/images/etc/main_btn_05_ov.png); } + + + 즐겨찾기 + + + true + + + true + + + mode + + + + + + + + + 0 + 1450 + 900 + 150 + + + + + + 232 + 26 + 97 + 97 + + + + QPushButton { border-image: url(:/images/bottom_bar/back.png); } +QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); } + + + + + + + + + 458 + 26 + 97 + 97 + + + + QPushButton { border-image: url(:/images/bottom_bar/wash.png); } +QPushButton:pressed { border-image: url(:/images/bottom_bar/wash_ov.png); } + + + + + + + + + 571 + 26 + 97 + 97 + + + + QPushButton { border-image: url(:/images/bottom_bar/help.png); } +QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); } + + + + + + + + + 345 + 26 + 97 + 97 + + + + + 0 + 0 + + + + QPushButton { border-image: url(:/images/bottom_bar/config.png); } +QPushButton:pressed { border-image: url(:/images/bottom_bar/config_ov.png); } + + + + + + + + + + 0 + 0 + 900 + 426 + + + + + #clockContainer { background-image: url(:/images/clock/background.png); } + + + + + 272 + 36 + 356 + 355 + + + + + + + + + + 0 + 645 + 900 + 805 + + + + true + + + + + 0 + 0 + 898 + 803 + + + + + 10 + + + 20 + + + 30 + + + 30 + + + + + + + + + Clock + QWidget +
clock.h
+ 1 +
+
+ + +
-- 2.1.4