moved icons to qrc file
This commit is contained in:
parent
64400a0e94
commit
639e1b21e2
@ -5,11 +5,15 @@ project(LogoTest LANGUAGES CXX)
|
|||||||
find_package(Qt5Widgets REQUIRED)
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
qt5_wrap_ui(UI_HEADERS
|
qt5_wrap_ui(UI_HEADERS
|
||||||
mainwindow.ui
|
mainwindow.ui
|
||||||
MetaDataWidget.ui
|
MetaDataWidget.ui
|
||||||
)
|
)
|
||||||
|
qt5_add_resources(UI_RESOURCES
|
||||||
|
mainwindow.qrc
|
||||||
|
)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
LogoTest.cpp
|
LogoTest.cpp
|
||||||
@ -18,6 +22,7 @@ add_executable(${PROJECT_NAME}
|
|||||||
mainwindow.cpp
|
mainwindow.cpp
|
||||||
MetaDataWidget.cpp
|
MetaDataWidget.cpp
|
||||||
${UI_HEADERS}
|
${UI_HEADERS}
|
||||||
|
${UI_RESOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME}
|
set_target_properties(${PROJECT_NAME}
|
||||||
|
BIN
source/images/document-open.png
Normal file
BIN
source/images/document-open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 612 B |
BIN
source/images/document-save-as.png
Normal file
BIN
source/images/document-save-as.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -17,13 +17,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
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->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);
|
ui->metaDataWidget->setModel(&m_dataModel->m_metaData);
|
||||||
}
|
}
|
||||||
|
6
source/mainwindow.qrc
Normal file
6
source/mainwindow.qrc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource>
|
||||||
|
<file>images/document-open.png</file>
|
||||||
|
<file>images/document-save-as.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
@ -52,8 +52,8 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&File</string>
|
<string>&File</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="actionOpen"/>
|
||||||
<addaction name="actionSave_as"/>
|
<addaction name="actionSave_as"/>
|
||||||
<addaction name="actionLoad"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -68,20 +68,34 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<addaction name="actionOpen"/>
|
||||||
<addaction name="actionSave_as"/>
|
<addaction name="actionSave_as"/>
|
||||||
<addaction name="actionLoad"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<action name="actionSave_as">
|
<action name="actionSave_as">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="mainwindow.qrc">
|
||||||
|
<normaloff>:/images/document-save-as.png</normaloff>:/images/document-save-as.png</iconset>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Save as...</string>
|
<string>Save as...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Save as...</string>
|
<string>Save as...</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+S</string>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionLoad">
|
<action name="actionOpen">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="mainwindow.qrc">
|
||||||
|
<normaloff>:/images/document-open.png</normaloff>:/images/document-open.png</iconset>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load</string>
|
<string>Open</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+O</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
@ -93,6 +107,8 @@
|
|||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="mainwindow.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Reference in New Issue
Block a user