Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/image.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 54 | { | |||
---|---|---|---|---|---|
59 | Q_PROPERTY(QUrl wallpaperPath READ wallpaperPath NOTIFY wallpaperPathChanged) | 59 | Q_PROPERTY(QUrl wallpaperPath READ wallpaperPath NOTIFY wallpaperPathChanged) | ||
60 | Q_PROPERTY(QAbstractItemModel *wallpaperModel READ wallpaperModel CONSTANT) | 60 | Q_PROPERTY(QAbstractItemModel *wallpaperModel READ wallpaperModel CONSTANT) | ||
61 | Q_PROPERTY(QAbstractItemModel *slideshowModel READ slideshowModel CONSTANT) | 61 | Q_PROPERTY(QAbstractItemModel *slideshowModel READ slideshowModel CONSTANT) | ||
62 | Q_PROPERTY(int slideTimer READ slideTimer WRITE setSlideTimer NOTIFY slideTimerChanged) | 62 | Q_PROPERTY(int slideTimer READ slideTimer WRITE setSlideTimer NOTIFY slideTimerChanged) | ||
63 | Q_PROPERTY(QStringList usersWallpapers READ usersWallpapers WRITE setUsersWallpapers NOTIFY usersWallpapersChanged) | 63 | Q_PROPERTY(QStringList usersWallpapers READ usersWallpapers WRITE setUsersWallpapers NOTIFY usersWallpapersChanged) | ||
64 | Q_PROPERTY(QStringList slidePaths READ slidePaths WRITE setSlidePaths NOTIFY slidePathsChanged) | 64 | Q_PROPERTY(QStringList slidePaths READ slidePaths WRITE setSlidePaths NOTIFY slidePathsChanged) | ||
65 | Q_PROPERTY(QSize targetSize READ targetSize WRITE setTargetSize NOTIFY targetSizeChanged) | 65 | Q_PROPERTY(QSize targetSize READ targetSize WRITE setTargetSize NOTIFY targetSizeChanged) | ||
66 | Q_PROPERTY(QString photosPath READ photosPath CONSTANT) | 66 | Q_PROPERTY(QString photosPath READ photosPath CONSTANT) | ||
67 | Q_PROPERTY(QStringList uncheckedSlides READ uncheckedSlides WRITE setUncheckedSlides NOTIFY uncheckedSlidesChanged) | ||||
67 | 68 | | |||
68 | public: | 69 | public: | ||
69 | 70 | | |||
70 | enum RenderingMode { | 71 | enum RenderingMode { | ||
71 | SingleImage, | 72 | SingleImage, | ||
72 | SlideShow | 73 | SlideShow | ||
73 | }; | 74 | }; | ||
74 | Q_ENUM(RenderingMode) | 75 | Q_ENUM(RenderingMode) | ||
Show All 12 Lines | |||||
87 | Q_INVOKABLE void openFolder(const QString& path); | 88 | Q_INVOKABLE void openFolder(const QString& path); | ||
88 | 89 | | |||
89 | Q_INVOKABLE void getNewWallpaper(QQuickItem *ctx = nullptr); | 90 | Q_INVOKABLE void getNewWallpaper(QQuickItem *ctx = nullptr); | ||
90 | Q_INVOKABLE void showFileDialog(); | 91 | Q_INVOKABLE void showFileDialog(); | ||
91 | 92 | | |||
92 | Q_INVOKABLE void addUsersWallpaper(const QString &file); | 93 | Q_INVOKABLE void addUsersWallpaper(const QString &file); | ||
93 | Q_INVOKABLE void commitDeletion(); | 94 | Q_INVOKABLE void commitDeletion(); | ||
94 | 95 | | |||
96 | Q_INVOKABLE void toggleSlide(const QString &path, bool checked); | ||||
97 | | ||||
95 | RenderingMode renderingMode() const; | 98 | RenderingMode renderingMode() const; | ||
96 | void setRenderingMode(RenderingMode mode); | 99 | void setRenderingMode(RenderingMode mode); | ||
97 | 100 | | |||
98 | QSize targetSize() const; | 101 | QSize targetSize() const; | ||
99 | void setTargetSize(const QSize &size); | 102 | void setTargetSize(const QSize &size); | ||
100 | 103 | | |||
101 | KPackage::Package *package(); | 104 | KPackage::Package *package(); | ||
102 | 105 | | |||
Show All 12 Lines | |||||
115 | void findPreferedImageInPackage(KPackage::Package &package); | 118 | void findPreferedImageInPackage(KPackage::Package &package); | ||
116 | QString findPreferedImage(const QStringList &images); | 119 | QString findPreferedImage(const QStringList &images); | ||
117 | 120 | | |||
118 | void classBegin() override; | 121 | void classBegin() override; | ||
119 | void componentComplete() override; | 122 | void componentComplete() override; | ||
120 | 123 | | |||
121 | QString photosPath() const; | 124 | QString photosPath() const; | ||
122 | 125 | | |||
126 | QStringList uncheckedSlides() const; | ||||
127 | void setUncheckedSlides(const QStringList &uncheckedSlides); | ||||
128 | | ||||
123 | public Q_SLOTS: | 129 | public Q_SLOTS: | ||
124 | void nextSlide(); | 130 | void nextSlide(); | ||
125 | void removeWallpaper(QString name); | 131 | void removeWallpaper(QString name); | ||
126 | 132 | | |||
127 | Q_SIGNALS: | 133 | Q_SIGNALS: | ||
128 | void settingsChanged(bool); | 134 | void settingsChanged(bool); | ||
129 | void wallpaperPathChanged(); | 135 | void wallpaperPathChanged(); | ||
130 | void renderingModeChanged(); | 136 | void renderingModeChanged(); | ||
131 | void targetSizeChanged(); | 137 | void targetSizeChanged(); | ||
132 | void slideTimerChanged(); | 138 | void slideTimerChanged(); | ||
133 | void usersWallpapersChanged(); | 139 | void usersWallpapersChanged(); | ||
134 | void slidePathsChanged(); | 140 | void slidePathsChanged(); | ||
135 | void resizeMethodChanged(); | 141 | void resizeMethodChanged(); | ||
136 | void customWallpaperPicked(const QString &path); | 142 | void customWallpaperPicked(const QString &path); | ||
143 | void uncheckedSlidesChanged(); | ||||
137 | 144 | | |||
138 | protected Q_SLOTS: | 145 | protected Q_SLOTS: | ||
139 | void showAddSlidePathsDialog(); | 146 | void showAddSlidePathsDialog(); | ||
140 | void wallpaperBrowseCompleted(); | 147 | void wallpaperBrowseCompleted(); | ||
141 | /** | 148 | /** | ||
142 | * Open the current slide in the default image application | 149 | * Open the current slide in the default image application | ||
143 | */ | 150 | */ | ||
144 | void openSlide(); | 151 | void openSlide(); | ||
Show All 29 Lines | 172 | private: | |||
174 | bool m_scanDirty; | 181 | bool m_scanDirty; | ||
175 | QSize m_targetSize; | 182 | QSize m_targetSize; | ||
176 | 183 | | |||
177 | RenderingMode m_mode; | 184 | RenderingMode m_mode; | ||
178 | KPackage::Package m_wallpaperPackage; | 185 | KPackage::Package m_wallpaperPackage; | ||
179 | QStringList m_slideshowBackgrounds; | 186 | QStringList m_slideshowBackgrounds; | ||
180 | QStringList m_unseenSlideshowBackgrounds; | 187 | QStringList m_unseenSlideshowBackgrounds; | ||
181 | QStringList m_slidePaths; | 188 | QStringList m_slidePaths; | ||
189 | QStringList m_uncheckedSlides; | ||||
182 | QTimer m_timer; | 190 | QTimer m_timer; | ||
183 | int m_currentSlide; | 191 | int m_currentSlide; | ||
184 | BackgroundListModel *m_model; | 192 | BackgroundListModel *m_model; | ||
185 | SlideModel* m_slideshowModel; | 193 | SlideModel* m_slideshowModel; | ||
186 | QFileDialog *m_dialog; | 194 | QFileDialog *m_dialog; | ||
187 | QString m_img; | 195 | QString m_img; | ||
188 | QDateTime m_previousModified; | 196 | QDateTime m_previousModified; | ||
189 | QPointer<KNS3::DownloadDialog> m_newStuffDialog; | 197 | QPointer<KNS3::DownloadDialog> m_newStuffDialog; | ||
190 | QString m_findToken; | 198 | QString m_findToken; | ||
191 | }; | 199 | }; | ||
192 | 200 | | |||
193 | #endif | 201 | #endif |