From acad6b6b379a104761a7121a0513e80f74d23c08 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Wed, 14 Sep 2016 21:52:11 +0300 Subject: [PATCH] (profiler_gui) Added icons and main logo --- profiler_gui/CMakeLists.txt | 2 + profiler_gui/icons/attribution.txt | 4 ++ profiler_gui/icons/logo.svg | 51 ++++++++++++++++++++ profiler_gui/icons/off.svg | 46 ++++++++++++++++++ profiler_gui/icons/open-folder.svg | 41 ++++++++++++++++ profiler_gui/icons/reload.svg | 75 ++++++++++++++++++++++++++++++ profiler_gui/main_window.cpp | 7 ++- profiler_gui/resources.qrc | 8 ++++ 8 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 profiler_gui/icons/attribution.txt create mode 100644 profiler_gui/icons/logo.svg create mode 100644 profiler_gui/icons/off.svg create mode 100644 profiler_gui/icons/open-folder.svg create mode 100644 profiler_gui/icons/reload.svg create mode 100644 profiler_gui/resources.qrc diff --git a/profiler_gui/CMakeLists.txt b/profiler_gui/CMakeLists.txt index 30a2a8f..8a73a86 100644 --- a/profiler_gui/CMakeLists.txt +++ b/profiler_gui/CMakeLists.txt @@ -5,6 +5,7 @@ project(profiler_gui) #set(CMAKE_PREFIX_PATH f:/qt/5.5/5.6/msvc2013_64/lib/cmake) set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt5Widgets REQUIRED) @@ -30,6 +31,7 @@ add_executable(${PROJECT_NAME} #treemodel.cpp #treeitem.h #treeitem.cpp + resources.qrc ) if(UNIX) diff --git a/profiler_gui/icons/attribution.txt b/profiler_gui/icons/attribution.txt new file mode 100644 index 0000000..0c406e6 --- /dev/null +++ b/profiler_gui/icons/attribution.txt @@ -0,0 +1,4 @@ +logo.svg - Icon made by Freepik from www.flaticon.com +off.svg - Icon made by Freepik from www.flaticon.com +open-folder.svg - Icon made by Freepik from www.flaticon.com +reload.svg - Icon made by Freepik from www.flaticon.com \ No newline at end of file diff --git a/profiler_gui/icons/logo.svg b/profiler_gui/icons/logo.svg new file mode 100644 index 0000000..6c3b090 --- /dev/null +++ b/profiler_gui/icons/logo.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiler_gui/icons/off.svg b/profiler_gui/icons/off.svg new file mode 100644 index 0000000..7f18abd --- /dev/null +++ b/profiler_gui/icons/off.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiler_gui/icons/open-folder.svg b/profiler_gui/icons/open-folder.svg new file mode 100644 index 0000000..767696a --- /dev/null +++ b/profiler_gui/icons/open-folder.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiler_gui/icons/reload.svg b/profiler_gui/icons/reload.svg new file mode 100644 index 0000000..fb9034e --- /dev/null +++ b/profiler_gui/icons/reload.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiler_gui/main_window.cpp b/profiler_gui/main_window.cpp index 527dda1..e231ddc 100644 --- a/profiler_gui/main_window.cpp +++ b/profiler_gui/main_window.cpp @@ -61,9 +61,11 @@ const int LOADER_TIMER_INTERVAL = 40; EasyMainWindow::EasyMainWindow() : Parent(), m_treeWidget(nullptr), m_graphicsView(nullptr), m_progress(nullptr) { setObjectName("ProfilerGUI_MainWindow"); - setWindowTitle("EasyProfiler Reader v0.2.0"); + setWindowTitle("EasyProfiler Reader beta"); setDockNestingEnabled(true); resize(800, 600); + + { QIcon icon(":/logo"); if (!icon.isNull()) setWindowIcon(icon); } setStatusBar(new QStatusBar()); @@ -90,13 +92,16 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_treeWidget(nullptr), m_graphicsVi auto action = menu->addAction("&Open"); connect(action, &QAction::triggered, this, &This::onOpenFileClicked); + { QIcon icon(":/Open"); if (!icon.isNull()) action->setIcon(icon); } action = menu->addAction("&Reload"); connect(action, &QAction::triggered, this, &This::onReloadFileClicked); + { QIcon icon(":/Reload"); if (!icon.isNull()) action->setIcon(icon); } menu->addSeparator(); action = menu->addAction("&Exit"); connect(action, &QAction::triggered, this, &This::onExitClicked); + { QIcon icon(":/Exit"); if (!icon.isNull()) action->setIcon(icon); } menuBar()->addMenu(menu); diff --git a/profiler_gui/resources.qrc b/profiler_gui/resources.qrc new file mode 100644 index 0000000..afe3bb1 --- /dev/null +++ b/profiler_gui/resources.qrc @@ -0,0 +1,8 @@ + + + icons/logo.svg + icons/off.svg + icons/open-folder.svg + icons/reload.svg + +