Commit d9ce1b02 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add mail merge preview dialog

parent d2c6db67
Pipeline #58123 passed with stage
in 52 minutes and 43 seconds
......@@ -7,6 +7,8 @@ set(kmail_mailmergeplugin_SRCS
widgets/selectattachmentdialog.cpp
widgets/mailmergemenu.cpp
widgets/mailmergeutil.cpp
widgets/mailmergepreviewdialog.cpp
widgets/mailmergepreviewwidget.cpp
)
add_library(mailmerge ${kmail_mailmergeplugin_SRCS})
......
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#include "mailmergepreviewdialog.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QVBoxLayout>
MailMergePreviewDialog::MailMergePreviewDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18nc("@title:window", "Attachment"));
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
mainLayout->addWidget(buttonBox);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
}
MailMergePreviewDialog::~MailMergePreviewDialog()
{
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include <QDialog>
class MailMergePreviewDialog : public QDialog
{
Q_OBJECT
public:
explicit MailMergePreviewDialog(QWidget *parent = nullptr);
~MailMergePreviewDialog() override;
};
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#include "mailmergepreviewwidget.h"
#include <KLocalizedString>
#include <QVBoxLayout>
MailMergePreviewWidget::MailMergePreviewWidget(QWidget *parent)
: QWidget(parent)
{
}
MailMergePreviewWidget::~MailMergePreviewWidget()
{
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include <QWidget>
class MailMergePreviewWidget : public QWidget
{
Q_OBJECT
public:
explicit MailMergePreviewWidget(QWidget *parent = nullptr);
~MailMergePreviewWidget() override;
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment