diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 890ac1e..dd0e16f 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -5,11 +5,15 @@ project(LogoTest LANGUAGES CXX) find_package(Qt5Widgets REQUIRED) set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) qt5_wrap_ui(UI_HEADERS mainwindow.ui MetaDataWidget.ui ) + qt5_add_resources(UI_RESOURCES + mainwindow.qrc +) add_executable(${PROJECT_NAME} LogoTest.cpp @@ -18,6 +22,7 @@ add_executable(${PROJECT_NAME} mainwindow.cpp MetaDataWidget.cpp ${UI_HEADERS} + ${UI_RESOURCES} ) set_target_properties(${PROJECT_NAME} diff --git a/source/images/document-open.png b/source/images/document-open.png new file mode 100644 index 0000000..312e118 Binary files /dev/null and b/source/images/document-open.png differ diff --git a/source/images/document-save-as.png b/source/images/document-save-as.png new file mode 100644 index 0000000..5da8a02 Binary files /dev/null and b/source/images/document-save-as.png differ diff --git a/source/mainwindow.cpp b/source/mainwindow.cpp index 603eee6..c7b709c 100644 --- a/source/mainwindow.cpp +++ b/source/mainwindow.cpp @@ -17,13 +17,8 @@ MainWindow::MainWindow(QWidget *parent) { ui->setupUi(this); - ui->actionSave_as->setIcon(QIcon::fromTheme("document-save-as", - QIcon("/usr/share/gtk-doc/html/gtk2/document-save-as.png"))); - ui->actionLoad->setIcon(QIcon::fromTheme("document-open", - QIcon("/usr/share/gtk-doc/html/gtk2/document-open.png"))); - connect(ui->actionSave_as, SIGNAL(triggered()), this, SLOT(saveAs())); - connect(ui->actionLoad, SIGNAL(triggered()), this, SLOT(load())); + connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(load())); ui->metaDataWidget->setModel(&m_dataModel->m_metaData); } diff --git a/source/mainwindow.qrc b/source/mainwindow.qrc new file mode 100644 index 0000000..5459d85 --- /dev/null +++ b/source/mainwindow.qrc @@ -0,0 +1,6 @@ + + + images/document-open.png + images/document-save-as.png + + diff --git a/source/mainwindow.ui b/source/mainwindow.ui index f06bd14..b36a315 100644 --- a/source/mainwindow.ui +++ b/source/mainwindow.ui @@ -52,8 +52,8 @@ &File + - @@ -68,20 +68,34 @@ false + - + + + :/images/document-save-as.png:/images/document-save-as.png + Save as... Save as... + + Ctrl+S + - + + + + :/images/document-open.png:/images/document-open.png + - Load + Open + + + Ctrl+O @@ -93,6 +107,8 @@ 1 - + + +