Mailcommon

snippetvariabledialog.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
3  SPDX-FileContributor: Tobias Koenig <[email protected]>
4 
5  SPDX-FileCopyrightText: 2019-2022 Laurent Montel <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #pragma once
11 
12 #include <QDialog>
13 
14 class QCheckBox;
15 namespace KPIMTextEdit
16 {
17 class PlainTextEditorWidget;
18 }
19 namespace MailCommon
20 {
21 class SnippetVariableDialog : public QDialog
22 {
23  Q_OBJECT
24 
25 public:
26  explicit SnippetVariableDialog(const QString &variableName, QMap<QString, QString> *variables, QWidget *parent = nullptr);
27  ~SnippetVariableDialog() override;
28 
29  Q_REQUIRED_RESULT QString variableValue() const;
30  Q_REQUIRED_RESULT bool saveVariableIsChecked() const;
31 
32 private:
33  void writeConfig();
34  void readConfig();
35  void slotAccepted();
36  const QString mVariableName;
37  QMap<QString, QString> *mVariables = nullptr;
38  KPIMTextEdit::PlainTextEditorWidget *const mVariableValueText;
39  QCheckBox *mSaveVariable = nullptr;
40 };
41 }
Q_OBJECTQ_OBJECT
void readConfig()
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.