Changeset 284 in vbox for trunk/src/VBox
- Timestamp:
- Jan 24, 2007 6:32:53 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 17829
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r281 r284 218 218 } 219 219 220 QString toString (CEnums::VRDPAuthType t) const 221 { 222 AssertMsg (!vrdpAuthTypes [t].isNull(), ("No text for %d", t)); 223 return vrdpAuthTypes [t]; 224 } 225 226 CEnums::VRDPAuthType toVRDPAuthType (const QString &s) const 227 { 228 QStringVector::const_iterator it = 229 qFind (vrdpAuthTypes.begin(), vrdpAuthTypes.end(), s); 230 AssertMsg (it != vrdpAuthTypes.end(), ("No value for {%s}", s.latin1())); 231 return CEnums::VRDPAuthType (it - vrdpAuthTypes.begin()); 232 } 233 220 234 /** 221 235 * Similar to toString (CEnums::HardDiskType), but returns 'Differencing' … … 421 435 QStringVector diskTypes; 422 436 QStringVector diskStorageTypes; 437 QStringVector vrdpAuthTypes; 423 438 QStringVector diskControllerDevices; 424 439 QStringVector audioDriverTypes; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r281 r284 326 326 , diskTypes (CEnums::HardDiskType_COUNT) 327 327 , diskStorageTypes (CEnums::HardDiskStorageType_COUNT) 328 , vrdpAuthTypes (CEnums::VRDPAuthType_COUNT) 328 329 , diskControllerDevices (3) 329 330 , audioDriverTypes (CEnums::AudioDriverType_COUNT) … … 1198 1199 diskStorageTypes [CEnums::ISCSIHardDisk] = 1199 1200 tr ("iSCSI", "DiskStorageType"); 1201 1202 vrdpAuthTypes [CEnums::VRDPAuthNull] = 1203 tr ("Null", "VRDPAuthType"); 1204 vrdpAuthTypes [CEnums::VRDPAuthExternal] = 1205 tr ("External", "VRDPAuthType"); 1206 vrdpAuthTypes [CEnums::VRDPAuthGuest] = 1207 tr ("Guest", "VRDPAuthType"); 1200 1208 1201 1209 Assert (diskControllerDevices.count() == 3); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui
r253 r284 232 232 </property> 233 233 </item> 234 <item> 235 <property name="text"> 236 <string> VRDP </string> 237 </property> 238 <property name="text"> 239 <string>7</string> 240 </property> 241 <property name="text"> 242 <string>#vrdp</string> 243 </property> 244 <property name="pixmap"> 245 <pixmap>discard_cur_state_16px.png</pixmap> 246 </property> 247 <property name="pixmap"> 248 <pixmap></pixmap> 249 </property> 250 <property name="pixmap"> 251 <pixmap></pixmap> 252 </property> 253 </item> 234 254 <property name="name"> 235 255 <cstring>listView</cstring> … … 2021 2041 </vbox> 2022 2042 </widget> 2043 </vbox> 2044 </widget> 2045 <widget class="QWidget"> 2046 <property name="name"> 2047 <cstring>pageVRDP</cstring> 2048 </property> 2049 <attribute name="id"> 2050 <number>7</number> 2051 </attribute> 2052 <vbox> 2053 <property name="name"> 2054 <cstring>unnamed</cstring> 2055 </property> 2056 <property name="margin"> 2057 <number>0</number> 2058 </property> 2059 <widget class="QGroupBox"> 2060 <property name="name"> 2061 <cstring>grbVRDP</cstring> 2062 </property> 2063 <property name="title"> 2064 <string>&Enable VRDP Server</string> 2065 </property> 2066 <property name="checkable"> 2067 <bool>true</bool> 2068 </property> 2069 <property name="checked"> 2070 <bool>true</bool> 2071 </property> 2072 <hbox> 2073 <property name="name"> 2074 <cstring>unnamed</cstring> 2075 </property> 2076 <widget class="QLayoutWidget"> 2077 <property name="name"> 2078 <cstring>layout31</cstring> 2079 </property> 2080 <vbox> 2081 <property name="name"> 2082 <cstring>unnamed</cstring> 2083 </property> 2084 <widget class="QLabel"> 2085 <property name="name"> 2086 <cstring>txVRDPPort</cstring> 2087 </property> 2088 <property name="text"> 2089 <string>Server port </string> 2090 </property> 2091 <property name="buddy" stdset="0"> 2092 <cstring>cbAudioDriver</cstring> 2093 </property> 2094 </widget> 2095 <widget class="QLabel"> 2096 <property name="name"> 2097 <cstring>txVRDPAuthMethod</cstring> 2098 </property> 2099 <property name="text"> 2100 <string>Authentication Method </string> 2101 </property> 2102 <property name="buddy" stdset="0"> 2103 <cstring>cbAudioDriver</cstring> 2104 </property> 2105 </widget> 2106 <widget class="QLabel"> 2107 <property name="name"> 2108 <cstring>txVRDPAuthTimeout</cstring> 2109 </property> 2110 <property name="text"> 2111 <string>Authentication Timeout </string> 2112 </property> 2113 <property name="buddy" stdset="0"> 2114 <cstring>cbAudioDriver</cstring> 2115 </property> 2116 </widget> 2117 </vbox> 2118 </widget> 2119 <widget class="QLayoutWidget"> 2120 <property name="name"> 2121 <cstring>layout32</cstring> 2122 </property> 2123 <vbox> 2124 <property name="name"> 2125 <cstring>unnamed</cstring> 2126 </property> 2127 <widget class="QLineEdit"> 2128 <property name="name"> 2129 <cstring>leVRDPPort</cstring> 2130 </property> 2131 <property name="sizePolicy"> 2132 <sizepolicy> 2133 <hsizetype>1</hsizetype> 2134 <vsizetype>0</vsizetype> 2135 <horstretch>0</horstretch> 2136 <verstretch>0</verstretch> 2137 </sizepolicy> 2138 </property> 2139 <property name="whatsThis" stdset="0"> 2140 <string>Displays the VRDP Server port.</string> 2141 </property> 2142 </widget> 2143 <widget class="QComboBox"> 2144 <property name="name"> 2145 <cstring>cbVRDPAuthType</cstring> 2146 </property> 2147 <property name="sizePolicy"> 2148 <sizepolicy> 2149 <hsizetype>1</hsizetype> 2150 <vsizetype>0</vsizetype> 2151 <horstretch>0</horstretch> 2152 <verstretch>0</verstretch> 2153 </sizepolicy> 2154 </property> 2155 <property name="whatsThis" stdset="0"> 2156 <string>Defines the VRDP authentication method.</string> 2157 </property> 2158 </widget> 2159 <widget class="QLineEdit"> 2160 <property name="name"> 2161 <cstring>leVRDPTimeout</cstring> 2162 </property> 2163 <property name="sizePolicy"> 2164 <sizepolicy> 2165 <hsizetype>1</hsizetype> 2166 <vsizetype>0</vsizetype> 2167 <horstretch>0</horstretch> 2168 <verstretch>0</verstretch> 2169 </sizepolicy> 2170 </property> 2171 <property name="whatsThis" stdset="0"> 2172 <string>Specifies the timeout for guest authentication, in milliseconds.</string> 2173 </property> 2174 </widget> 2175 </vbox> 2176 </widget> 2177 <widget class="QLayoutWidget"> 2178 <property name="name"> 2179 <cstring>layout33</cstring> 2180 </property> 2181 <vbox> 2182 <property name="name"> 2183 <cstring>unnamed</cstring> 2184 </property> 2185 <spacer> 2186 <property name="name"> 2187 <cstring>spacer36_2</cstring> 2188 </property> 2189 <property name="orientation"> 2190 <enum>Horizontal</enum> 2191 </property> 2192 <property name="sizeType"> 2193 <enum>Expanding</enum> 2194 </property> 2195 <property name="sizeHint"> 2196 <size> 2197 <width>16</width> 2198 <height>20</height> 2199 </size> 2200 </property> 2201 </spacer> 2202 <spacer> 2203 <property name="name"> 2204 <cstring>spacer36_2_3</cstring> 2205 </property> 2206 <property name="orientation"> 2207 <enum>Horizontal</enum> 2208 </property> 2209 <property name="sizeType"> 2210 <enum>Expanding</enum> 2211 </property> 2212 <property name="sizeHint"> 2213 <size> 2214 <width>16</width> 2215 <height>20</height> 2216 </size> 2217 </property> 2218 </spacer> 2219 <spacer> 2220 <property name="name"> 2221 <cstring>spacer36_2_2</cstring> 2222 </property> 2223 <property name="orientation"> 2224 <enum>Horizontal</enum> 2225 </property> 2226 <property name="sizeType"> 2227 <enum>Expanding</enum> 2228 </property> 2229 <property name="sizeHint"> 2230 <size> 2231 <width>16</width> 2232 <height>20</height> 2233 </size> 2234 </property> 2235 </spacer> 2236 </vbox> 2237 </widget> 2238 </hbox> 2239 </widget> 2240 <spacer> 2241 <property name="name"> 2242 <cstring>spacer11_2</cstring> 2243 </property> 2244 <property name="orientation"> 2245 <enum>Vertical</enum> 2246 </property> 2247 <property name="sizeType"> 2248 <enum>Expanding</enum> 2249 </property> 2250 <property name="sizeHint"> 2251 <size> 2252 <width>20</width> 2253 <height>110</height> 2254 </size> 2255 </property> 2256 </spacer> 2023 2257 </vbox> 2024 2258 </widget> … … 2359 2593 <tabstop>tbUSBFilterUp</tabstop> 2360 2594 <tabstop>tbUSBFilterDown</tabstop> 2595 <tabstop>grbVRDP</tabstop> 2596 <tabstop>leVRDPPort</tabstop> 2597 <tabstop>cbVRDPAuthType</tabstop> 2598 <tabstop>leVRDPTimeout</tabstop> 2361 2599 <tabstop>buttonHelp</tabstop> 2362 2600 <tabstop>buttonOk</tabstop> … … 2397 2635 <variable access="private">QIWidgetValidator *wvalDVD;</variable> 2398 2636 <variable access="private">QIWidgetValidator *wvalFloppy;</variable> 2637 <variable access="private">QIWidgetValidator *wvalVRDP;</variable> 2399 2638 <variable access="private">QUuid uuidHDA;</variable> 2400 2639 <variable access="private">QUuid uuidHDB;</variable> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
r253 r284 457 457 mUSBFilterListModified = false; 458 458 459 /* VRDP Page */ 460 461 QWhatsThis::add (static_cast <QWidget *> (grbVRDP->child ("qt_groupbox_checkbox")), 462 tr ("When checked, enables the Virtual Remote Desktop " 463 "Protocol which allows remote clients to connect " 464 "to this virtual machine (when it is running) " 465 "using a VRDP client.")); 466 467 ULONG maxPort = 65535; 468 leVRDPPort->setValidator (new QIntValidator (0, maxPort, this)); 469 leVRDPTimeout->setValidator (new QIntValidator (0, maxPort, this)); 470 wvalVRDP = new QIWidgetValidator (pageVRDP, this); 471 connect (wvalVRDP, SIGNAL (validityChanged (const QIWidgetValidator *)), 472 this, SLOT (enableOk (const QIWidgetValidator *))); 473 connect (wvalVRDP, SIGNAL (isValidRequested (QIWidgetValidator *)), 474 this, SLOT (revalidate( QIWidgetValidator *))); 475 476 connect (grbVRDP, SIGNAL (toggled (bool)), wvalFloppy, SLOT (revalidate())); 477 connect (leVRDPPort, SIGNAL (textChanged (const QString&)), wvalFloppy, SLOT (revalidate())); 478 connect (leVRDPTimeout, SIGNAL (textChanged (const QString&)), wvalFloppy, SLOT (revalidate())); 479 459 480 /* 460 481 * set initial values … … 557 578 wvalDVD->revalidate(); 558 579 wvalFloppy->revalidate(); 580 581 /* VRDP Page */ 582 583 leVRDPPort->setAlignment (Qt::AlignRight); 584 cbVRDPAuthType->insertItem (vboxGlobal().toString (CEnums::VRDPAuthNull)); 585 cbVRDPAuthType->insertItem (vboxGlobal().toString (CEnums::VRDPAuthExternal)); 586 cbVRDPAuthType->insertItem (vboxGlobal().toString (CEnums::VRDPAuthGuest)); 587 leVRDPTimeout->setAlignment (Qt::AlignRight); 559 588 } 560 589 … … 938 967 setWarning (tr ("Incorrect host network interface is selected for Adapter %1.") 939 968 .arg (slot)); 969 } 970 else if (pg == pageVRDP) 971 { 972 valid = !(grbVRDP->isChecked() && 973 (leVRDPPort->text().isEmpty() || leVRDPTimeout->text().isEmpty())); 974 if (!valid && leVRDPPort->text().isEmpty()) 975 setWarning (tr ("VRDP Port is not set.")); 976 if (!valid && leVRDPTimeout->text().isEmpty()) 977 setWarning (tr ("VRDP Timeout is not set.")); 940 978 } 941 979 … … 1210 1248 } 1211 1249 1250 /* vrdp */ 1251 { 1252 CVRDPServer vrdp = machine.GetVRDPServer(); 1253 grbVRDP->setChecked (vrdp.GetEnabled()); 1254 leVRDPPort->setText (QString::number (vrdp.GetPort())); 1255 cbVRDPAuthType->setCurrentText (vboxGlobal().toString (vrdp.GetAuthType())); 1256 leVRDPTimeout->setText (QString::number (vrdp.GetAuthTimeout())); 1257 } 1258 1212 1259 /* request for media shortcuts update */ 1213 1260 cbHDA->setBelongsTo(machine.GetId()); … … 1425 1472 } 1426 1473 1474 /* vrdp */ 1475 { 1476 CVRDPServer vrdp = cmachine.GetVRDPServer(); 1477 vrdp.SetEnabled (grbVRDP->isChecked()); 1478 vrdp.SetPort (leVRDPPort->text().toULong()); 1479 vrdp.SetAuthType (vboxGlobal().toVRDPAuthType (cbVRDPAuthType->currentText())); 1480 vrdp.SetAuthTimeout (leVRDPTimeout->text().toULong()); 1481 } 1482 1427 1483 return COMResult(); 1428 1484 }
Note:
See TracChangeset
for help on using the changeset viewer.