Changeset View
Changeset View
Standalone View
Standalone View
src/downloadwidget.h
Show All 38 Lines | |||||
39 | 39 | | |||
40 | /** | 40 | /** | ||
41 | * KNewStuff download widget. | 41 | * KNewStuff download widget. | ||
42 | * | 42 | * | ||
43 | * The download widget will present items to the user | 43 | * The download widget will present items to the user | ||
44 | * for installation, updates and removal. | 44 | * for installation, updates and removal. | ||
45 | * Preview images as well as other meta information can be seen. | 45 | * Preview images as well as other meta information can be seen. | ||
46 | * | 46 | * | ||
47 | * \section knsrc knsrc Files | | |||
48 | * The Dialog is configured by a .knsrc file containing the KHotNewStuff configuration. | | |||
49 | * Your application should install a file called: <em>$KDEDIR/share/config/appname.knsrc</em> | | |||
50 | * | | |||
51 | * The file could look like this for wallpapers: | | |||
52 | * <pre> | | |||
53 | [KNewStuff3] | | |||
54 | ProvidersUrl=https://download.kde.org/ocs/providers.xml | | |||
55 | Categories=KDE Wallpaper 1920x1200,KDE Wallpaper 1600x1200 | | |||
56 | StandardResource=wallpaper | | |||
57 | Uncompress=archive | | |||
58 | * </pre> | | |||
59 | * | | |||
60 | * Uncompress can be one of: always, never or archive: | | |||
61 | * <ol> | | |||
62 | * <li>always: assume all downloaded files are archives and need to be extracted</li> | | |||
63 | * <li>never: never try to extract the file</li> | | |||
64 | * <li>archive: if the file is an archive, uncompress it, otherwise just pass it on</li> | | |||
65 | * <li>subdir: logic as archive, but decompress into a subdirectory named after the payload filename</li> | | |||
66 | * </ol> | | |||
67 | * | | |||
68 | * You have different options to set the target install directory: | | |||
69 | * <ol><li>StandardResource: not available in KF5, use XdgTargetDir instead.</li> | | |||
70 | * <li>TargetDir: since KF5, this is equivalent to XdgTargetDir. | | |||
71 | * <li>XdgTargetDir: a directory in the $XDG_DATA_HOME directory such as <em>.local/share/wallpapers</em>. | | |||
72 | * This is what QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + name will return.</li> | | |||
73 | * </ol> | | |||
74 | * | | |||
75 | * @since 4.5 | 47 | * @since 4.5 | ||
76 | */ | 48 | */ | ||
77 | class KNEWSTUFF_EXPORT DownloadWidget : public QWidget | 49 | class KNEWSTUFF_EXPORT DownloadWidget : public QWidget | ||
78 | { | 50 | { | ||
79 | Q_OBJECT | 51 | Q_OBJECT | ||
80 | 52 | | |||
81 | public: | 53 | public: | ||
82 | /** | 54 | /** | ||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |