Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAndroidDonations.h
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-3.0-or-later
3
*/
4
#ifndef __KISANDROIDDONATIONS_H_
5
#define __KISANDROIDDONATIONS_H_
6
7
#include <QObject>
8
9
#include "kritaui_export.h"
10
11
// See DonationHelper.java for notes!
12
class
KRITAUI_EXPORT
KisAndroidDonations
:
public
QObject
13
{
14
Q_OBJECT
15
friend
class
KisApplication
;
16
17
public
:
18
// Keep this in sync with the STATE_ constants in DonationHelper.java!
19
enum class
State
{
20
// Initial or error state. Assume in-app purchases are unavailable.
21
Unknown
= 0,
22
// The billing code is still checking whether any products are available
23
// and if the user owns any of them.
24
Checking = 1,
25
// In-app purchases are unavailable. This may be because of an
26
// unexpected error, but may also be an expected condition, e.g. because
27
// the user is running a debug or nightly build, which have a different
28
// package name and therefore no products assigned to them.
29
Unavailable = 2,
30
// User does not own any support products, but they could purchase one.
31
NoSupport = 3,
32
// User purchased the (legacy) lifetime supporter badge.
33
LifetimeSupporter = 4,
34
};
35
36
static
KisAndroidDonations
*
instance
();
37
38
bool
shouldShowDonationLink()
const
;
39
bool
shouldShowSupporterBadge()
const
;
40
41
public
Q_SLOTS:
42
void
slotStartDonationFlow();
43
44
private
Q_SLOTS:
45
void
slotUpdateState(
int
state);
46
47
Q_SIGNALS:
48
void
sigStateUpdateReceived
(
int
state);
49
void
sigStateChanged
();
50
51
private
:
52
explicit
KisAndroidDonations
(QObject *parent =
nullptr
);
53
54
void
syncState();
55
56
State
m_state{State::Unknown};
57
};
58
59
#endif
// __KISANDROIDDONATIONS_H
instance
PythonPluginManager * instance
Definition
PythonPluginManager.cpp:37
KisAndroidDonations
Definition
KisAndroidDonations.h:13
KisAndroidDonations::sigStateUpdateReceived
void sigStateUpdateReceived(int state)
KisAndroidDonations::sigStateChanged
void sigStateChanged()
KisAndroidDonations::State
State
Definition
KisAndroidDonations.h:19
KisApplication
Base class for the Krita app.
Definition
KisApplication.h:38
Unknown
@ Unknown
Definition
psd.h:44
libs
ui
KisAndroidDonations.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52