Krita Source Code Documentation
Loading...
Searching...
No Matches
KoResourcePaths.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2015 Boudewijn Rempt <boud@valdyas.org>
3
*
4
* SPDX-License-Identifier: LGPL-2.1-or-later
5
*/
6
#ifndef KORESOURCEPATHS_H
7
#define KORESOURCEPATHS_H
8
9
#include <QScopedPointer>
10
#include <QString>
11
#include <QStringList>
12
13
#include <kritaresources_export.h>
14
15
38
class
KRITARESOURCES_EXPORT
KoResourcePaths
39
{
40
public
:
41
42
KoResourcePaths
();
43
virtual
~KoResourcePaths
();
44
45
enum
SearchOption
{ NoSearchOptions = 0,
46
Recursive = 1,
47
IgnoreExecBit = 4
48
};
49
Q_DECLARE_FLAGS
(SearchOptions, SearchOption)
50
51
52
53
static
QString getApplicationRoot();
54
62
static
QString
s_overrideAppDataLocation
;
// This is set from KisApplicationArguments
63
static
QString getAppDataLocation();
64
73
static
void
getAllUserResourceFoldersLocationsForWindowsStore(QString& standardLocation, QString& privateLocation);
74
93
static
void
addAssetType(
const
QString &type,
const
char
*basetype,
94
const
QString &relativeName,
bool
priority =
true
);
95
96
112
static
void
addAssetDir(
const
QString &type,
const
QString &dir,
bool
priority =
true
);
113
138
static
QString findAsset(
const
QString &type,
const
QString &fileName);
139
158
static
QStringList
findDirs(
const
QString &type);
159
179
static
QStringList
findAllAssets(
const
QString &type,
180
const
QString &filter = QString(),
181
SearchOptions options = NoSearchOptions);
182
191
static
QStringList
assetDirs(
const
QString &type);
192
210
static
QString saveLocation(
const
QString &type,
const
QString &suffix = QString(),
bool
create =
true
);
211
222
static
QString locate(
const
QString &type,
const
QString &filename);
223
237
static
QString locateLocal(
const
QString &type,
const
QString &filename,
bool
createDir =
false
);
238
239
private
:
240
241
void
addResourceTypeInternal(
const
QString &type,
const
QString &basetype,
242
const
QString &relativeName,
bool
priority);
243
244
void
addResourceDirInternal(
const
QString &type,
const
QString &absdir,
bool
priority);
245
246
QString findResourceInternal(
const
QString &type,
const
QString &fileName);
247
248
QStringList
findDirsInternal(
const
QString &type);
249
250
QStringList
findAllResourcesInternal(
const
QString &type,
251
const
QString &filter = QString(),
252
SearchOptions options = NoSearchOptions)
const
;
253
254
QStringList
resourceDirsInternal(
const
QString &type);
255
256
QString saveLocationInternal(
const
QString &type,
const
QString &suffix = QString(),
bool
create =
true
);
257
258
QString locateInternal(
const
QString &type,
const
QString &filename);
259
260
QString locateLocalInternal(
const
QString &type,
const
QString &filename,
bool
createDir =
false
);
261
262
QStringList
findExtraResourceDirs()
const
;
263
264
class
Private
;
265
QScopedPointer<Private>
d
;
266
};
267
268
Q_DECLARE_OPERATORS_FOR_FLAGS
(KoResourcePaths::SearchOptions)
269
270
#endif
// KORESOURCEPATHS_H
Q_DECLARE_FLAGS
Q_DECLARE_FLAGS(KisUpdaterContextSnapshotEx, KisUpdaterContextSnapshotExTag)
KoResourcePaths
Definition
KoResourcePaths.cpp:156
KoResourcePaths::SearchOption
SearchOption
Definition
KoResourcePaths.h:45
KoResourcePaths::d
QScopedPointer< Private > d
Definition
KoResourcePaths.h:265
KoResourcePaths::s_overrideAppDataLocation
static QString s_overrideAppDataLocation
getAppDataLocation Use this instead of QStandardPaths::AppDataLocation! The user can configure the lo...
Definition
KoResourcePaths.h:62
QList< QString >
Q_DECLARE_OPERATORS_FOR_FLAGS
Q_DECLARE_OPERATORS_FOR_FLAGS(KisBaseRectsWalker::SubtreeVisitFlags)
Private
Definition
SvgTransformParser.cpp:20
libs
resources
KoResourcePaths.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52