2012-06-10 16:50:54 +00:00
|
|
|
/*
|
2024-09-17 19:00:25 +00:00
|
|
|
* Deskflow -- mouse and keyboard sharing utility
|
2016-09-07 14:24:00 +00:00
|
|
|
* Copyright (C) 2012-2016 Symless Ltd.
|
2012-06-10 16:50:54 +00:00
|
|
|
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
2015-05-03 02:33:52 +00:00
|
|
|
* found in the file LICENSE that should have accompanied this file.
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* 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-10-06 13:03:26 +00:00
|
|
|
#pragma once
|
2012-06-10 16:50:54 +00:00
|
|
|
|
|
|
|
|
#include "ScreenSetupModel.h"
|
|
|
|
|
#include "ServerConfig.h"
|
2024-08-07 14:05:18 +00:00
|
|
|
#include "gui/config/AppConfig.h"
|
2012-06-10 16:50:54 +00:00
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
2024-10-18 23:52:32 +00:00
|
|
|
namespace Ui {
|
|
|
|
|
class ServerConfigDialog;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ServerConfigDialog : public QDialog
|
2024-10-17 18:04:35 +00:00
|
|
|
{
|
2024-07-02 19:07:06 +00:00
|
|
|
Q_OBJECT
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
public:
|
2024-10-17 18:04:35 +00:00
|
|
|
ServerConfigDialog(QWidget *parent, ServerConfig &config, AppConfig &appConfig);
|
2024-10-18 23:52:32 +00:00
|
|
|
~ServerConfigDialog();
|
2024-07-02 19:07:06 +00:00
|
|
|
bool addClient(const QString &clientName);
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
public slots:
|
2024-08-07 14:05:18 +00:00
|
|
|
void accept() override;
|
2024-07-02 19:07:06 +00:00
|
|
|
void reject() override;
|
2024-10-17 18:04:35 +00:00
|
|
|
void message(const QString &message)
|
|
|
|
|
{
|
|
|
|
|
m_Message = message;
|
|
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
protected slots:
|
|
|
|
|
void on_m_pButtonNewHotkey_clicked();
|
|
|
|
|
void on_m_pListHotkeys_itemSelectionChanged();
|
|
|
|
|
void on_m_pButtonEditHotkey_clicked();
|
|
|
|
|
void on_m_pButtonRemoveHotkey_clicked();
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void on_m_pButtonNewAction_clicked();
|
|
|
|
|
void on_m_pListActions_itemSelectionChanged();
|
|
|
|
|
void on_m_pButtonEditAction_clicked();
|
|
|
|
|
void on_m_pButtonRemoveAction_clicked();
|
|
|
|
|
void on_m_pCheckBoxEnableClipboard_stateChanged(int state);
|
|
|
|
|
void on_m_pButtonAddComputer_clicked();
|
|
|
|
|
void onScreenRemoved();
|
|
|
|
|
void on_m_pCheckBoxUseExternalConfig_toggled(bool checked = false);
|
|
|
|
|
bool on_m_pButtonBrowseConfigFile_clicked();
|
2017-01-30 14:45:30 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
protected:
|
|
|
|
|
bool addComputer(const QString &clientName, bool doSilent);
|
2024-10-17 18:04:35 +00:00
|
|
|
ServerConfig &serverConfig()
|
|
|
|
|
{
|
|
|
|
|
return m_ServerConfig;
|
|
|
|
|
}
|
|
|
|
|
void setOriginalServerConfig(const ServerConfig &s)
|
|
|
|
|
{
|
2024-07-22 16:48:02 +00:00
|
|
|
m_OriginalServerConfig = s;
|
|
|
|
|
}
|
2024-10-17 18:04:35 +00:00
|
|
|
ScreenSetupModel &model()
|
|
|
|
|
{
|
|
|
|
|
return m_ScreenSetupModel;
|
|
|
|
|
}
|
|
|
|
|
AppConfig &appConfig()
|
|
|
|
|
{
|
|
|
|
|
return m_appConfig;
|
|
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
private:
|
2024-10-18 23:52:32 +00:00
|
|
|
std::unique_ptr<Ui::ServerConfigDialog> ui;
|
2024-07-22 16:48:02 +00:00
|
|
|
ServerConfig &m_OriginalServerConfig;
|
2024-07-02 19:07:06 +00:00
|
|
|
ServerConfig m_ServerConfig;
|
2024-07-22 16:48:02 +00:00
|
|
|
bool m_OriginalServerConfigIsExternal;
|
|
|
|
|
QString m_OriginalServerConfigUsesExternalFile;
|
2024-07-02 19:07:06 +00:00
|
|
|
ScreenSetupModel m_ScreenSetupModel;
|
|
|
|
|
QString m_Message;
|
2024-07-04 09:14:54 +00:00
|
|
|
AppConfig &m_appConfig;
|
2021-08-20 12:22:07 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
private slots:
|
|
|
|
|
void onChange();
|
2012-06-10 16:50:54 +00:00
|
|
|
};
|