1 /************************************************************************** 2 * Copyright (C) 2005-2020 by Oleksandr Shneyder * 3 * <o.shneyder@phoca-gmbh.de> * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * This program is distributed in the hope that it will be useful, * 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 * GNU General Public License for more details. * 13 * * 14 * You should have received a copy of the GNU General Public License * 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. * 16 ***************************************************************************/ 17 18 #ifndef SETTINGSWIDGET_H 19 #define SETTINGSWIDGET_H 20 21 #include <configwidget.h> 22 23 /** 24 @author Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de> 25 */ 26 class QSpinBox; 27 class QRadioButton; 28 class QCheckBox; 29 class QLineEdit; 30 class QSpinBox; 31 class QLabel; 32 class QPushButton; 33 class QMainWindow; 34 class QGroupBox; 35 36 37 class SettingsWidget : public ConfigWidget 38 { 39 Q_OBJECT 40 public: 41 SettingsWidget ( QString id, ONMainWindow * mw, 42 QWidget * parent=0, Qt::WindowFlags f=0 ); 43 ~SettingsWidget(); 44 void setDefaults(); 45 void saveSettings(); 46 #ifdef Q_OS_UNIX 47 void setDirectRdp(bool direct, bool isXDMCP); 48 public slots: 49 void setServerSettings(QString server, QString port, QString user); 50 void updateCmdLine(); 51 #endif 52 53 private slots: 54 void slot_identDisplays(); 55 void slot_hideIdentWins(); 56 void slot_kbdClicked(); 57 private: 58 QSpinBox* width; 59 QSpinBox* height; 60 QSpinBox* displayNumber; 61 QRadioButton* fs; 62 QRadioButton* custom; 63 QRadioButton* display; 64 QRadioButton* maxRes; 65 QRadioButton* rbKbdAuto; 66 QRadioButton* rbKbdNoSet; 67 QRadioButton* rbKbdSet; 68 QGroupBox* gbKbdString; 69 QLineEdit* leModel; 70 QLineEdit* leLayout; 71 QLineEdit* leVariant; 72 QCheckBox* cbSetDPI; 73 QCheckBox* cbXinerama; 74 QSpinBox* DPI; 75 QLabel* widthLabel; 76 QLabel* heightLabel; 77 QLabel* layoutLabel; 78 QLabel* typeLabel; 79 QLabel* lDisplay; 80 bool multiDisp; 81 QPushButton* pbIdentDisp; 82 QList <QMainWindow*> identWins; 83 QGroupBox *kgb; 84 QGroupBox *clipGr; 85 QRadioButton *rbClipBoth; 86 QRadioButton *rbClipServer; 87 QRadioButton *rbClipClient; 88 QRadioButton *rbClipNone; 89 90 #ifdef Q_OS_UNIX 91 QGroupBox *rdpBox; 92 QRadioButton* rRdesktop; 93 QRadioButton* rXfreeRDPOld; 94 QRadioButton* rXfreeRDPNew; 95 QLineEdit* cmdLine; 96 QLineEdit* params; 97 QString server; 98 QString user; 99 QString port; 100 QGroupBox *xdmcpBox; 101 QRadioButton* rXnest; 102 QRadioButton* rXephyr; 103 QRadioButton* rX2goagent; 104 QLineEdit* xdmcpCmdLine; 105 QLineEdit* xdmcpParams; 106 #endif 107 QFrame* hLine1; 108 QFrame* hLine2; 109 110 private: 111 void readConfig(); 112 }; 113 114 #endif 115