File indexing completed on 2024-05-12 16:01:55
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 1998, 1999 Reginald Stadlbauer <reggie@kde.org> 0004 SPDX-FileCopyrightText: 2000 Werner Trobin <trobin@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef KIS_TEMPLATE_CREATE_DIA_H 0010 #define KIS_TEMPLATE_CREATE_DIA_H 0011 0012 #include <KoDialog.h> 0013 #include "kritaui_export.h" 0014 0015 class QString; 0016 class QPixmap; 0017 class KisDocument; 0018 class KisTemplateCreateDiaPrivate; 0019 0020 /**************************************************************************** 0021 * 0022 * Class: koTemplateCreateDia 0023 * 0024 ****************************************************************************/ 0025 0026 class KRITAUI_EXPORT KisTemplateCreateDia : public KoDialog 0027 { 0028 Q_OBJECT 0029 0030 private: 0031 KisTemplateCreateDia(const QString &templatesResourcePath, 0032 const QString &filePath, const QPixmap &thumbnail, QWidget *parent=0 ); 0033 ~KisTemplateCreateDia() override; 0034 0035 public: 0036 static void createTemplate(const QString &templatesResourcePath, const char *suffix, 0037 KisDocument *document, QWidget *parent = 0); 0038 0039 private Q_SLOTS: 0040 void slotOk(); 0041 0042 void slotDefault(); 0043 void slotCustom(); 0044 void slotSelect(); 0045 void slotNameChanged(const QString &name); 0046 0047 void slotAddGroup(); 0048 void slotRemove(); 0049 void slotSelectionChanged(); 0050 private: 0051 void updatePixmap(); 0052 void fillGroupTree(); 0053 0054 private: 0055 KisTemplateCreateDiaPrivate * const d; 0056 }; 0057 0058 #endif