Changeset View
Changeset View
Standalone View
Standalone View
rdp/rdphostpreferences.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | |||||
95 | 95 | | |||
96 | QWidget* RdpHostPreferences::createProtocolSpecificConfigPage() | 96 | QWidget* RdpHostPreferences::createProtocolSpecificConfigPage() | ||
97 | { | 97 | { | ||
98 | QWidget *rdpPage = new QWidget(); | 98 | QWidget *rdpPage = new QWidget(); | ||
99 | rdpUi.setupUi(rdpPage); | 99 | rdpUi.setupUi(rdpPage); | ||
100 | 100 | | |||
101 | connect(rdpUi.kcfg_Sound, SIGNAL(currentIndexChanged(int)), SLOT(updateSoundSystem(int))); | 101 | connect(rdpUi.kcfg_Sound, SIGNAL(currentIndexChanged(int)), SLOT(updateSoundSystem(int))); | ||
102 | 102 | | |||
103 | rdpUi.loginGroupBox->setVisible(false); | 103 | rdpUi.loginTab->setVisible(false); | ||
104 | 104 | | |||
105 | rdpUi.kcfg_Height->setValue(height()); | 105 | rdpUi.kcfg_Height->setValue(height()); | ||
106 | rdpUi.kcfg_Width->setValue(width()); | 106 | rdpUi.kcfg_Width->setValue(width()); | ||
107 | rdpUi.kcfg_Resolution->setCurrentIndex(resolution()); | 107 | rdpUi.kcfg_Resolution->setCurrentIndex(resolution()); | ||
108 | rdpUi.kcfg_ColorDepth->setCurrentIndex(colorDepth()); | 108 | rdpUi.kcfg_ColorDepth->setCurrentIndex(colorDepth()); | ||
109 | rdpUi.kcfg_KeyboardLayout->setCurrentIndex(keymap2int(keyboardLayout())); | 109 | rdpUi.kcfg_KeyboardLayout->setCurrentIndex(keymap2int(keyboardLayout())); | ||
110 | rdpUi.kcfg_Sound->setCurrentIndex(sound()); | 110 | rdpUi.kcfg_Sound->setCurrentIndex(sound()); | ||
111 | rdpUi.kcfg_SoundSystem->setCurrentIndex(soundSystem()); | 111 | rdpUi.kcfg_SoundSystem->setCurrentIndex(soundSystem()); | ||
112 | rdpUi.kcfg_Console->setChecked(console()); | 112 | rdpUi.kcfg_Console->setChecked(console()); | ||
113 | rdpUi.kcfg_ExtraOptions->setText(extraOptions()); | 113 | rdpUi.kcfg_ExtraOptions->setText(extraOptions()); | ||
114 | rdpUi.kcfg_RemoteFX->setChecked(remoteFX()); | 114 | rdpUi.kcfg_RemoteFX->setChecked(remoteFX()); | ||
115 | rdpUi.kcfg_Performance->setCurrentIndex(performance()); | 115 | rdpUi.kcfg_Performance->setCurrentIndex(performance()); | ||
116 | rdpUi.kcfg_ShareMedia->setText(shareMedia()); | 116 | rdpUi.kcfg_ShareMedia->setText(shareMedia()); | ||
117 | rdpUi.kcfg_RDGatewayServer->setText(rDGatewayServer()); | ||||
118 | rdpUi.kcfg_RDGatewayUsername->setText(rDGatewayUsername()); | ||||
119 | rdpUi.kcfg_RDGatewayPassword->setText(rDGatewayPassword()); | ||||
120 | rdpUi.kcfg_RDGatewayDomain->setText(rDGatewayDomain()); | ||||
117 | 121 | | |||
118 | // Have to call updateWidthHeight() here | 122 | // Have to call updateWidthHeight() here | ||
119 | // We leverage the final part of this function to enable/disable kcfg_Height and kcfg_Width | 123 | // We leverage the final part of this function to enable/disable kcfg_Height and kcfg_Width | ||
120 | updateWidthHeight(resolution()); | 124 | updateWidthHeight(resolution()); | ||
121 | 125 | | |||
122 | connect(rdpUi.kcfg_Resolution, SIGNAL(currentIndexChanged(int)), SLOT(updateWidthHeight(int))); | 126 | connect(rdpUi.kcfg_Resolution, SIGNAL(currentIndexChanged(int)), SLOT(updateWidthHeight(int))); | ||
123 | 127 | | |||
124 | return rdpPage; | 128 | return rdpPage; | ||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 196 | { | |||
199 | setKeyboardLayout(int2keymap(rdpUi.kcfg_KeyboardLayout->currentIndex())); | 203 | setKeyboardLayout(int2keymap(rdpUi.kcfg_KeyboardLayout->currentIndex())); | ||
200 | setSound(rdpUi.kcfg_Sound->currentIndex()); | 204 | setSound(rdpUi.kcfg_Sound->currentIndex()); | ||
201 | setSoundSystem(rdpUi.kcfg_SoundSystem->currentIndex()); | 205 | setSoundSystem(rdpUi.kcfg_SoundSystem->currentIndex()); | ||
202 | setConsole(rdpUi.kcfg_Console->isChecked()); | 206 | setConsole(rdpUi.kcfg_Console->isChecked()); | ||
203 | setExtraOptions(rdpUi.kcfg_ExtraOptions->text()); | 207 | setExtraOptions(rdpUi.kcfg_ExtraOptions->text()); | ||
204 | setRemoteFX(rdpUi.kcfg_RemoteFX->isChecked()); | 208 | setRemoteFX(rdpUi.kcfg_RemoteFX->isChecked()); | ||
205 | setPerformance(rdpUi.kcfg_Performance->currentIndex()); | 209 | setPerformance(rdpUi.kcfg_Performance->currentIndex()); | ||
206 | setShareMedia(rdpUi.kcfg_ShareMedia->text()); | 210 | setShareMedia(rdpUi.kcfg_ShareMedia->text()); | ||
211 | setRDGatewayServer(rdpUi.kcfg_RDGatewayServer->text()); | ||||
212 | setRDGatewayUsername(rdpUi.kcfg_RDGatewayUsername->text()); | ||||
213 | setRDGatewayPassword(rdpUi.kcfg_RDGatewayPassword->text()); | ||||
214 | setRDGatewayDomain(rdpUi.kcfg_RDGatewayDomain->text()); | ||||
207 | } | 215 | } | ||
208 | 216 | | |||
209 | void RdpHostPreferences::setResolution(int resolution) | 217 | void RdpHostPreferences::setResolution(int resolution) | ||
210 | { | 218 | { | ||
211 | if (resolution >= 0) | 219 | if (resolution >= 0) | ||
212 | m_configGroup.writeEntry("resolution", resolution); | 220 | m_configGroup.writeEntry("resolution", resolution); | ||
213 | } | 221 | } | ||
214 | 222 | | |||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 316 | if (!shareMedia.isNull()) | |||
309 | m_configGroup.writeEntry("shareMedia", shareMedia); | 317 | m_configGroup.writeEntry("shareMedia", shareMedia); | ||
310 | } | 318 | } | ||
311 | 319 | | |||
312 | QString RdpHostPreferences::shareMedia() const | 320 | QString RdpHostPreferences::shareMedia() const | ||
313 | { | 321 | { | ||
314 | return m_configGroup.readEntry("shareMedia", Settings::shareMedia()); | 322 | return m_configGroup.readEntry("shareMedia", Settings::shareMedia()); | ||
315 | } | 323 | } | ||
316 | 324 | | |||
325 | void RdpHostPreferences::setRDGatewayServer(const QString &server) | ||||
326 | { | ||||
327 | m_configGroup.writeEntry("rDGatewayServer", server); | ||||
328 | } | ||||
329 | | ||||
330 | QString RdpHostPreferences::rDGatewayServer() const | ||||
331 | { | ||||
332 | return m_configGroup.readEntry("rDGatewayServer", Settings::rDGatewayServer()); | ||||
333 | } | ||||
334 | | ||||
335 | void RdpHostPreferences::setRDGatewayUsername(const QString &username) | ||||
336 | { | ||||
337 | m_configGroup.writeEntry("rDGatewayUsername", username); | ||||
338 | } | ||||
339 | | ||||
340 | QString RdpHostPreferences::rDGatewayUsername() const | ||||
341 | { | ||||
342 | return m_configGroup.readEntry("rDGatewayUsername", Settings::rDGatewayUsername()); | ||||
343 | } | ||||
344 | | ||||
345 | void RdpHostPreferences::setRDGatewayPassword(const QString &password) | ||||
346 | { | ||||
347 | m_configGroup.writeEntry("rDGatewayPassword", password); | ||||
348 | } | ||||
349 | | ||||
350 | QString RdpHostPreferences::rDGatewayPassword() const | ||||
351 | { | ||||
352 | return m_configGroup.readEntry("rDGatewayPassword", Settings::rDGatewayPassword()); | ||||
353 | } | ||||
354 | | ||||
355 | void RdpHostPreferences::setRDGatewayDomain(const QString &domain) | ||||
356 | { | ||||
357 | m_configGroup.writeEntry("rDGatewayDomain", domain); | ||||
358 | } | ||||
359 | | ||||
360 | QString RdpHostPreferences::rDGatewayDomain() const | ||||
361 | { | ||||
362 | return m_configGroup.readEntry("rDGatewayDomain", Settings::rDGatewayDomain()); | ||||
363 | } | ||||
364 | | ||||
317 | #include "rdphostpreferences.moc" | 365 | #include "rdphostpreferences.moc" |