Initial steps to keep library in a database.
authorAkos Polster <akos@pipacs.com>
Thu, 7 Oct 2010 23:47:29 +0000 (01:47 +0200)
committerAkos Polster <akos@pipacs.com>
Thu, 7 Oct 2010 23:47:29 +0000 (01:47 +0200)
bookview.cpp
dorian.pro
mainwindow.cpp
model/ncxhandler.h
pkg/changelog
pkg/version.txt
widgets/adopterwindow.cpp
widgets/translucentbutton.cpp

index c665865..dbc9ab9 100644 (file)
 #include "trace.h"
 #include "progress.h"
 
-#ifdef Q_WS_MAC
-#   define ICON_PREFIX ":/icons/mac/"
-#else
-#   define ICON_PREFIX ":/icons/"
-#endif
-
 BookView::BookView(QWidget *parent):
     QWebView(parent), contentIndex(-1), mBook(0),
     restorePositionAfterLoad(false), positionAfterLoad(0), loaded(false),
index 72a6be6..a131804 100644 (file)
@@ -30,7 +30,8 @@ SOURCES += \
     model/bookfinder.cpp \
     widgets/listwindow.cpp \
     widgets/progress.cpp \
-    widgets/adopterwindow.cpp
+    widgets/adopterwindow.cpp \
+    platform.cpp
 
 HEADERS += \
     mainwindow.h \
@@ -63,7 +64,8 @@ HEADERS += \
     widgets/progress.h \
     widgets/adopterwindow.h \
     widgets/listview.h \
-    model/xmlhandler.h
+    model/xmlhandler.h \
+    platform.h
 
 RESOURCES += \
     dorian.qrc
index 6511bd9..40fa621 100755 (executable)
 #   include "modeltest.h"
 #endif
 
-#ifdef Q_WS_MAC
-#   define ICON_PREFIX ":/icons/mac/"
-#else
-#   define ICON_PREFIX ":/icons/"
-#endif
-
 const int PROGRESS_HEIGHT = 17;
 static const char *DORIAN_VERSION =
 #include "pkg/version.txt"
index 2da3633..8d5947f 100644 (file)
@@ -20,7 +20,7 @@ public:
         if (name == "text") {
             contentTitle = currentText;
         } else if (name == "navPoint") {
-            qDebug() << "BcxHander::endElement: url" << contentUrl << "title"
+            qDebug() << "NcxHander::endElement: url" << contentUrl << "title"
                     << contentTitle << "id" << contentId;
             Book::ContentItem item;
             item.href = contentUrl;
index 7eee2bc..b0eb939 100644 (file)
@@ -1,3 +1,9 @@
+dorian (0.2.3-1) unstable; urgency=low
+
+  * Keep library data in database
+
+ -- Akos Polster <akos@pipacs.com>  Thu,  8 Oct 2010 02:00:00 +0200
+
 dorian (0.2.2-1) unstable; urgency=low
 
   * Speed up book parsing
index 92195dc..b5160a7 100644 (file)
@@ -1 +1 @@
-"0.2.2"
+"0.2.3"
index 0c734c0..6e0eb96 100644 (file)
@@ -7,14 +7,9 @@
 #endif // Q_WS_MAEMO_5
 
 #include "adopterwindow.h"
+#include "platform.h"
 #include "trace.h"
 
-#ifdef Q_WS_MAC
-#   define ICON_PREFIX ":/icons/mac/"
-#else
-#   define ICON_PREFIX ":/icons/"
-#endif
-
 AdopterWindow::AdopterWindow(QWidget *parent):
         QMainWindow(parent), grabbingZoomKeys(false), mainChild(0)
 {
@@ -138,8 +133,8 @@ QAction *AdopterWindow::addToolBarAction(QObject *receiver,
     Trace t("AdopterWindow::addToolBarAction");
     qDebug() << "icon" << iconName << "text" << text;
 #ifndef Q_OS_SYMBIAN
-    return toolBar->addAction(QIcon(ICON_PREFIX + iconName + ".png"), text,
-                              receiver, member);
+    return toolBar->addAction(QIcon(Platform::icon(iconName)),
+                              text, receiver, member);
 #else
     Q_UNUSED(iconName);
     QAction *action = new QAction(text, this);
index 73fb2d6..d643df2 100644 (file)
@@ -1,14 +1,9 @@
 #include <QtGui>
 
 #include "translucentbutton.h"
+#include "platform.h"
 #include "trace.h"
 
-#ifdef Q_WS_MAC
-#   define ICON_PREFIX ":/icons/mac/"
-#else
-#   define ICON_PREFIX ":/icons/"
-#endif
-
 const int TranslucentButton::pixels = 95;
 
 TranslucentButton::TranslucentButton(const QString &name_, QWidget *parent):
@@ -26,7 +21,7 @@ void TranslucentButton::paintEvent(QPaintEvent *)
     QPainter painter(this);
     if (!transparent) {
         painter.setRenderHint(QPainter::Antialiasing, true);
-        painter.drawPixmap(0, 0, QPixmap(ICON_PREFIX + name + ".png").scaled(
+        painter.drawPixmap(0, 0, QPixmap(Platform::icon(name)).scaled(
                 QSize(pixels, pixels), Qt::IgnoreAspectRatio,
                 Qt::SmoothTransformation));
     } else {