File indexing completed on 2024-05-12 15:59:14
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2012 Arjen Hiemstra <ahiemstra@heimr.nl> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef SETTINGS_H 0008 #define SETTINGS_H 0009 0010 #include <QObject> 0011 #include <QString> 0012 0013 #include "krita_sketch_export.h" 0014 0015 class QQuickItem; 0016 class Theme; 0017 0018 class KRITA_SKETCH_EXPORT Settings : public QObject 0019 { 0020 Q_OBJECT 0021 Q_PROPERTY(QString currentFile READ currentFile WRITE setCurrentFile NOTIFY currentFileChanged) 0022 Q_PROPERTY(bool temporaryFile READ isTemporaryFile WRITE setTemporaryFile NOTIFY temporaryFileChanged) 0023 Q_PROPERTY(QQuickItem* focusItem READ focusItem WRITE setFocusItem NOTIFY focusItemChanged) 0024 Q_PROPERTY(QObject* theme READ theme NOTIFY themeChanged) 0025 Q_PROPERTY(QString themeID READ themeID WRITE setThemeID NOTIFY themeChanged) 0026 Q_PROPERTY(QObject* customImageSettings READ customImageSettings NOTIFY customImageSettingsChanged) 0027 0028 public: 0029 explicit Settings( QObject* parent = 0); 0030 virtual ~Settings(); 0031 0032 void setTheme(Theme *theme); 0033 0034 public Q_SLOTS: 0035 0036 0037 QString currentFile() const; 0038 void setCurrentFile(const QString &fileName); 0039 0040 bool isTemporaryFile() const; 0041 void setTemporaryFile(bool temp); 0042 0043 QQuickItem *focusItem(); 0044 void setFocusItem(QQuickItem *item); 0045 0046 QObject* theme() const; 0047 0048 QString themeID() const; 0049 void setThemeID(const QString& id); 0050 0051 QObject* customImageSettings() const; 0052 0053 Q_SIGNALS: 0054 void currentFileChanged(); 0055 void temporaryFileChanged(); 0056 void focusItemChanged(); 0057 void themeChanged(); 0058 void customImageSettingsChanged(); 0059 0060 private: 0061 class Private; 0062 Private* const d; 0063 }; 0064 0065 #endif // SETTINGS_H