KNewStuff

uploaddialog.h
1 /*
2  knewstuff3/ui/uploaddialog.h.
3  SPDX-FileCopyrightText: 2002 Cornelius Schumacher <[email protected]>
4  SPDX-FileCopyrightText: 2007 Josef Spillner <[email protected]>
5  SPDX-FileCopyrightText: 2009 Jeremy Whiting <[email protected]>
6  SPDX-FileCopyrightText: 2009-2010 Frederik Gladhorn <[email protected]>
7 
8  SPDX-License-Identifier: LGPL-2.1-or-later
9 */
10 #ifndef KNEWSTUFF3_UI_UPLOADDIALOG_H
11 #define KNEWSTUFF3_UI_UPLOADDIALOG_H
12 
13 #include <QDialog>
14 #include <QUrl>
15 
16 #include "knewstuff_export.h"
17 
18 namespace Attica
19 {
20 class BaseJob;
21 class Provider;
22 }
23 
24 // KDE5: this class should inherit from the wizard class - KAssistantDialog
25 
26 namespace KNS3
27 {
28 class UploadDialogPrivate;
39 class KNEWSTUFF_EXPORT UploadDialog : public QDialog
40 {
41  Q_OBJECT
42 public:
48  explicit UploadDialog(QWidget *parent = nullptr);
49 
55  explicit UploadDialog(const QString &configFile, QWidget *parent = nullptr);
56 
60  ~UploadDialog() override;
61 
68  void setUploadFile(const QUrl &payloadFile);
69 
77  void setUploadName(const QString &name);
78 
84  void setVersion(const QString &version);
85 
91  void setDescription(const QString &description);
92 
98  void setChangelog(const QString &changelog);
99 
100  /* *
101  Set the suggested license displayed in the upload dialog.
102  The user can still change this.
103  @param version version
104  */
105  // enum License {}; // see fd.o api spec
106  // void setLicense(License license);
107 
115  void setPreviewImageFile(uint number, const QUrl &file);
116 
122  void setPriceEnabled(bool enabled);
123 
129  void setPrice(double price);
130 
136  void setPriceReason(const QString &reason);
137 
145  void selectCategory(const QString &category);
146 
147 public Q_SLOTS:
148  void accept() override;
149 
150 private:
151  bool init(const QString &configfile);
152 
153  UploadDialogPrivate *const d;
154 
155  Q_PRIVATE_SLOT(d, void _k_nextPage())
156  Q_PRIVATE_SLOT(d, void _k_backPage())
157  Q_PRIVATE_SLOT(d, void _k_updatePage())
158 
159  Q_PRIVATE_SLOT(d, void _k_providerChanged(QString))
160  Q_PRIVATE_SLOT(d, void _k_checkCredentialsFinished(bool))
161  Q_PRIVATE_SLOT(d, void _k_contentByCurrentUserLoaded(Attica::Content::List))
162  Q_PRIVATE_SLOT(d, void _k_providersLoaded(QStringList))
163  Q_PRIVATE_SLOT(d, void _k_categoriesLoaded(Attica::Category::List))
164  Q_PRIVATE_SLOT(d, void _k_licensesLoaded(Attica::License::List))
165  Q_PRIVATE_SLOT(d, void _k_currencyLoaded(QString))
166  Q_PRIVATE_SLOT(d, void _k_previewLoaded(int, QImage))
167 
168  Q_PRIVATE_SLOT(d, void _k_changePreview1())
169  Q_PRIVATE_SLOT(d, void _k_changePreview2())
170  Q_PRIVATE_SLOT(d, void _k_changePreview3())
171  Q_PRIVATE_SLOT(d, void _k_priceToggled(bool))
172  Q_PRIVATE_SLOT(d, void _k_updateContentsToggled(bool update))
173 
174  Q_PRIVATE_SLOT(d, void _k_startUpload())
175  Q_PRIVATE_SLOT(d, void _k_contentAdded(Attica::BaseJob *))
176  Q_PRIVATE_SLOT(d, void _k_fileUploadFinished(Attica::BaseJob *))
177  Q_PRIVATE_SLOT(d, void _k_preview1UploadFinished(Attica::BaseJob *))
178  Q_PRIVATE_SLOT(d, void _k_preview2UploadFinished(Attica::BaseJob *))
179  Q_PRIVATE_SLOT(d, void _k_preview3UploadFinished(Attica::BaseJob *))
180 
181  Q_PRIVATE_SLOT(d, void _k_updatedContentFetched(Attica::Content))
182  Q_PRIVATE_SLOT(d, void _k_detailsLinkLoaded(QUrl))
183 
184  Q_PRIVATE_SLOT(d, void _k_openRegisterAccountWebpage(QString))
185 
186  Q_DISABLE_COPY(UploadDialog)
187 };
188 
189 }
190 
191 #endif
KNewStuff file upload dialog.
Definition: uploaddialog.h:39
QCA_EXPORT void init()
Definition: button.cpp:18
Definition: engine.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:42:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.