2 Copyright (C) 2015-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
21 #ifndef PWMDCLIENTDIALOG_H
22 #define PWMDCLIENTDIALOG_H
28 #include "pwmdClientInfo.h"
29 #include "ui_pwmdClientDialog.h"
32 class PwmdClientDialog
: public QDialog
36 PwmdClientDialog (Pwmd
*, const QStringList
&, const QString
&,
39 void refreshClientList();
42 Name
, Time
, File
, Lock
, State
, Host
, Uid
, MaxFields
46 void slotKillClient ();
47 void slotRefreshClientList ();
48 void slotClientItemChanged (QTreeWidgetItem
*, QTreeWidgetItem
*);
49 void slotCommandResult (PwmdCommandQueueItem
*item
,
50 QString result
, gpg_error_t rc
, bool queued
);
51 void slotStatusMessage (QString line
, void *data
);
52 void slotConnectionStateChanged (Pwmd::ConnectionState s
);
53 void slotRemoveStaleClients ();
54 void slotBusy (int, bool);
55 void slotMainClientLockStateChanged (bool);
58 QString
clientState (unsigned);
59 void clearClientList (bool stale
= false);
60 QTreeWidgetItem
*buildClientStateItem (const QString
&,
61 QTreeWidgetItem
* = 0);
62 void refreshClientListFinalize (const QString
&);
63 void disable (bool = true);
64 QList
<QTreeWidgetItem
*> staleList
;
65 void setClientState (unsigned);
66 void updateStateForClient (const QString
&);
67 void setLocked (bool);
69 Ui::PwmdClientDialog ui
;
70 QStringList invokingUser
;
71 QString connectedUser
;
77 Q_DECLARE_METATYPE (ClientInfo
*);