/usr/include/knewstuff3/downloaddialog.h is in kdelibs5-dev 4:4.14.2-5+deb8u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | /*
knewstuff3/ui/downloaddialog.h.
Copyright (C) 2005 by Enrico Ros <eros.kde@email.it>
Copyright (C) 2005 - 2007 Josef Spillner <spillner@kde.org>
Copyright (C) 2007 Dirk Mueller <mueller@kde.org>
Copyright (C) 2007-2009 Jeremy Whiting <jpwhiting@kde.org>
Copyright (C) 2009-2010 Frederik Gladhorn <gladhorn@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KNEWSTUFF3_UI_DOWNLOADDIALOG_H
#define KNEWSTUFF3_UI_DOWNLOADDIALOG_H
#include <kdialog.h>
#include "knewstuff_export.h"
#include "entry.h"
namespace KNS3
{
class DownloadDialogPrivate;
/**
* KNewStuff download dialog.
*
* The download dialog will present items to the user
* for installation, updates and removal.
* Preview images as well as other meta information can be seen.
*
* \section knsrc knsrc Files
* The Dialog is configured by a .knsrc file containing the KHotNewStuff configuration.
* Your application should install a file called: <em>$KDEDIR/share/config/appname.knsrc</em>
*
* The file could look like this for wallpapers:
* <pre>
[KNewStuff3]
ProvidersUrl=http://download.kde.org/ocs/providers.xml
Categories=KDE Wallpaper 1920x1200,KDE Wallpaper 1600x1200
StandardResource=wallpaper
Uncompress=archive
* </pre>
*
* Uncompress can be one of: always, never or archive:
* <ol>
* <li>always: assume all downloaded files are archives and need to be extracted</li>
* <li>never: never try to extract the file</li>
* <li>archive: if the file is an archive, uncompress it, otherwise just pass it on</li>
* </ol>
*
* You have different options to set the target install directory:
* <ol><li>StandardResource: standard ressouce dir, such as <em>.kde/share/wallpapers</em>.
* This is what KStandardDirs::locateLocal(name) will return.</li>
* <li>TargetDir: a directory in the share/apps section, such as <em>.kde/share/apps/wallpapers</em>.
* This is what KStandardDirs::locateLocal("data", name) will return.</li>
* <li>XdgTargetDir: a directory in the $XDG_DATA_HOME directory such as <em>.local/share/wallpapers</em> (since 4.5).
* </ol>
*
* @since 4.4
*/
class KNEWSTUFF_EXPORT DownloadDialog :public KDialog
{
Q_OBJECT
public:
/**
* Create a DownloadDialog that lets the user install, update and uninstall
* contents. It will try to find a appname.knsrc file with the configuration.
* Appname is the name of your application as provided in the about data->
*
* @param parent the parent of the dialog
*/
explicit DownloadDialog(QWidget * parent = 0);
/**
* Create a DownloadDialog that lets the user install, update and uninstall
* contents. Manually specify the name of a .knsrc file where the
* KHotNewStuff configuration can be found.
*
* @param configFile the name of the configuration file
* @param parent the parent of the dialog
*/
explicit DownloadDialog(const QString& configFile, QWidget * parent = 0);
/**
* destructor
*/
~DownloadDialog();
/**
* The list of entries with changed status (installed/uninstalled)
* @return the list of entries
*/
KNS3::Entry::List changedEntries();
/**
* The list of entries that have been newly installed
* @return the list of entries
*/
KNS3::Entry::List installedEntries();
private:
void init(const QString& configFile);
DownloadDialogPrivate *const d;
Q_DISABLE_COPY(DownloadDialog)
};
}
#endif
|