2 * This file is a part of QComicBook.
4 * Copyright (C) 2005-2006 Pawel Stolowski <yogin@linux.bydg.org>
6 * QComicBook is free software; you can redestribute it and/or modify it
7 * under terms of GNU General Public License by Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY. See GPL for more details.
29 using namespace Utility;
31 class ComicBookSettings: public QObject
67 static QString bkpath; //bookmarks path
68 static QString thpath; //thumbnails cache path
69 static bool dirsok; //is above dirs are ok
71 static const EnumMap<Size> size2string[];
72 //static const EnumMap<Scaling> scaling2string[];
75 void backgroundChanged(const QColor &color);
76 //void scalingMethodChanged(Scaling s);
77 void cursorChanged(bool f);
86 bool smallCursor() const;
87 bool twoPagesMode() const;
88 bool twoPagesStep() const;
89 bool japaneseMode() const;
90 bool continuousScrolling() const;
91 bool scrollbarsVisible() const;
92 QRect geometry() const;
93 Size pageSize() const;
94 //Scaling pageScaling() const;
95 QString lastDir() const;
96 const History& recentlyOpened() const;
97 QColor background() const;
98 int cacheSize() const;
99 bool cacheThumbnails() const;
100 int thumbnailsAge() const;
101 bool preloadPages() const;
102 bool confirmExit() const;
103 bool autoInfo() const;
104 bool fullScreenHideMenu() const;
105 bool fullScreenHideStatusbar() const;
106 bool fullScreenHideToolbar() const;
107 bool showStatusbar() const;
108 bool useInternalBrowser() const;
109 const QFont& infoFont() const;
110 QString externalBrowser() const;
111 void restoreDockLayout(QMainWindow *w);
112 bool editSupport() const;
113 bool showSplash() const;
114 QString tmpDir() const;
116 void smallCursor(bool f);
117 void twoPagesMode(bool f);
118 void twoPagesStep(bool f);
119 void japaneseMode(bool f);
120 void continuousScrolling(bool f);
121 void scrollbarsVisible(bool f);
122 void geometry(const QRect g);
123 void pageSize(Size s);
124 //void pageScaling(Scaling s);
125 void lastDir(const QString &d);
126 void recentlyOpened(const History &hist);
127 void background(const QColor &color);
128 void cacheSize(int s);
129 void cacheThumbnails(bool f);
130 void thumbnailsAge(int n);
131 void preloadPages(bool f);
132 void confirmExit(bool f);
133 void autoInfo(bool f);
134 void fullScreenHideMenu(bool f);
135 void fullScreenHideStatusbar(bool f);
136 void fullScreenHideToolbar(bool f);
137 void showStatusbar(bool f);
138 void useInternalBrowser(bool f);
139 void infoFont(const QFont &f);
140 void externalBrowser(const QString &cmd);
141 void saveDockLayout(QMainWindow *w);
142 void editSupport(bool f);
143 void showSplash(bool f);
144 void tmpDir(const QString &dir);
146 static ComicBookSettings& instance();
149 // checks and creates .qcomicbook/ and cache subdirectories if
151 static bool checkDirs();
152 static const QString& bookmarksDir();
153 static const QString& thumbnailsDir();