Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSupporterBundleWidget.h
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-3.0-or-later
3
*/
4
#ifndef __KISSUPPORTERBUNDLEWIDGET_H_
5
#define __KISSUPPORTERBUNDLEWIDGET_H_
6
7
#include <QPointer>
8
#include <QVector>
9
#include <QWidget>
10
#include <functional>
11
12
#include "
KisSupporterBundle.h
"
13
#include "
KisSupporterBundlesFetcher.h
"
14
#include "ui_KisSupporterBundleWidget.h"
15
#include <
KisSupporterProduct.h
>
16
17
class
QNetworkReply;
18
class
QProgressDialog;
19
20
class
KisSupporterBundleWidget
:
public
QWidget,
public
Ui::KisSupporterBundleWidget
21
{
22
Q_OBJECT
23
public
:
24
explicit
KisSupporterBundleWidget
(
KisSupporterBundlesFetcher
*fetcher,
25
const
KisSupporterBundle
&
bundle
,
26
const
QVector<KisSupporterProduct>
&bundleProducts,
27
QWidget *parent =
nullptr
);
28
29
const
KisSupporterBundle
&
bundle
()
const
30
{
31
return
m_bundle
;
32
}
33
34
bool
isProductOwned
()
const
35
{
36
return
m_productOwned
;
37
}
38
39
bool
canImport
()
const
40
{
41
return
m_canImport
;
42
}
43
44
private
Q_SLOTS:
45
void
slotStartDownload
();
46
void
slotUpdateDownloadProgress
(qint64 bytesReceived, qint64 bytesTotal);
47
48
private
:
49
void
50
addContentEntry
(
QStringList
&outContentList,
const
QString &key,
const
std::function<QString(
int
)> &formatFn)
const
;
51
52
void
handleDownloadFinished
(QNetworkReply *reply);
53
void
showFinishedDownload
(
bool
success,
bool
cancel,
const
QString &errorMessage);
54
void
closeProgressDlg
();
55
56
QPointer<KisSupporterBundlesFetcher>
m_fetcher
;
57
QProgressDialog *
m_progressDlg
{
nullptr
};
58
KisSupporterBundle
m_bundle
;
59
bool
m_productOwned
{
false
};
60
bool
m_canImport
;
61
};
62
63
#endif
KisSupporterBundle.h
KisSupporterBundlesFetcher.h
KisSupporterProduct.h
KisSupporterBundleWidget
Definition
KisSupporterBundleWidget.h:21
KisSupporterBundleWidget::handleDownloadFinished
void handleDownloadFinished(QNetworkReply *reply)
Definition
KisSupporterBundleWidget.cpp:173
KisSupporterBundleWidget::m_progressDlg
QProgressDialog * m_progressDlg
Definition
KisSupporterBundleWidget.h:57
KisSupporterBundleWidget::showFinishedDownload
void showFinishedDownload(bool success, bool cancel, const QString &errorMessage)
Definition
KisSupporterBundleWidget.cpp:223
KisSupporterBundleWidget::KisSupporterBundleWidget
KisSupporterBundleWidget(KisSupporterBundlesFetcher *fetcher, const KisSupporterBundle &bundle, const QVector< KisSupporterProduct > &bundleProducts, QWidget *parent=nullptr)
Definition
KisSupporterBundleWidget.cpp:17
KisSupporterBundleWidget::closeProgressDlg
void closeProgressDlg()
Definition
KisSupporterBundleWidget.cpp:247
KisSupporterBundleWidget::bundle
const KisSupporterBundle & bundle() const
Definition
KisSupporterBundleWidget.h:29
KisSupporterBundleWidget::m_fetcher
QPointer< KisSupporterBundlesFetcher > m_fetcher
Definition
KisSupporterBundleWidget.h:56
KisSupporterBundleWidget::isProductOwned
bool isProductOwned() const
Definition
KisSupporterBundleWidget.h:34
KisSupporterBundleWidget::slotStartDownload
void slotStartDownload()
Definition
KisSupporterBundleWidget.cpp:126
KisSupporterBundleWidget::addContentEntry
void addContentEntry(QStringList &outContentList, const QString &key, const std::function< QString(int)> &formatFn) const
Definition
KisSupporterBundleWidget.cpp:163
KisSupporterBundleWidget::m_productOwned
bool m_productOwned
Definition
KisSupporterBundleWidget.h:59
KisSupporterBundleWidget::canImport
bool canImport() const
Definition
KisSupporterBundleWidget.h:39
KisSupporterBundleWidget::slotUpdateDownloadProgress
void slotUpdateDownloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Definition
KisSupporterBundleWidget.cpp:151
KisSupporterBundleWidget::m_bundle
KisSupporterBundle m_bundle
Definition
KisSupporterBundleWidget.h:58
KisSupporterBundleWidget::m_canImport
bool m_canImport
Definition
KisSupporterBundleWidget.h:60
KisSupporterBundlesFetcher
Definition
KisSupporterBundlesFetcher.h:20
QList
Definition
KisQStringListFwd.h:16
QPointer
Definition
kis_types.h:255
KisSupporterBundle
Definition
KisSupporterBundle.h:12
plugins
extensions
resourcemanager
KisSupporterBundleWidget.h
Generated at
2026-07-16 02:30:11+02:00
from
Krita
branch
master
, commit
a788c87613f94f0657ee6a3d88f6745bc44af899