Quellcode durchsuchen

Move resource files

Kandrashin Denis vor 13 Jahren
Ursprung
Commit
fe7909d0e1
7 geänderte Dateien mit 54 neuen und 55 gelöschten Zeilen
  1. 3 4
      source/fb2edit.pro
  2. 0 48
      source/fb2edit.qrc
  3. 2 2
      source/fb2main.cpp
  4. 1 1
      source/fb2view.cpp
  5. 48 0
      source/res/fb2edit.qrc
  6. 0 0
      source/res/ts/ru.qm
  7. 0 0
      source/res/ts/ru.ts

+ 3 - 4
source/fb2edit.pro

@@ -13,11 +13,11 @@ SOURCES = \
     fb2view.cpp
 
 RESOURCES = \
-    fb2edit.qrc
+    res/fb2edit.qrc
 
 TARGET = fb2edit
 
-TRANSLATIONS = ts/ru.ts
+TRANSLATIONS = res/ts/ru.ts
 
 VERSION = 0.01.1
 
@@ -26,5 +26,4 @@ QT += webkit
 
 LIBS += -lqscintilla2
 
-OTHER_FILES += \
-    res/style.css
+OTHER_FILES += res/style.css

+ 0 - 48
source/fb2edit.qrc

@@ -1,48 +0,0 @@
-<RCC>
-    <qresource prefix="/">
-        <file>res/16/application-exit.png</file>
-        <file>res/16/document-new.png</file>
-        <file>res/16/document-open.png</file>
-        <file>res/16/document-properties.png</file>
-        <file>res/16/document-save.png</file>
-        <file>res/16/edit-copy.png</file>
-        <file>res/16/edit-cut.png</file>
-        <file>res/16/edit-find.png</file>
-        <file>res/16/edit-find-replace.png</file>
-        <file>res/16/edit-paste.png</file>
-        <file>res/16/edit-redo.png</file>
-        <file>res/16/edit-undo.png</file>
-        <file>res/16/format-text-bold.png</file>
-        <file>res/16/format-text-italic.png</file>
-        <file>res/16/format-text-strikethrough.png</file>
-        <file>res/16/format-text-subscript.png</file>
-        <file>res/16/format-text-superscript.png</file>
-        <file>res/16/window-close.png</file>
-        <file>res/16/zoom-in.png</file>
-        <file>res/16/zoom-original.png</file>
-        <file>res/16/zoom-out.png</file>
-        <file>res/24/application-exit.png</file>
-        <file>res/24/document-new.png</file>
-        <file>res/24/document-open.png</file>
-        <file>res/24/document-properties.png</file>
-        <file>res/24/document-save.png</file>
-        <file>res/24/edit-copy.png</file>
-        <file>res/24/edit-cut.png</file>
-        <file>res/24/edit-find.png</file>
-        <file>res/24/edit-find-replace.png</file>
-        <file>res/24/edit-paste.png</file>
-        <file>res/24/edit-redo.png</file>
-        <file>res/24/edit-undo.png</file>
-        <file>res/24/format-text-bold.png</file>
-        <file>res/24/format-text-italic.png</file>
-        <file>res/24/format-text-strikethrough.png</file>
-        <file>res/24/format-text-subscript.png</file>
-        <file>res/24/format-text-superscript.png</file>
-        <file>res/24/window-close.png</file>
-        <file>res/24/zoom-in.png</file>
-        <file>res/24/zoom-original.png</file>
-        <file>res/24/zoom-out.png</file>
-        <file>res/style.css</file>
-        <file>ts/ru.qm</file>
-    </qresource>
-</RCC>

+ 2 - 2
source/fb2main.cpp

@@ -194,8 +194,8 @@ void Fb2MainWindow::documentWasModified()
 QIcon Fb2MainWindow::icon(const QString &name)
 {
     QIcon icon;
-    icon.addFile(QString(":/res/24/%1.png").arg(name), QSize(24,24));
-    icon.addFile(QString(":/res/16/%1.png").arg(name), QSize(16,16));
+    icon.addFile(QString(":/24/%1.png").arg(name), QSize(24,24));
+    icon.addFile(QString(":/16/%1.png").arg(name), QSize(16,16));
     return QIcon::fromTheme(name, icon);
 }
 

+ 1 - 1
source/fb2view.cpp

@@ -23,7 +23,7 @@ Fb2WebView::Fb2WebView(QWidget *parent)
     settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
     settings->setAttribute(QWebSettings::PluginsEnabled, false);
     settings->setAttribute(QWebSettings::ZoomTextOnly, true);
-    settings->setUserStyleSheetUrl(QUrl::fromLocalFile(":/res/style.css"));
+    settings->setUserStyleSheetUrl(QUrl::fromLocalFile(":style.css"));
     connect(page(), SIGNAL(contentsChanged()), this, SLOT(fixContents()));
 }
 

+ 48 - 0
source/res/fb2edit.qrc

@@ -0,0 +1,48 @@
+<RCC>
+    <qresource prefix="/">
+        <file>16/application-exit.png</file>
+        <file>16/document-new.png</file>
+        <file>16/document-open.png</file>
+        <file>16/document-properties.png</file>
+        <file>16/document-save.png</file>
+        <file>16/edit-copy.png</file>
+        <file>16/edit-cut.png</file>
+        <file>16/edit-find.png</file>
+        <file>16/edit-find-replace.png</file>
+        <file>16/edit-paste.png</file>
+        <file>16/edit-redo.png</file>
+        <file>16/edit-undo.png</file>
+        <file>16/format-text-bold.png</file>
+        <file>16/format-text-italic.png</file>
+        <file>16/format-text-strikethrough.png</file>
+        <file>16/format-text-subscript.png</file>
+        <file>16/format-text-superscript.png</file>
+        <file>16/window-close.png</file>
+        <file>16/zoom-in.png</file>
+        <file>16/zoom-original.png</file>
+        <file>16/zoom-out.png</file>
+        <file>24/application-exit.png</file>
+        <file>24/document-new.png</file>
+        <file>24/document-open.png</file>
+        <file>24/document-properties.png</file>
+        <file>24/document-save.png</file>
+        <file>24/edit-copy.png</file>
+        <file>24/edit-cut.png</file>
+        <file>24/edit-find.png</file>
+        <file>24/edit-find-replace.png</file>
+        <file>24/edit-paste.png</file>
+        <file>24/edit-redo.png</file>
+        <file>24/edit-undo.png</file>
+        <file>24/format-text-bold.png</file>
+        <file>24/format-text-italic.png</file>
+        <file>24/format-text-strikethrough.png</file>
+        <file>24/format-text-subscript.png</file>
+        <file>24/format-text-superscript.png</file>
+        <file>24/window-close.png</file>
+        <file>24/zoom-in.png</file>
+        <file>24/zoom-original.png</file>
+        <file>24/zoom-out.png</file>
+        <file>ts/ru.qm</file>
+        <file>style.css</file>
+    </qresource>
+</RCC>

+ 0 - 0
source/ts/ru.qm → source/res/ts/ru.qm


+ 0 - 0
source/ts/ru.ts → source/res/ts/ru.ts