50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
|
|
/*
|
||
|
|
* Deskflow -- mouse and keyboard sharing utility
|
||
|
|
* SPDX-FileCopyrightText: (C) 2025 - 2026 Deskflow Developers
|
||
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||
|
|
*/
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <QStatusBar>
|
||
|
|
|
||
|
|
#include "common/Enums.h"
|
||
|
|
|
||
|
|
class QPushButton;
|
||
|
|
class QLabel;
|
||
|
|
|
||
|
|
using ProcessState = deskflow::core::ProcessState;
|
||
|
|
using ConnectionState = deskflow::core::ConnectionState;
|
||
|
|
|
||
|
|
class StatusBar : public QStatusBar
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
explicit StatusBar(QWidget *parent = nullptr);
|
||
|
|
void setStatus(ConnectionState connectionState, ProcessState processState, bool isServer);
|
||
|
|
void setServerClients(const QStringList &clients);
|
||
|
|
void setSecurityIconVisible(bool visible);
|
||
|
|
bool securityIconVisible() const;
|
||
|
|
void updateSecurityInfo(bool encrypted);
|
||
|
|
void setSecurityIcon(bool encrypted);
|
||
|
|
void setSecurityLevel(const QString &securityLevel);
|
||
|
|
void setBtnFingerprintVisible(bool visible);
|
||
|
|
void updateFound(const QString &version);
|
||
|
|
|
||
|
|
Q_SIGNALS:
|
||
|
|
void requestShowMyFingerprints();
|
||
|
|
void requestUpdateVersion();
|
||
|
|
|
||
|
|
protected:
|
||
|
|
void changeEvent(QEvent *e) override;
|
||
|
|
|
||
|
|
private:
|
||
|
|
void updateText();
|
||
|
|
QPushButton *m_btnFingerprint = nullptr;
|
||
|
|
QLabel *m_lblSecurityIcon = nullptr;
|
||
|
|
QLabel *m_lblStatus = nullptr;
|
||
|
|
QPushButton *m_btnUpdate = nullptr;
|
||
|
|
bool m_encrypted = false;
|
||
|
|
QString m_securityLevel;
|
||
|
|
};
|