Libkleo

auditlogviewer.h
1/*
2 SPDX-FileCopyrightText: 2015-2021 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kleo_export.h"
10
11#include <QDialog>
12
13#ifdef HAVE_PIMTEXTEDIT
14#include <TextCustomEditor/RichTextEditorWidget>
15#else
16
17class QTextEdit;
18#endif // HAVE_PIMTEXTEDIT
19
20namespace Kleo
21{
22class AuditLogEntry;
23
24class KLEO_EXPORT AuditLogViewer : public QDialog
25{
26 Q_OBJECT
27public:
28 explicit AuditLogViewer(const QString &log, QWidget *parent = nullptr);
29
30 ~AuditLogViewer() override;
31
32 static void showAuditLog(QWidget *parent, const AuditLogEntry &auditLog, const QString &title = {});
33
34 void setAuditLog(const QString &log);
35
36private Q_SLOTS:
37 void slotSaveAs();
38 void slotCopyClip();
39
40private:
41 void writeConfig();
42 void readConfig();
43
44 QString m_log;
45#ifdef HAVE_PIMTEXTEDIT
46 TextCustomEditor::RichTextEditorWidget *m_textEdit = nullptr;
47#else
48 QTextEdit *m_textEdit = nullptr;
49#endif
50};
51
52}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.