1 // vim: set tabstop=4 shiftwidth=4 expandtab: 2 /* 3 Gwenview: an image viewer 4 Copyright 2008 Aurélien Gâteau <agateau@kde.org> 5 6 This program is free software; you can redistribute it and/or 7 modify it under the terms of the GNU General Public License 8 as published by the Free Software Foundation; either version 2 9 of the License, or (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA. 19 20 */ 21 #ifndef GVCORE_H 22 #define GVCORE_H 23 24 // Qt 25 #include <QObject> 26 27 // KF 28 29 // Local 30 31 class KJob; 32 class QUrl; 33 34 class QAbstractItemModel; 35 class QPalette; 36 class QString; 37 38 namespace Gwenview 39 { 40 class AbstractSemanticInfoBackEnd; 41 class MainWindow; 42 class SortedDirModel; 43 44 struct GvCorePrivate; 45 class GvCore : public QObject 46 { 47 Q_OBJECT 48 public: 49 GvCore(MainWindow *mainWindow, SortedDirModel *); 50 ~GvCore() override; 51 52 enum PaletteType { 53 NormalPalette = 0, 54 NormalViewPalette, 55 FullScreenPalette, 56 FullScreenViewPalette, 57 }; 58 59 QAbstractItemModel *recentFoldersModel() const; 60 QAbstractItemModel *recentFilesModel() const; 61 SortedDirModel *sortedDirModel() const; 62 AbstractSemanticInfoBackEnd *semanticInfoBackEnd() const; 63 64 void addUrlToRecentFolders(QUrl); 65 void addUrlToRecentFiles(const QUrl &); 66 void clearRecentFilesAndFolders(); 67 68 QPalette palette(PaletteType type) const; 69 QString fullScreenPaletteName() const; 70 71 public Q_SLOTS: 72 void saveAll(); 73 void save(const QUrl &); 74 void saveAs(const QUrl &); 75 void rotateLeft(const QUrl &); 76 void rotateRight(const QUrl &); 77 void setRating(const QUrl &, int); 78 79 private Q_SLOTS: 80 void slotConfigChanged(); 81 void slotSaveResult(KJob *); 82 83 private: 84 GvCorePrivate *const d; 85 }; 86 87 } // namespace 88 89 #endif /* GVCORE_H */ 90