Add Kyber to algorithm strings.
[qpwmc.git] / trayIcon.h
blob42f906d1c21af55aa93106a72fadbc3a7c074661
1 /*
2 Copyright (C) 2010-2024 Ben Kibbey <bjk@luxsci.net>
4 This file is part of qpwmc.
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 USA
21 #ifndef TRAYICON_H
22 #define TRAYICON_H
24 #include <QSystemTrayIcon>
25 #include <QMenu>
26 #include "editShortcutDialog.h"
27 #include "pwmd.h"
28 #include "pwmdRemoteHost.h"
30 class TrayIcon:public QSystemTrayIcon
32 Q_OBJECT
33 public:
34 TrayIcon ();
35 ~TrayIcon ();
37 signals:
38 void knownHostRc (gpg_error_t);
40 private slots:
41 void slotSystemTrayActivated (QSystemTrayIcon::
42 ActivationReason);
43 void slotConnectionStateChanged (Pwmd::ConnectionState);
44 void slotEditShortcuts ();
45 void slotShortCut (QAction *);
46 void slotClearClipboard ();
47 void slotClearClipboardReal ();
48 void slotAbout ();
49 void slotEditPwmd ();
50 void slotQuit ();
51 void slotCommandResult (PwmdCommandQueueItem *item, QString result,
52 gpg_error_t rc, bool queued);
53 void slotKnownHostCallback (void *data, const char *host, const char *key,
54 size_t len);
55 void slotBusy (int, bool);
56 void slotRotateIcon ();
57 void slotStatusMessage (QString line, void *);
58 void slotLinger ();
60 private:
61 void refreshShortcuts ();
62 void shortCutFinalize (const QString &);
63 void showMessage (gpg_error_t, bool reset = true);
64 void rotateIcon (bool reset = false);
65 void startStopTimer (bool start);
67 int clipboardTimeout;
68 QMenu *shortcutMenu;
69 QTimer *clipboardTimer;
70 PwmdRemoteHost currentHostData;
71 Pwmd *pwm;
72 QTimer *rotateTimer;
73 QTimer *lingerTimer;
74 int lingerTime;
75 int lingerRemaining;
76 bool closeFile;
77 QString *statusData;
80 #endif