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
71 static QString bkpath; //bookmarks path
72 static QString thpath; //thumbnails cache path
73 static bool dirsok; //is above dirs are ok
75 static const EnumMap<Size> size2string[];
76 //static const EnumMap<Scaling> scaling2string[];
79 void backgroundChanged(const QColor &color);
80 //void scalingMethodChanged(Scaling s);
81 void cursorChanged(bool f);
82 void stripMaxChanged(int sm);
91 bool smallCursor() const;
92 bool twoPagesMode() const;
93 bool twoPagesStep() const;
94 bool twoPagesSpread() const;
95 bool twoPagesSkip() const;
96 bool japaneseMode() const;
97 bool continuousScrolling() const;
98 bool scrollbarsVisible() const;
99 QRect geometry() const;
100 Size pageSize() const;
101 //Scaling pageScaling() const;
102 QString lastDir() const;
103 const History& recentlyOpened() const;
104 QColor background() const;
105 int cacheSize() const;
106 bool cacheThumbnails() const;
107 int thumbnailsAge() const;
108 bool preloadPages() const;
109 bool confirmExit() const;
110 bool autoInfo() const;
111 bool fullScreenHideMenu() const;
112 bool fullScreenHideStatusbar() const;
113 bool fullScreenHideToolbar() const;
114 bool showStatusbar() const;
115 bool useInternalBrowser() const;
116 const QFont& infoFont() const;
117 QString externalBrowser() const;
118 void restoreDockLayout(QMainWindow *w);
119 bool editSupport() const;
120 bool showSplash() const;
121 QString tmpDir() const;
122 bool stripMode() const;
123 int stripMax() const;
125 void smallCursor(bool f);
126 void twoPagesMode(bool f);
127 void twoPagesStep(bool f);
128 void twoPagesSpread(bool f);
129 void twoPagesSkip(bool f);
130 void japaneseMode(bool f);
131 void continuousScrolling(bool f);
132 void scrollbarsVisible(bool f);
133 void geometry(const QRect g);
134 void pageSize(Size s);
135 //void pageScaling(Scaling s);
136 void lastDir(const QString &d);
137 void recentlyOpened(const History &hist);
138 void background(const QColor &color);
139 void cacheSize(int s);
140 void cacheThumbnails(bool f);
141 void thumbnailsAge(int n);
142 void preloadPages(bool f);
143 void confirmExit(bool f);
144 void autoInfo(bool f);
145 void fullScreenHideMenu(bool f);
146 void fullScreenHideStatusbar(bool f);
147 void fullScreenHideToolbar(bool f);
148 void showStatusbar(bool f);
149 void useInternalBrowser(bool f);
150 void infoFont(const QFont &f);
151 void externalBrowser(const QString &cmd);
152 void saveDockLayout(QMainWindow *w);
153 void editSupport(bool f);
154 void showSplash(bool f);
155 void tmpDir(const QString &dir);
156 void stripMode(bool f);
157 void stripMax(int sm);
159 static ComicBookSettings& instance();
162 // checks and creates .qcomicbook/ and cache subdirectories if
164 static bool checkDirs();
165 static const QString& bookmarksDir();
166 static const QString& thumbnailsDir();