Krita Source Code Documentation
Loading...
Searching...
No Matches
KisTemplateTree.h
Go to the documentation of this file.
1/*
2 This file is part of the KDE project
3 copyright (C) 2000 Werner Trobin <trobin@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KIS_TEMPLATE_TREE_H
9#define KIS_TEMPLATE_TREE_H
10
11#include <QList>
12#include <QString>
13#include "kritaui_export.h"
14
15class KisTemplate;
17
18class KRITAUI_EXPORT KisTemplateTree
19{
20
21public:
22 KisTemplateTree(const QString &templatesResourcePath,
23 bool readTree = false);
25
26 QString templatesResourcePath() const {
27 return m_templatesResourcePath;
28 }
29 void readTemplateTree();
30 void writeTemplateTree();
31
32 bool add(KisTemplateGroup *g);
33 KisTemplateGroup *find(const QString &name) const;
34
36 return m_defaultGroup;
37 }
39 return m_defaultTemplate;
40 }
41
42 QList<KisTemplateGroup*> groups () const { return m_groups; }
43
44private:
45 void readGroups();
46 void readTemplates();
47 void writeTemplate(KisTemplate *t, KisTemplateGroup *group,
48 const QString &localDir);
49
54};
55
56#endif
KisTemplateGroup * m_defaultGroup
QList< KisTemplateGroup * > m_groups
QString templatesResourcePath() const
KisTemplateGroup * defaultGroup() const
KisTemplate * m_defaultTemplate
QList< KisTemplateGroup * > groups() const
KisTemplate * defaultTemplate() const
QString m_templatesResourcePath