• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KNewStuff

  • knewstuff
  • knewstuff3
knewstuff3/uploaddialog.h
Go to the documentation of this file.
1/*
2 knewstuff3/ui/uploaddialog.h.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 Copyright (C) 2007 Josef Spillner <spillner@kde.org>
5 Copyright (C) 2009 Jeremy Whiting <jpwhiting@kde.org>
6 Copyright (C) 2009-2010 Frederik Gladhorn <gladhorn@kde.org>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library. If not, see <http://www.gnu.org/licenses/>.
20*/
21#ifndef KNEWSTUFF3_UI_UPLOADDIALOG_H
22#define KNEWSTUFF3_UI_UPLOADDIALOG_H
23
24#include <kdialog.h>
25#include <kurl.h>
26
27#include <knewstuff3/knewstuff_export.h>
28
29namespace Attica {
30 class BaseJob;
31 class Provider;
32}
33
34// KDE5: this class should inherit from the wizard class - KAssistantDialog
35
36namespace KNS3
37{
48class KNEWSTUFF_EXPORT UploadDialog : public KDialog
49{
50 Q_OBJECT
51public:
57 explicit UploadDialog(QWidget *parent = 0);
58
64 explicit UploadDialog(const QString& configFile, QWidget *parent = 0);
65
69 ~UploadDialog();
70
77 void setUploadFile(const KUrl& payloadFile);
78
86 void setUploadName(const QString& name);
87
93 void setVersion(const QString& version);
94
100 void setDescription(const QString& description);
101
107 void setChangelog(const QString& changelog);
108
109 /* *
110 Set the suggested license displayed in the upload dialog.
111 The user can still change this.
112 @param version version
113 */
114 // enum License {}; // see fd.o api spec
115 // void setLicense(License license);
116
124 void setPreviewImageFile(uint number, const KUrl& file);
125
131 void setPriceEnabled(bool enabled);
132
138 void setPrice(double price);
139
145 void setPriceReason(const QString& reason);
146
154 void selectCategory(const QString& category);
155
156public Q_SLOTS:
157 virtual void accept();
158
159private:
160 bool init(const QString &configfile);
161
162 class Private;
163 Private *const d;
164
165 Q_PRIVATE_SLOT( d, void _k_nextPage() )
166 Q_PRIVATE_SLOT( d, void _k_backPage() )
167 Q_PRIVATE_SLOT( d, void _k_updatePage() )
168
169 Q_PRIVATE_SLOT( d, void _k_providerChanged(QString) )
170 Q_PRIVATE_SLOT( d, void _k_checkCredentialsFinished(bool) )
171 Q_PRIVATE_SLOT( d, void _k_contentByCurrentUserLoaded(Attica::Content::List) )
172 Q_PRIVATE_SLOT( d, void _k_providersLoaded(QStringList) )
173 Q_PRIVATE_SLOT( d, void _k_categoriesLoaded(Attica::Category::List) )
174 Q_PRIVATE_SLOT( d, void _k_licensesLoaded(Attica::License::List) )
175 Q_PRIVATE_SLOT( d, void _k_currencyLoaded(QString) )
176 Q_PRIVATE_SLOT( d, void _k_previewLoaded(int, QImage) )
177
178 Q_PRIVATE_SLOT( d, void _k_changePreview1() )
179 Q_PRIVATE_SLOT( d, void _k_changePreview2() )
180 Q_PRIVATE_SLOT( d, void _k_changePreview3() )
181 Q_PRIVATE_SLOT( d, void _k_priceToggled(bool) )
182 Q_PRIVATE_SLOT( d, void _k_updateContentsToggled(bool update) )
183
184 Q_PRIVATE_SLOT( d, void _k_startUpload() )
185 Q_PRIVATE_SLOT( d, void _k_contentAdded(Attica::BaseJob*) )
186 Q_PRIVATE_SLOT( d, void _k_fileUploadFinished(Attica::BaseJob*) )
187 Q_PRIVATE_SLOT( d, void _k_preview1UploadFinished(Attica::BaseJob*) )
188 Q_PRIVATE_SLOT( d, void _k_preview2UploadFinished(Attica::BaseJob*) )
189 Q_PRIVATE_SLOT( d, void _k_preview3UploadFinished(Attica::BaseJob*) )
190
191 Q_PRIVATE_SLOT( d, void _k_updatedContentFetched(Attica::Content) )
192 Q_PRIVATE_SLOT( d, void _k_detailsLinkLoaded(QUrl) )
193
194 Q_PRIVATE_SLOT( d, void _k_openRegisterAccountWebpage(QString) )
195
196 Q_DISABLE_COPY( UploadDialog )
197};
198
199}
200
201#endif
KDialog::KDialog
KDialog(QWidget *parent=0, Qt::WindowFlags flags=0)
KNS3::UploadDialog::Private
Definition uploaddialog_p.h:41
KNS3::UploadDialog::setUploadName
void setUploadName(const QString &name)
Set the suggested title for the upload.
Definition knewstuff3/uploaddialog.cpp:467
KNS3::UploadDialog::selectCategory
void selectCategory(const QString &category)
Set the suggested category for the upload.
Definition knewstuff3/uploaddialog.cpp:472
KNS3::UploadDialog::UploadDialog
UploadDialog(QWidget *parent=0)
Create a new upload dialog.
Definition knewstuff3/uploaddialog.cpp:394
KNS3::UploadDialog::setPreviewImageFile
void setPreviewImageFile(uint number, const KUrl &file)
Set one of the threee preview images displayed in the upload dialog.
Definition knewstuff3/uploaddialog.cpp:509
KNS3::UploadDialog::setChangelog
void setChangelog(const QString &changelog)
Set the suggested changelog displayed in the upload dialog.
Definition knewstuff3/uploaddialog.cpp:477
KNS3::UploadDialog::setPriceEnabled
void setPriceEnabled(bool enabled)
Enable the UI to let the user to set a price for the uploaded item.
Definition knewstuff3/uploaddialog.cpp:487
KNS3::UploadDialog::setUploadFile
void setUploadFile(const KUrl &payloadFile)
Set the file to be uploaded.
Definition knewstuff3/uploaddialog.cpp:454
KNS3::UploadDialog::setVersion
void setVersion(const QString &version)
Set the suggested version displayed in the upload dialog.
Definition knewstuff3/uploaddialog.cpp:504
KNS3::UploadDialog::accept
virtual void accept()
Definition knewstuff3/uploaddialog.cpp:557
KNS3::UploadDialog::setPrice
void setPrice(double price)
Set the suggested price displayed in the upload dialog.
Definition knewstuff3/uploaddialog.cpp:493
KNS3::UploadDialog::setDescription
void setDescription(const QString &description)
Set the suggested description displayed in the upload dialog.
Definition knewstuff3/uploaddialog.cpp:482
KNS3::UploadDialog::setPriceReason
void setPriceReason(const QString &reason)
Set the suggested rationale why this item costs something to download.
Definition knewstuff3/uploaddialog.cpp:499
KUrl
QUrl
QWidget
kdialog.h
knewstuff_export.h
kurl.h
Attica
Definition atticaprovider.h:28
KNS3
Definition atticaprovider.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal