Volker Krause
516d2b9733
Change wallpaper enums to be in namespaces rather than in gadgets
...
Qt 6 no longer allows exporting gadgets with an uppercase name. Namespaces
work just as well here, but we unfortunately have this problem also in
other places where the solution is less straightforward.
4 years ago
Fushan Wen
51107d9ab4
wallpapers/image: add current image to list if it's not in list
...
The current wallpaper image can be set by a Plasma script. In that case,
the wallpaper is not added to the list, so also check the current image
is already added after opening the config dialog.
BUG: 458364
FIXED-IN: 5.26
4 years ago
Alexander Lohnau
a459530c85
Convert metadata.desktop file of tests to json
4 years ago
Fushan Wen
cad08926cc
wallpapers/image: try to extract image metadata if available
...
Currently title, author and resolution are extracted.
4 years ago
Volker Krause
0e5dae1067
Fix Qt6 build regressions
4 years ago
Nicolas Fella
5c3cb86733
Add missing include
4 years ago
Fushan Wen
2339ea9bb6
wallpapers/image: force reload wallpaper after target size changes
...
When the target size changes while the provider type is single image
or the current wallpaper is animated, the frontend is required to force
update the wallpaper.
4 years ago
Fushan Wen
fd3ef7c318
shell: add images_dark definition in WallpaperPackage
4 years ago
Fushan Wen
c1fb3388a1
wallpapers/image: remove unused QScreen header
4 years ago
Fushan Wen
6e43d46981
wallpapers/image: add animated image support
...
FEATURE: 454984
FIXED-IN: 5.26
4 years ago
Fushan Wen
013ad03370
wallpapers/image: add `MaximizedWindowMonitor` to monitor maximized window
...
This class monitors if there is any maximized window. It is used by
the animated image component.
4 years ago
Fushan Wen
c109dc8b36
wallpapers/image: use `m_formattedSource` in `determineProviderType`
...
No need to call formatUrl again.
4 years ago
Fushan Wen
25aaec219e
wallpapers/image: store formatted source url
...
No need to call formatUrl every time using it.
4 years ago
Fushan Wen
0dbcba3dec
wallpapers/image: replace `openFolder` with `Qt.openUrlExternally`
...
This makes ImageBackend lighter.
4 years ago
Fushan Wen
f246bf2938
wallpapers/image: remove unused imports and member variables in `ImageBackend`
4 years ago
Fushan Wen
b4d3e5e01d
wallpapers/image: use `Package::fileUrl` in `findPreferredImageInPackage`
...
This drops a redundant conversion.
4 years ago
Fushan Wen
8b64196342
wallpapers/image: move image part to `MediaProxy` and update `ImageBackendTest`
...
This simplifies ImageBackend, and makes the config dialog load slightly faster.
4 years ago
Fushan Wen
1ae570e4b3
wallpapers/image: scroll to top after finishing adding images using file dialog
...
CCBUG: 455129
4 years ago
Fushan Wen
e7e70ec525
wallpapers/image: update dark wallpaper test
...
A KPackage wallpaper containing a dark variant is added to the test
data.
CCBUG: 207976
4 years ago
Fushan Wen
fa8abc5066
wallpapers/image: show light&&dark images side by side in previews
...
CCBUG: 207976
4 years ago
Fushan Wen
909a7ad979
wallpapers/image: increase cache size to 30
4 years ago
Fushan Wen
f106e61c5e
wallpapers/image: add dark wallpaper support for KPackage wallpapers
...
Dark wallpapers are put in contents/images_dark folder. The dark
wallpaper will be used when system color scheme is dark.
FEATURE: 207976
FIXED-IN: 5.26
4 years ago
Fushan Wen
fbeed51e61
wallpapers/image: fix apply button not being enabled after adding wallpapers
...
Enable the apply button after:
1. Drag and drop
2. Add an image using the file dialog
3. Delete an image that is not the currently selected one
4 years ago
Fushan Wen
9f7c40f26e
wallpapers/image: fix drag and drop in config dialog
...
Use url data type directly, no need to convert url to string.
4 years ago
Fushan Wen
96e3232ae5
wallpapers/image: call `resetCurrentIndex` after the image list is loaded
...
This makes the current image focused again by default.
4 years ago
Fushan Wen
79e5586647
wallpapers/image: update tests
...
A new image is added to the default folder.
CCBUG: 454692
4 years ago
Fushan Wen
9a26576683
wallpapers/image: use url argument type in `addUsersWallpaper`
...
The hash sign # will be converted to % when using string argument type.
CCBUG: 454692
4 years ago
Fushan Wen
31b7090224
wallpapers/image: use string data type for `image` property
...
`wallpaper.configuration.Image` has string type, and assigning a string
value from QML to a url in C++ will truncate the string at the hash char.
This changes `image` data type to string to fix the bug.
BUG: 454692
FIXED-IN: 5.26
4 years ago
Volker Krause
0cb48a1e96
Explicitly create QFileInfo from QString
...
Qt6 doesn't allows this implicitly anymore.
4 years ago
Volker Krause
74614801ae
Add various missing includes and link libraries
...
Those are no longer pulled in indirectly with KF deprecation level 5.94.
4 years ago
Fushan Wen
97a9a98ec5
wallpapers/image: Use QStringLiteral
4 years ago
Fushan Wen
f921af3e4e
wallpapers/image: Register KFileItem in registerTypes()
4 years ago
Fushan Wen
b23fa2d92d
wallpapers/image: Remove BackgroundListModel
4 years ago
Fushan Wen
451a6a0733
wallpapaers/image: Add autotests for ImageBackend
...
Use Qt Quick Test to test the backend can provide correct model images.
4 years ago
Fushan Wen
4e83485718
wallpapers/image: Adapt to model changes in ImageBackend and QML frontend
4 years ago
Fushan Wen
d63cf4a76b
wallpapers/image: Add autotests for SlideFilterModel
4 years ago
Fushan Wen
5a607c33b2
wallpapers/image: Add roleNames() in SlideFilterModel
4 years ago
Fushan Wen
cca481b79a
wallpapers/image: Add custom image provider for KPackage wallpapers
...
The url format is image://package/get?dir=<DIR>
DIR is package path.
4 years ago
Fushan Wen
3153540284
wallpapers/image: Add autotest for SlideModel
4 years ago
Fushan Wen
9fab17a67d
wallpapers/image: Rewrite SlideModel based on QConcatenateTablesProxyModel
...
SlideModel is inherited from QConcatenateTablesProxyModel, and its
source model is ImageProxyModel. Each folder will create its
corresponding ImageProxyModel.
4 years ago
Fushan Wen
b1b841a28c
wallpapers/image: Move openContainingFolder to SlideFilterModel
4 years ago
Fushan Wen
59188cf191
wallpapers/image: Add autotest for ImageProxyModel
4 years ago
Fushan Wen
f96b82b122
wallpapers/image: Add ImageProxyModel
...
A proxy model that aggregates data from ImageListModel and PackageListModel.
4 years ago
Fushan Wen
61de99dd64
wallpapers/image: Add autotest for PackageListModel
4 years ago
Fushan Wen
0d68f88850
wallpapers/image: Add PackageListModel
...
List KPackage wallpapers, usually in a folder.
4 years ago
Fushan Wen
c247589f4e
wallpapers/image: Add autotest for ImageListModel
4 years ago
Fushan Wen
d4a1c07a81
wallpapers/image: Add ImageListModel
...
List images that do not belong to any KPackages.
4 years ago
Fushan Wen
78df214f6c
wallpapers/image: Add AbstractImageListModel class
...
This serves as the base class for image list models.
4 years ago
Fushan Wen
9a473c8240
wallpapers/image: Remove testfindpreferredimage
...
It's moved to PackageFinderTest.
4 years ago
Fushan Wen
5ce62bd74c
wallpapers/image: Add autotest for PackageFinder
...
Test PackageFinder can find packages and choose a correct size.
4 years ago