File indexing completed on 2024-05-12 05:20:02

0001 /* -*- mode: c++; c-basic-offset:4 -*-
0002     mainwindow.h
0003 
0004     This file is part of Kleopatra, the KDE keymanager
0005     SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB
0006 
0007     SPDX-FileCopyrightText: 2016 Bundesamt für Sicherheit in der Informationstechnik
0008     SPDX-FileContributor: Intevation GmbH
0009 
0010     SPDX-License-Identifier: GPL-2.0-or-later
0011 */
0012 
0013 #pragma once
0014 
0015 #include <KXmlGuiWindow>
0016 
0017 #include <utils/pimpl_ptr.h>
0018 
0019 class MainWindow : public KXmlGuiWindow
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit MainWindow(QWidget *parent = nullptr, Qt::WindowFlags f = {});
0024     ~MainWindow() override;
0025 
0026 public Q_SLOTS:
0027     void importCertificatesFromFile(const QStringList &files);
0028     void exportWindow();
0029     void unexportWindow();
0030 
0031 protected:
0032     QByteArray savedGeometry;
0033 
0034     void closeEvent(QCloseEvent *e) override;
0035     void showEvent(QShowEvent *e) override;
0036     void hideEvent(QHideEvent *e) override;
0037     void dragEnterEvent(QDragEnterEvent *) override;
0038     void dropEvent(QDropEvent *) override;
0039     void readProperties(const KConfigGroup &cg) override;
0040     void saveProperties(KConfigGroup &cg) override;
0041 
0042 private:
0043     class Private;
0044     kdtools::pimpl_ptr<Private> d;
0045     Q_PRIVATE_SLOT(d, void closeAndQuit())
0046     Q_PRIVATE_SLOT(d, void configureToolbars())
0047     Q_PRIVATE_SLOT(d, void editKeybindings())
0048     Q_PRIVATE_SLOT(d, void slotConfigCommitted())
0049     Q_PRIVATE_SLOT(d, void slotContextMenuRequested(QAbstractItemView *, QPoint))
0050     Q_PRIVATE_SLOT(d, void slotFocusQuickSearch())
0051     Q_PRIVATE_SLOT(d, void showPadView())
0052 };