Skip to content

Commit

Permalink
add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangxw committed Oct 22, 2014
1 parent 8903b00 commit fd8dc28
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ set (CMAKE_INCLUDE_CURRENT_DIR ON)
set (${PROJECT_NAME}_HEADERS mainwindow.h)
set (${PROJECT_NAME}_SOURCES main.cpp mainwindow.cpp)
qt5_wrap_ui (${PROJECT_NAME}_UIS ui/mainwindow.ui)
qt5_add_resources (${PROJECT_NAME}_QRC images.qrc)

add_executable (${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
${${PROJECT_NAME}_UIS})
${${PROJECT_NAME}_UIS}
${${PROJECT_NAME}_QRC})
target_link_libraries (${PROJECT_NAME} Qt5::Widgets)
install (TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION /usr/bin/)
install (FILES images/saliency-marker.png
DESTINATION /usr/share/icons/hicolor/64x64/apps/)
install (FILES images/saliency-marker.svg
DESTINATION /usr/share/icons/hicolor/scalable/apps/)
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
saliency-marker (0.1.3) unstable; urgency=medium

* add icon

-- xiangxw <[email protected]> Wed, 22 Oct 2014 15:31:40 +0800

saliency-marker (0.1.2) unstable; urgency=medium

* install to /usr/bin
Expand Down
6 changes: 6 additions & 0 deletions images.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>images/saliency-marker.png</file>
<file>images/saliency-marker.svg</file>
</qresource>
</RCC>
Binary file added images/saliency-marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions images/saliency-marker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "mainwindow.h"
#include <QApplication>
#include <QIcon>

int main(int argc, char **argv)
{
QApplication app(argc, argv);
MainWindow win;

app.setWindowIcon(QIcon(":images/saliency-marker.svg"));
win.show();
return app.exec();
}
10 changes: 10 additions & 0 deletions saliency-marker.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Name=saliency-marker
Comment=Saliency Marker
TryExec=saliency-marker
Exec=saliency-marker
Icon=saliency-marker
Terminal=false
Type=Application
Categories=Education;Qt;

0 comments on commit fd8dc28

Please sign in to comment.