Incidenceeditor

templatemanagementdialog.h
1/*
2 SPDX-FileCopyrightText: 2005 Till Adam <adam@kde.org>
3 SPDX-FileCopyrightText: 2009 Allen Winter <winter@kde.org>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "ui_template_management_dialog_base.h"
11
12#include <QDialog>
13namespace IncidenceEditorNG
14{
15class TemplateManagementDialog : public QDialog
16{
18public:
19 explicit TemplateManagementDialog(QWidget *parent, const QStringList &templates, const QString &incidenceType);
20
22 /* Emitted whenever the user hits apply, indicating that the currently
23 selected template should be loaded into to the incidence editor which
24 triggered this.
25 */
26 void loadTemplate(const QString &templateName);
27
28 /* Emitted whenever the user wants to add the current incidence as a
29 template with the given name.
30 */
31 void saveTemplate(const QString &templateName);
32
33 /* Emitted when the dialog changed the list of templates. Calling code
34 can the replace the list that was handed in with the one this signal
35 transports.
36 */
37 void templatesChanged(const QStringList &templates);
38
39protected Q_SLOTS:
40 void slotItemSelected();
41 void slotAddTemplate();
42 void slotRemoveTemplate();
43 void slotApplyTemplate();
44 void slotOk();
45
46private:
47 void slotHelp();
48 void updateButtons();
49 Ui::TemplateManagementDialog_base m_base;
50 QStringList m_templates;
51 QString m_type;
52 QString m_newTemplate;
53 bool m_changed = false;
54};
55}
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:37 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.