File indexing completed on 2024-05-12 05:20:02
0001 /* -*- mode: c++; c-basic-offset:4 -*- 0002 systrayicon.h 0003 0004 This file is part of Kleopatra, the KDE keymanager 0005 SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #pragma once 0011 0012 #include <utils/systemtrayicon.h> 0013 #ifndef QT_NO_SYSTEMTRAYICON 0014 0015 #include <utils/pimpl_ptr.h> 0016 0017 class MainWindow; 0018 class QDialog; 0019 0020 class SysTrayIcon : public Kleo::SystemTrayIcon 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit SysTrayIcon(QObject *parent = nullptr); 0025 ~SysTrayIcon() override; 0026 0027 MainWindow *mainWindow() const; 0028 QDialog *attentionWindow() const; 0029 0030 void setLearningInProgress(bool value); 0031 0032 public Q_SLOTS: 0033 void setFirstCardWithNullPin(const std::string &serialNumber); 0034 void setAnyCardCanLearnKeys(bool); 0035 0036 private: 0037 void doActivated() override; 0038 void slotEnableDisableActions() override; 0039 0040 private: 0041 class Private; 0042 kdtools::pimpl_ptr<Private> d; 0043 Q_PRIVATE_SLOT(d, void slotAbout()) 0044 Q_PRIVATE_SLOT(d, void slotSetInitialPin()) 0045 Q_PRIVATE_SLOT(d, void slotLearnCertificates()) 0046 }; 0047 0048 #endif // QT_NO_SYSTEMTRAYICON