diff --git a/RRJClient.pro.user b/RRJClient.pro.user index 367dc7c..6eb8b47 100644 --- a/RRJClient.pro.user +++ b/RRJClient.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -67,7 +67,7 @@ Desktop Qt 5.14.2 MinGW 64-bit Desktop Qt 5.14.2 MinGW 64-bit qt.qt5.5142.win64_mingw73_kit - 1 + 0 0 0 @@ -299,7 +299,7 @@ false true - E:/Projects/QT/GUIProj/RRJClient/Deploy + E:/Projects/QT/GUIProj/RRJClient/RRJClient 1 diff --git a/main.cpp b/main.cpp index 2f6f9d8..2019ed9 100644 --- a/main.cpp +++ b/main.cpp @@ -2,12 +2,17 @@ #include "updatenotifywidget.h" #include +#include #include int main(int argc, char *argv[]) { QApplication a(argc, argv); - a.setWindowIcon(QIcon("./plane.png")); + + QFile file(":/style.css"); + file.open(QFile::ReadOnly); + a.setStyleSheet(file.readAll()); + a.setWindowIcon(QIcon(":/resource/plane.png")); MainWindow w; UpdateNotifyWidget *notifyWidget = new UpdateNotifyWidget; w.bindNotifyWidget(notifyWidget); diff --git a/mainwindow.cpp b/mainwindow.cpp index 34cb492..0806f5c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2,6 +2,9 @@ #include "ui_mainwindow.h" #include "updatenotifywidget.h" +#include +#include +#include #include MainWindow::MainWindow(QWidget *parent) @@ -9,6 +12,7 @@ MainWindow::MainWindow(QWidget *parent) , ui(new Ui::MainWindow) { ui->setupUi(this); + painting(); initialize(); } @@ -292,6 +296,7 @@ void MainWindow::debugLog(QString message) ui->debugText->append(message); } + void MainWindow::callUpdateList() { updateController->calculateStreamingHash(); @@ -389,6 +394,20 @@ void MainWindow::checkUpdate() ui->inlineTextDebug->setText(tr("Проверка обновлений...")); } +void MainWindow::painting() +{ +// QPixmap background(":/resource/SSJ-100.jpg"); +// QColor color(77,77,77,255); +// background.scaled(this->size(),Qt::IgnoreAspectRatio); +// QPalette palette; +// palette.setBrush(QPalette::Window,background); +// palette.dark(); +// this->setPalette(palette); + + QFontDatabase::addApplicationFont(":/Fonts/Kanit Cyrillic.ttf"); + +} + MainWindow::~MainWindow() { connectionThread->quit(); diff --git a/mainwindow.h b/mainwindow.h index cf29f09..1355d4b 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -50,7 +50,6 @@ signals: void sigSendAutorization(); bool sigGetConnected(); - private slots: void on_loginButton_clicked(); @@ -91,6 +90,7 @@ private: int filesLoaded; void debugLog(QString message); + void painting(); void initialize(); void updateProgress(); void loadComplete(); diff --git a/mainwindow.ui b/mainwindow.ui index 1077dc2..e0929c8 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -171,6 +171,11 @@ 30 + + + Helvetica Cyr Upright + + Обновить @@ -196,57 +201,6 @@ - - - - 0 - 10 - 171 - 30 - - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Язык - - - - - - - - 0 - 0 - - - - - RUS - - - - - ENG - - - - - - true @@ -367,6 +321,9 @@ Войти + + true + @@ -438,6 +395,9 @@ Сохранить + + true + @@ -554,10 +514,76 @@ Qt::AlignCenter + + + + 0 + 0 + 201 + 30 + + + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + Calibri + 10 + 50 + false + PreferAntialias + + + + Язык/Language + + + + + + + + 0 + 0 + + + + + Helvetica Cyr Upright-Bold + 75 + true + + + + + RUS + + + + + ENG + + + + + + mainFrame layoutWidget - widget diff --git a/resource/Fonts/Kanit Cyrillic.ttf b/resource/Fonts/Kanit Cyrillic.ttf new file mode 100644 index 0000000..7c07272 Binary files /dev/null and b/resource/Fonts/Kanit Cyrillic.ttf differ diff --git a/resource/Fonts/LiberationSans-Regular.ttf b/resource/Fonts/LiberationSans-Regular.ttf new file mode 100644 index 0000000..626dd93 Binary files /dev/null and b/resource/Fonts/LiberationSans-Regular.ttf differ diff --git a/resource/SSJ-100.png b/resource/SSJ-100.png new file mode 100644 index 0000000..35e0229 Binary files /dev/null and b/resource/SSJ-100.png differ diff --git a/plane.png b/resource/plane.png similarity index 100% rename from plane.png rename to resource/plane.png diff --git a/resources.qrc b/resources.qrc index b5183d6..175813b 100644 --- a/resources.qrc +++ b/resources.qrc @@ -1,5 +1,10 @@ - - plane.png + + + resource/plane.png + style.css + resource/SSJ-100.png + resource/Fonts/Kanit Cyrillic.ttf + resource/Fonts/LiberationSans-Regular.ttf diff --git a/style.css b/style.css new file mode 100644 index 0000000..8cdc3e7 --- /dev/null +++ b/style.css @@ -0,0 +1,28 @@ + +QMainWindow +{ + background-image: url(:/resource/SSJ-100.png); + background-position: center; +} + +QPushButton +{ + background-color: rgb(203,228,255); + border-style: outset; + border-radius: 3px; + font-family: "Helvetica Cyr Upright"; + color: rgb(45,84,130); +} + +QLineEdit +{ + border-style: outset; + border-radius: 3px; +} + +#languageTitle +{ + font-family: "Calibri"; + color: white; +} +