File indexing completed on 2024-04-21 04:58:36
0001 /* 0002 SPDX-FileCopyrightText: 2007 Urs Wolfer <uwolfer@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef VNCHOSTPREFERENCES_H 0008 #define VNCHOSTPREFERENCES_H 0009 0010 #include "hostpreferences.h" 0011 #include "ui_vncpreferences.h" 0012 0013 class VncHostPreferences : public HostPreferences 0014 { 0015 Q_OBJECT 0016 0017 public: 0018 explicit VncHostPreferences(KConfigGroup configGroup, QObject *parent = nullptr); 0019 ~VncHostPreferences() override; 0020 0021 void setQuality(RemoteView::Quality quality); 0022 RemoteView::Quality quality(); 0023 0024 bool useSshTunnel() const; 0025 bool useSshTunnelLoopback() const; 0026 int sshTunnelPort() const; 0027 QString sshTunnelUserName() const; 0028 bool dontCopyPasswords() const; 0029 0030 protected: 0031 void acceptConfig() override; 0032 0033 QWidget *createProtocolSpecificConfigPage() override; 0034 0035 private: 0036 void setUseSshTunnel(bool useSshTunnel); 0037 void setUseSshTunnelLoopback(bool useSshTunnelLoopback); 0038 void setSshTunnelPort(int port); 0039 void setSshTunnelUserName(const QString &userName); 0040 void setDontCopyPasswords(bool dontCopyPasswords); 0041 0042 Ui::VncPreferences vncUi; 0043 void checkEnableCustomSize(int index); 0044 0045 private Q_SLOTS: 0046 void updateScalingWidthHeight(int index); 0047 void updateScaling(bool enabled); 0048 }; 0049 0050 #endif