Update About text.
[dorian] / model / library.h
index b32a1b9..1df272b 100644 (file)
@@ -8,7 +8,6 @@
 #include <QStringList>
 
 class QObject;
-class QModelIndex;
 class Book;
 
 /** Library of books. */
@@ -21,6 +20,7 @@ public:
     static void close();
     int rowCount(const QModelIndex &parent = QModelIndex()) const;
     QVariant data(const QModelIndex &index, int role) const;
+    void load();
     void save();
     QModelIndex find(QString path) const;
     QModelIndex find(const Book *book) const;
@@ -28,9 +28,16 @@ public:
     QModelIndex nowReading() const;
     Book *book(const QModelIndex &index);
     QStringList bookPaths();
+    void upgrade();
 
 signals:
     void nowReadingChanged();
+    void beginUpgrade(int total);
+    void upgrading(const QString &book);
+    void endUpgrade();
+    void beginLoad(int total);
+    void loading(const QString &book);
+    void endLoad();
 
 public slots:
     bool add(const QString &path);
@@ -41,12 +48,9 @@ public slots:
 private:
     explicit Library(QObject *parent = 0);
     ~Library();
-    void load();
     void clear();
-    static Library *mInstance;
     QList<Book *> mBooks;
     QModelIndex mNowReading;
-    QStringList mDirectories;
 };
 
 #endif // LIBRARY_H