2021-04-22 14:00:42 +00:00
|
|
|
/*
|
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2024-08-07 14:05:18 +00:00
|
|
|
* Copyright (C) 2021 Symless Ltd.
|
2021-04-22 14:00:42 +00:00
|
|
|
*
|
|
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* found in the file LICENSE that should have accompanied this file.
|
|
|
|
|
*
|
|
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "gui/config/AppConfig.h"
|
2021-04-22 14:00:42 +00:00
|
|
|
|
|
|
|
|
#include <QString>
|
2024-08-07 14:05:18 +00:00
|
|
|
#include <QWidget>
|
2021-04-22 14:00:42 +00:00
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
namespace synergy::gui {
|
2021-04-22 14:00:42 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
class ClientConnection {
|
2021-04-22 14:00:42 +00:00
|
|
|
public:
|
2024-08-07 14:05:18 +00:00
|
|
|
explicit ClientConnection(QWidget &parent, AppConfig &appConfig);
|
2024-07-02 19:07:06 +00:00
|
|
|
void update(const QString &line);
|
|
|
|
|
void setCheckConnection(bool checkConnection);
|
2021-04-22 14:00:42 +00:00
|
|
|
|
|
|
|
|
private:
|
2024-07-02 19:07:06 +00:00
|
|
|
QString getMessage(const QString &line) const;
|
|
|
|
|
bool checkMainWindow();
|
|
|
|
|
void showMessage(const QString &message) const;
|
2024-08-07 14:05:18 +00:00
|
|
|
|
|
|
|
|
QWidget &m_parent;
|
|
|
|
|
AppConfig &m_appConfig;
|
|
|
|
|
bool m_checkConnection = false;
|
2021-04-22 14:00:42 +00:00
|
|
|
};
|
|
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
} // namespace synergy::gui
|