diff --git a/CMakeLists.txt b/CMakeLists.txt index 6178c0d..40b5a9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") add_subdirectory(third-party) -add_definitions(-DCHIAKI_VERSION_MAJOR=${CHIAKI_VERSION_MAJOR} -DCHIAKI_VERSION_MINOR=${CHIAKI_VERSION_MINOR} -DCHIAKI_VERSION_PATCH=${CHIAKI_VERSION_PATCH}) +add_definitions(-DCHIAKI_VERSION_MAJOR=${CHIAKI_VERSION_MAJOR} -DCHIAKI_VERSION_MINOR=${CHIAKI_VERSION_MINOR} -DCHIAKI_VERSION_PATCH=${CHIAKI_VERSION_PATCH} -DCHIAKI_VERSION=\"${CHIAKI_VERSION}\") add_subdirectory(lib) diff --git a/assets/chiaki_simple.svg b/assets/chiaki_simple.svg new file mode 100644 index 0000000..7c27cf7 --- /dev/null +++ b/assets/chiaki_simple.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/gui/res/chiaki.svg b/gui/res/chiaki.svg new file mode 100644 index 0000000..d11bc3a --- /dev/null +++ b/gui/res/chiaki.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/gui/res/resources.qrc b/gui/res/resources.qrc index 98b1d61..2570b1c 100644 --- a/gui/res/resources.qrc +++ b/gui/res/resources.qrc @@ -3,5 +3,6 @@ settings-20px.svg add-24px.svg discover-24px.svg + chiaki.svg diff --git a/gui/src/main.cpp b/gui/src/main.cpp index 3a0150a..ec5ec30 100644 --- a/gui/src/main.cpp +++ b/gui/src/main.cpp @@ -71,7 +71,7 @@ int real_main(int argc, char *argv[]) QApplication app(argc, argv); - Q_INIT_RESOURCE(resources); + QApplication::setWindowIcon(QIcon(":/icons/chiaki.svg")); QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); diff --git a/gui/src/sessionlog.cpp b/gui/src/sessionlog.cpp index b9ddadc..77664d1 100644 --- a/gui/src/sessionlog.cpp +++ b/gui/src/sessionlog.cpp @@ -53,6 +53,8 @@ SessionLog::SessionLog(StreamSession *session, uint32_t level_mask, const QStrin CHIAKI_LOGI(&log, "Logging to file %s", filename.toLocal8Bit().constData()); } } + + CHIAKI_LOGI(&log, "Chiaki Version " CHIAKI_VERSION); } SessionLog::~SessionLog() diff --git a/gui/src/settingsdialog.cpp b/gui/src/settingsdialog.cpp index 17572f2..0f43192 100644 --- a/gui/src/settingsdialog.cpp +++ b/gui/src/settingsdialog.cpp @@ -32,6 +32,21 @@ #include #include + +const char * const about_string = + "

Chiaki

by thestr4ng3r, version " CHIAKI_VERSION + "" + "

This program is free software: you can redistribute it and/or modify " + "it under the terms of the GNU General Public License as published by " + "the Free Software Foundation, either version 3 of the License, or " + "(at your option) any later version.

" + "" + "

This program is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU General Public License for more details.

"; + + SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(parent) { this->settings = settings; @@ -61,6 +76,11 @@ SettingsDialog::SettingsDialog(Settings *settings, QWidget *parent) : QDialog(pa log_directory_label->setReadOnly(true); general_layout->addRow(tr("Log Directory:"), log_directory_label); + auto about_button = new QPushButton(tr("About Chiaki"), this); + general_layout->addRow(about_button); + connect(about_button, &QPushButton::clicked, this, [this]() { + QMessageBox::about(this, tr("About Chiaki"), about_string); + }); // Stream Settings