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 
107  void setPreviewImageFile(uint number, const QUrl &file);
108 
114  void setPriceEnabled(bool enabled);
115 
121  void setPrice(double price);
122 
128  void setPriceReason(const QString &reason);
129 
137  void selectCategory(const QString &category);
138 
139 public Q_SLOTS:
140  void accept() override;
141 
142 private:
143  bool init(const QString &configfile);
144 
145  UploadDialogPrivate *const d;
146 
147  Q_PRIVATE_SLOT(d, void _k_nextPage())
148  Q_PRIVATE_SLOT(d, void _k_backPage())
149  Q_PRIVATE_SLOT(d, void _k_updatePage())
150 
151  Q_PRIVATE_SLOT(d, void _k_providerChanged(QString))
152  Q_PRIVATE_SLOT(d, void _k_checkCredentialsFinished(bool))
153  Q_PRIVATE_SLOT(d, void _k_contentByCurrentUserLoaded(Attica::Content::List))
154  Q_PRIVATE_SLOT(d, void _k_providersLoaded(QStringList))
155  Q_PRIVATE_SLOT(d, void _k_categoriesLoaded(Attica::Category::List))
156  Q_PRIVATE_SLOT(d, void _k_licensesLoaded(Attica::License::List))
157  Q_PRIVATE_SLOT(d, void _k_currencyLoaded(QString))
158  Q_PRIVATE_SLOT(d, void _k_previewLoaded(int, QImage))
159 
160  Q_PRIVATE_SLOT(d, void _k_changePreview1())
161  Q_PRIVATE_SLOT(d, void _k_changePreview2())
162  Q_PRIVATE_SLOT(d, void _k_changePreview3())
163  Q_PRIVATE_SLOT(d, void _k_priceToggled(bool))
164  Q_PRIVATE_SLOT(d, void _k_updateContentsToggled(bool update))
165 
166  Q_PRIVATE_SLOT(d, void _k_startUpload())
167  Q_PRIVATE_SLOT(d, void _k_contentAdded(Attica::BaseJob *))
168  Q_PRIVATE_SLOT(d, void _k_fileUploadFinished(Attica::BaseJob *))
169  Q_PRIVATE_SLOT(d, void _k_preview1UploadFinished(Attica::BaseJob *))
170  Q_PRIVATE_SLOT(d, void _k_preview2UploadFinished(Attica::BaseJob *))
171  Q_PRIVATE_SLOT(d, void _k_preview3UploadFinished(Attica::BaseJob *))
172 
173  Q_PRIVATE_SLOT(d, void _k_updatedContentFetched(Attica::Content))
174  Q_PRIVATE_SLOT(d, void _k_detailsLinkLoaded(QUrl))
175 
176  Q_PRIVATE_SLOT(d, void _k_openRegisterAccountWebpage(QString))
177 
178  Q_DISABLE_COPY(UploadDialog)
179 };
180 
181 }
182 
183 #endif
KNewStuff file upload dialog.
Definition: uploaddialog.h:39
QCA_EXPORT void init()
The namespace for the KNewStuff classes.
Definition: button.cpp:19
Definition: engine.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 19 2021 22:44:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.