changeset 50:07744e276579

Add icon also for non Windows systems
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 07 May 2015 10:37:07 +0200
parents 60cee4bdee5b
children a83d6ca52aac
files src/CMakeLists.txt src/folderselectdialog.cpp src/icons/icons.qrc src/l10n/main_de_DE.ts src/mainwindow.cpp
diffstat 5 files changed, 31 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/CMakeLists.txt	Thu May 07 10:23:19 2015 +0200
+++ b/src/CMakeLists.txt	Thu May 07 10:37:07 2015 +0200
@@ -58,8 +58,8 @@
 endif()
 
 set(QT_RESOURCES
-   ${CMAKE_CURRENT_SOURCE_DIR}/fonts.qrc
-   #   ${CMAKE_SOURCE_DIR}/img/icons.qrc
+   fonts.qrc
+   icons/icons.qrc
 )
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
--- a/src/folderselectdialog.cpp	Thu May 07 10:23:19 2015 +0200
+++ b/src/folderselectdialog.cpp	Thu May 07 10:37:07 2015 +0200
@@ -46,6 +46,10 @@
         mPathLabel->setText("<b>" + pathLabel + ":</b>   ");
     }
     setFolder(mCurFolder);
+#ifndef Q_OS_WIN
+    QIcon windowIcon = QIcon(":/icon-64.png");
+    setWindowIcon(windowIcon);
+#endif
 }
 
 void FolderSelectDialog::setupGUI() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/icons/icons.qrc	Thu May 07 10:37:07 2015 +0200
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file alias="icon-64.png">64_icon.png</file>
+</qresource>
+</RCC>
--- a/src/l10n/main_de_DE.ts	Thu May 07 10:23:19 2015 +0200
+++ b/src/l10n/main_de_DE.ts	Thu May 07 10:37:07 2015 +0200
@@ -17,32 +17,32 @@
 <context>
     <name>FolderSelectDialog</name>
     <message>
-        <location filename="../folderselectdialog.cpp" line="61"/>
+        <location filename="../folderselectdialog.cpp" line="63"/>
         <source>Select folder</source>
         <translation>Ordner auswählen</translation>
     </message>
     <message>
-        <location filename="../folderselectdialog.cpp" line="73"/>
+        <location filename="../folderselectdialog.cpp" line="75"/>
         <source>Go</source>
         <translation></translation>
     </message>
     <message>
-        <location filename="../folderselectdialog.cpp" line="101"/>
+        <location filename="../folderselectdialog.cpp" line="103"/>
         <source>Ok</source>
         <translation>Ok</translation>
     </message>
     <message>
-        <location filename="../folderselectdialog.cpp" line="169"/>
+        <location filename="../folderselectdialog.cpp" line="171"/>
         <source>The following folders did not match the pattern: %1</source>
         <translation>Die folgenden Order entsprechen nicht dem Schema: %1</translation>
     </message>
     <message>
-        <location filename="../folderselectdialog.cpp" line="171"/>
+        <location filename="../folderselectdialog.cpp" line="173"/>
         <source>Failed to parse some folders.</source>
         <translation>Einige Ordnernamen konnten nicht verarbeitet werden.</translation>
     </message>
     <message>
-        <location filename="../folderselectdialog.cpp" line="195"/>
+        <location filename="../folderselectdialog.cpp" line="197"/>
         <source>Select %1</source>
         <translation>Bitte das %1 auswählen</translation>
     </message>
@@ -50,52 +50,52 @@
 <context>
     <name>MainWindow</name>
     <message>
-        <location filename="../mainwindow.cpp" line="58"/>
+        <location filename="../mainwindow.cpp" line="59"/>
         <source>Player</source>
         <translation>Player</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="59"/>
+        <location filename="../mainwindow.cpp" line="60"/>
         <source>Filter/Details</source>
         <translation>Filter/Details</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="75"/>
+        <location filename="../mainwindow.cpp" line="76"/>
         <source>Error!</source>
         <translation>Fehler!</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="141"/>
+        <location filename="../mainwindow.cpp" line="142"/>
         <source>Failed to access directory: &apos;%1&apos;</source>
         <translation>Auf das Verzeichnis &apos;%1&apos; konnte nicht zugegriffen werden.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="146"/>
+        <location filename="../mainwindow.cpp" line="147"/>
         <source>Failed to access meta data file: &apos;%1&apos;</source>
         <translation>Auf die Metadaten-Datei: &apos;%1&apos; konnte nicht zugegriffen werden.</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="155"/>
+        <location filename="../mainwindow.cpp" line="156"/>
         <source>Parsed: &apos;%1&apos;</source>
         <translation>&apos;%1&apos; eingelesen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="172"/>
+        <location filename="../mainwindow.cpp" line="173"/>
         <source>Showing: &apos;%1&apos;</source>
         <translation>Zeige: &apos;%1&apos;</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="191"/>
+        <location filename="../mainwindow.cpp" line="192"/>
         <source>Persons</source>
         <translation>Personen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="208"/>
+        <location filename="../mainwindow.cpp" line="209"/>
         <source>Exams</source>
         <translation>Prüfungen</translation>
     </message>
     <message>
-        <location filename="../mainwindow.cpp" line="207"/>
+        <location filename="../mainwindow.cpp" line="208"/>
         <source>Root-Path</source>
         <translation>Wurzelverzeichnis</translation>
     </message>
--- a/src/mainwindow.cpp	Thu May 07 10:23:19 2015 +0200
+++ b/src/mainwindow.cpp	Thu May 07 10:37:07 2015 +0200
@@ -45,9 +45,10 @@
     readSettings();
     setAcceptDrops(true);
     setupShortcuts();
-    //QIcon windowIcon = QIcon(":/icon-64.png");
-    //setWindowIcon(windowIcon);
-
+#ifndef Q_OS_WIN
+    QIcon windowIcon = QIcon(":/icon-64.png");
+    setWindowIcon(windowIcon);
+#endif
 }
 
 void MainWindow::setupGUI() {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)