- Timestamp:
- Sep 9, 2015 4:02:19 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
r57672 r57675 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIGDetails Details class implementation.3 * VBox Qt GUI - UIGDetailsElement[Name] classes implementation. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2012-201 4Oracle Corporation7 * Copyright (C) 2012-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h
r57672 r57675 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIGDetailsElement s class declaration.3 * VBox Qt GUI - UIGDetailsElement[Name] classes declaration. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2012-201 3Oracle Corporation7 * Copyright (C) 2012-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIGDetailsElements_h__19 #define __ UIGDetailsElements_h__18 #ifndef ___UIGDetailsElements_h___ 19 #define ___UIGDetailsElements_h___ 20 20 21 21 /* GUI includes: */ … … 28 28 29 29 30 /* Element update task:*/30 /** UITask extension used as update task for the details-element. */ 31 31 class UIGDetailsUpdateTask : public UITask 32 32 { … … 35 35 public: 36 36 37 /* Constructor:*/37 /** Constructs update task taking @a machine as data. */ 38 38 UIGDetailsUpdateTask(const CMachine &machine); 39 39 }; 40 40 41 /* Details element interface: */ 41 /** UIGDetailsElement extension used as a wrapping interface to 42 * extend base-class with async functionality performed by the COM worker-threads. */ 42 43 class UIGDetailsElementInterface : public UIGDetailsElement 43 44 { … … 46 47 public: 47 48 48 /* Constructor/destructor: */ 49 /** Constructs details-element interface for passed @a pParent set. 50 * @param type brings the details-element type this element belongs to. 51 * @param fOpened brings whether the details-element should be visually opened. */ 49 52 UIGDetailsElementInterface(UIGDetailsSet *pParent, DetailsElementType type, bool fOpened); 50 53 51 54 protected: 52 55 53 /* Helper: Translate stuff:*/56 /** Performs translation. */ 54 57 virtual void retranslateUi(); 55 58 56 /* Helpers: Update stuff:*/59 /** Updates appearance. */ 57 60 virtual void updateAppearance(); 61 62 /** Creates update task. */ 58 63 virtual UITask* createUpdateTask() = 0; 59 64 60 65 private slots: 61 66 62 /* Handler: Update stuff:*/67 /** Handles the signal about update @a pTask is finished. */ 63 68 virtual void sltUpdateAppearanceFinished(UITask *pTask); 64 69 65 70 private: 66 71 67 /* Variables:*/72 /** Holds the instance of the update task. */ 68 73 UITask *m_pTask; 69 74 }; 70 75 71 76 72 /* Element 'Preview':*/77 /** UIGDetailsElementInterface extension for the details-element type 'Preview'. */ 73 78 class UIGDetailsElementPreview : public UIGDetailsElement 74 79 { … … 77 82 public: 78 83 79 /* Constructor: */ 84 /** Constructs details-element interface for passed @a pParent set. 85 * @param fOpened brings whether the details-element should be opened. */ 80 86 UIGDetailsElementPreview(UIGDetailsSet *pParent, bool fOpened); 81 87 … … 87 93 private: 88 94 89 /* Helper: Translate stuff:*/95 /** Performs translation. */ 90 96 virtual void retranslateUi(); 91 97 92 /* Helpers: Layout stuff:*/98 /** Returns minimum width hint. */ 93 99 int minimumWidthHint() const; 100 /** Returns minimum height hint. 101 * @param fClosed allows to specify whether the hint should 102 * be calculated for the closed element. */ 94 103 int minimumHeightHint(bool fClosed) const; 104 /** Updates layout. */ 95 105 void updateLayout(); 96 106 97 /* Helper: Update stuff:*/107 /** Updates appearance. */ 98 108 void updateAppearance(); 99 109 100 /* Variables:*/110 /** Holds the instance of VM preview. */ 101 111 UIGMachinePreview *m_pPreview; 102 112 }; 103 113 104 114 105 /* Task 'General':*/115 /** UITask extension used as update task for the details-element type 'General'. */ 106 116 class UIGDetailsUpdateTaskGeneral : public UIGDetailsUpdateTask 107 117 { … … 110 120 public: 111 121 112 /* Constructor:*/122 /** Constructs update task passing @a machine to the base-class. */ 113 123 UIGDetailsUpdateTaskGeneral(const CMachine &machine) 114 124 : UIGDetailsUpdateTask(machine) {} … … 116 126 private: 117 127 118 /* Helpers: Prepare stuff:*/119 void run(); 120 }; 121 122 /* Element 'General':*/128 /** Contains update task body. */ 129 void run(); 130 }; 131 132 /** UIGDetailsElementInterface extension for the details-element type 'General'. */ 123 133 class UIGDetailsElementGeneral : public UIGDetailsElementInterface 124 134 { … … 127 137 public: 128 138 129 /* Constructor: */ 139 /** Constructs details-element object for passed @a pParent set. 140 * @param fOpened brings whether the details-element should be visually opened. */ 130 141 UIGDetailsElementGeneral(UIGDetailsSet *pParent, bool fOpened) 131 142 : UIGDetailsElementInterface(pParent, DetailsElementType_General, fOpened) {} … … 133 144 private: 134 145 135 /* Helper: Update stuff:*/146 /** Creates update task for this element. */ 136 147 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskGeneral(machine()); } 137 148 }; 138 149 139 150 140 /* Task 'System':*/151 /** UITask extension used as update task for the details-element type 'System'. */ 141 152 class UIGDetailsUpdateTaskSystem : public UIGDetailsUpdateTask 142 153 { … … 145 156 public: 146 157 147 /* Constructor:*/158 /** Constructs update task passing @a machine to the base-class. */ 148 159 UIGDetailsUpdateTaskSystem(const CMachine &machine) 149 160 : UIGDetailsUpdateTask(machine) {} … … 151 162 private: 152 163 153 /* Helpers: Prepare stuff:*/154 void run(); 155 }; 156 157 /* Element 'System':*/164 /** Contains update task body. */ 165 void run(); 166 }; 167 168 /** UIGDetailsElementInterface extension for the details-element type 'System'. */ 158 169 class UIGDetailsElementSystem : public UIGDetailsElementInterface 159 170 { … … 162 173 public: 163 174 164 /* Constructor: */ 175 /** Constructs details-element object for passed @a pParent set. 176 * @param fOpened brings whether the details-element should be visually opened. */ 165 177 UIGDetailsElementSystem(UIGDetailsSet *pParent, bool fOpened) 166 178 : UIGDetailsElementInterface(pParent, DetailsElementType_System, fOpened) {} … … 168 180 private: 169 181 170 /* Helper: Update stuff:*/182 /** Creates update task for this element. */ 171 183 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskSystem(machine()); } 172 184 }; 173 185 174 186 175 /* Task 'Display':*/187 /** UITask extension used as update task for the details-element type 'Display'. */ 176 188 class UIGDetailsUpdateTaskDisplay : public UIGDetailsUpdateTask 177 189 { … … 180 192 public: 181 193 182 /* Constructor:*/194 /** Constructs update task passing @a machine to the base-class. */ 183 195 UIGDetailsUpdateTaskDisplay(const CMachine &machine) 184 196 : UIGDetailsUpdateTask(machine) {} … … 186 198 private: 187 199 188 /* Helpers: Prepare stuff:*/189 void run(); 190 }; 191 192 /* Element 'Display':*/200 /** Contains update task body. */ 201 void run(); 202 }; 203 204 /** UIGDetailsElementInterface extension for the details-element type 'Display'. */ 193 205 class UIGDetailsElementDisplay : public UIGDetailsElementInterface 194 206 { … … 197 209 public: 198 210 199 /* Constructor: */ 211 /** Constructs details-element object for passed @a pParent set. 212 * @param fOpened brings whether the details-element should be visually opened. */ 200 213 UIGDetailsElementDisplay(UIGDetailsSet *pParent, bool fOpened) 201 214 : UIGDetailsElementInterface(pParent, DetailsElementType_Display, fOpened) {} … … 203 216 private: 204 217 205 /* Helper: Update stuff:*/218 /** Creates update task for this element. */ 206 219 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskDisplay(machine()); } 207 220 }; 208 221 209 222 210 /* Task 'Storage':*/223 /** UITask extension used as update task for the details-element type 'Storage'. */ 211 224 class UIGDetailsUpdateTaskStorage : public UIGDetailsUpdateTask 212 225 { … … 215 228 public: 216 229 217 /* Constructor:*/230 /** Constructs update task passing @a machine to the base-class. */ 218 231 UIGDetailsUpdateTaskStorage(const CMachine &machine) 219 232 : UIGDetailsUpdateTask(machine) {} … … 221 234 private: 222 235 223 /* Helpers: Prepare stuff:*/224 void run(); 225 }; 226 227 /* Element 'Storage':*/236 /** Contains update task body. */ 237 void run(); 238 }; 239 240 /** UIGDetailsElementInterface extension for the details-element type 'Storage'. */ 228 241 class UIGDetailsElementStorage : public UIGDetailsElementInterface 229 242 { … … 232 245 public: 233 246 234 /* Constructor: */ 247 /** Constructs details-element object for passed @a pParent set. 248 * @param fOpened brings whether the details-element should be visually opened. */ 235 249 UIGDetailsElementStorage(UIGDetailsSet *pParent, bool fOpened) 236 250 : UIGDetailsElementInterface(pParent, DetailsElementType_Storage, fOpened) {} … … 238 252 private: 239 253 240 /* Helper: Update stuff:*/254 /** Creates update task for this element. */ 241 255 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskStorage(machine()); } 242 256 }; 243 257 244 258 245 /* Task 'Audio':*/259 /** UITask extension used as update task for the details-element type 'Audio'. */ 246 260 class UIGDetailsUpdateTaskAudio : public UIGDetailsUpdateTask 247 261 { … … 250 264 public: 251 265 252 /* Constructor:*/266 /** Constructs update task passing @a machine to the base-class. */ 253 267 UIGDetailsUpdateTaskAudio(const CMachine &machine) 254 268 : UIGDetailsUpdateTask(machine) {} … … 256 270 private: 257 271 258 /* Helpers: Prepare stuff:*/259 void run(); 260 }; 261 262 /* Element 'Audio':*/272 /** Contains update task body. */ 273 void run(); 274 }; 275 276 /** UIGDetailsElementInterface extension for the details-element type 'Audio'. */ 263 277 class UIGDetailsElementAudio : public UIGDetailsElementInterface 264 278 { … … 267 281 public: 268 282 269 /* Constructor: */ 283 /** Constructs details-element object for passed @a pParent set. 284 * @param fOpened brings whether the details-element should be visually opened. */ 270 285 UIGDetailsElementAudio(UIGDetailsSet *pParent, bool fOpened) 271 286 : UIGDetailsElementInterface(pParent, DetailsElementType_Audio, fOpened) {} … … 273 288 private: 274 289 275 /* Helper: Update stuff:*/290 /** Creates update task for this element. */ 276 291 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskAudio(machine()); } 277 292 }; 278 293 279 294 280 /* Task 'Network':*/295 /** UITask extension used as update task for the details-element type 'Network'. */ 281 296 class UIGDetailsUpdateTaskNetwork : public UIGDetailsUpdateTask 282 297 { … … 285 300 public: 286 301 287 /* Constructor:*/302 /** Constructs update task passing @a machine to the base-class. */ 288 303 UIGDetailsUpdateTaskNetwork(const CMachine &machine) 289 304 : UIGDetailsUpdateTask(machine) {} … … 291 306 private: 292 307 293 /* Helpers: Prepare stuff: */ 294 void run(); 308 /** Contains update task body. */ 309 void run(); 310 311 /** Summarizes generic properties. */ 295 312 static QString summarizeGenericProperties(const CNetworkAdapter &adapter); 296 313 }; 297 314 298 /* Element 'Network':*/315 /** UIGDetailsElementInterface extension for the details-element type 'Network'. */ 299 316 class UIGDetailsElementNetwork : public UIGDetailsElementInterface 300 317 { … … 303 320 public: 304 321 305 /* Constructor: */ 322 /** Constructs details-element object for passed @a pParent set. 323 * @param fOpened brings whether the details-element should be visually opened. */ 306 324 UIGDetailsElementNetwork(UIGDetailsSet *pParent, bool fOpened) 307 325 : UIGDetailsElementInterface(pParent, DetailsElementType_Network, fOpened) {} … … 309 327 private: 310 328 311 /* Helper: Update stuff:*/329 /** Creates update task for this element. */ 312 330 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskNetwork(machine()); } 313 331 }; 314 332 315 333 316 /* Task 'Serial':*/334 /** UITask extension used as update task for the details-element type 'Serial'. */ 317 335 class UIGDetailsUpdateTaskSerial : public UIGDetailsUpdateTask 318 336 { … … 321 339 public: 322 340 323 /* Constructor:*/341 /** Constructs update task passing @a machine to the base-class. */ 324 342 UIGDetailsUpdateTaskSerial(const CMachine &machine) 325 343 : UIGDetailsUpdateTask(machine) {} … … 327 345 private: 328 346 329 /* Helpers: Prepare stuff:*/330 void run(); 331 }; 332 333 /* Element 'Serial':*/347 /** Contains update task body. */ 348 void run(); 349 }; 350 351 /** UIGDetailsElementInterface extension for the details-element type 'Serial'. */ 334 352 class UIGDetailsElementSerial : public UIGDetailsElementInterface 335 353 { … … 338 356 public: 339 357 340 /* Constructor: */ 358 /** Constructs details-element object for passed @a pParent set. 359 * @param fOpened brings whether the details-element should be visually opened. */ 341 360 UIGDetailsElementSerial(UIGDetailsSet *pParent, bool fOpened) 342 361 : UIGDetailsElementInterface(pParent, DetailsElementType_Serial, fOpened) {} … … 344 363 private: 345 364 346 /* Helper: Update stuff:*/365 /** Creates update task for this element. */ 347 366 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskSerial(machine()); } 348 367 }; … … 350 369 351 370 #ifdef VBOX_WITH_PARALLEL_PORTS 352 /* Task 'Parallel':*/371 /** UITask extension used as update task for the details-element type 'Parallel'. */ 353 372 class UIGDetailsUpdateTaskParallel : public UIGDetailsUpdateTask 354 373 { … … 357 376 public: 358 377 359 /* Constructor:*/378 /** Constructs update task passing @a machine to the base-class. */ 360 379 UIGDetailsUpdateTaskParallel(const CMachine &machine) 361 380 : UIGDetailsUpdateTask(machine) {} … … 363 382 private: 364 383 365 /* Helpers: Prepare stuff:*/366 void run(); 367 }; 368 369 /* Element 'Parallel':*/384 /** Contains update task body. */ 385 void run(); 386 }; 387 388 /** UIGDetailsElementInterface extension for the details-element type 'Parallel'. */ 370 389 class UIGDetailsElementParallel : public UIGDetailsElementInterface 371 390 { … … 374 393 public: 375 394 376 /* Constructor: */ 395 /** Constructs details-element object for passed @a pParent set. 396 * @param fOpened brings whether the details-element should be visually opened. */ 377 397 UIGDetailsElementParallel(UIGDetailsSet *pParent, bool fOpened) 378 398 : UIGDetailsElementInterface(pParent, DetailsElementType_Parallel, fOpened) {} … … 380 400 private: 381 401 382 /* Helper: Update stuff:*/402 /** Creates update task for this element. */ 383 403 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskParallel(machine()); } 384 404 }; … … 386 406 387 407 388 /* Task 'USB':*/408 /** UITask extension used as update task for the details-element type 'USB'. */ 389 409 class UIGDetailsUpdateTaskUSB : public UIGDetailsUpdateTask 390 410 { … … 393 413 public: 394 414 395 /* Constructor:*/415 /** Constructs update task passing @a machine to the base-class. */ 396 416 UIGDetailsUpdateTaskUSB(const CMachine &machine) 397 417 : UIGDetailsUpdateTask(machine) {} … … 399 419 private: 400 420 401 /* Helpers: Prepare stuff:*/402 void run(); 403 }; 404 405 /* Element 'USB':*/421 /** Contains update task body. */ 422 void run(); 423 }; 424 425 /** UIGDetailsElementInterface extension for the details-element type 'USB'. */ 406 426 class UIGDetailsElementUSB : public UIGDetailsElementInterface 407 427 { … … 410 430 public: 411 431 412 /* Constructor: */ 432 /** Constructs details-element object for passed @a pParent set. 433 * @param fOpened brings whether the details-element should be visually opened. */ 413 434 UIGDetailsElementUSB(UIGDetailsSet *pParent, bool fOpened) 414 435 : UIGDetailsElementInterface(pParent, DetailsElementType_USB, fOpened) {} … … 416 437 private: 417 438 418 /* Helper: Update stuff:*/439 /** Creates update task for this element. */ 419 440 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskUSB(machine()); } 420 441 }; 421 442 422 443 423 /* Task 'SF':*/444 /** UITask extension used as update task for the details-element type 'SF'. */ 424 445 class UIGDetailsUpdateTaskSF : public UIGDetailsUpdateTask 425 446 { … … 428 449 public: 429 450 430 /* Constructor:*/451 /** Constructs update task passing @a machine to the base-class. */ 431 452 UIGDetailsUpdateTaskSF(const CMachine &machine) 432 453 : UIGDetailsUpdateTask(machine) {} … … 434 455 private: 435 456 436 /* Helpers: Prepare stuff:*/437 void run(); 438 }; 439 440 /* Element 'SF':*/457 /** Contains update task body. */ 458 void run(); 459 }; 460 461 /** UIGDetailsElementInterface extension for the details-element type 'SF'. */ 441 462 class UIGDetailsElementSF : public UIGDetailsElementInterface 442 463 { … … 445 466 public: 446 467 447 /* Constructor: */ 468 /** Constructs details-element object for passed @a pParent set. 469 * @param fOpened brings whether the details-element should be visually opened. */ 448 470 UIGDetailsElementSF(UIGDetailsSet *pParent, bool fOpened) 449 471 : UIGDetailsElementInterface(pParent, DetailsElementType_SF, fOpened) {} … … 451 473 private: 452 474 453 /* Helper: Update stuff:*/475 /** Creates update task for this element. */ 454 476 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskSF(machine()); } 455 477 }; 456 478 457 479 458 /* Task 'UI':*/480 /** UITask extension used as update task for the details-element type 'UI'. */ 459 481 class UIGDetailsUpdateTaskUI : public UIGDetailsUpdateTask 460 482 { … … 463 485 public: 464 486 465 /* Constructor:*/487 /** Constructs update task passing @a machine to the base-class. */ 466 488 UIGDetailsUpdateTaskUI(const CMachine &machine) 467 489 : UIGDetailsUpdateTask(machine) {} … … 469 491 private: 470 492 471 /* Helpers: Prepare stuff:*/472 void run(); 473 }; 474 475 /* Element 'UI':*/493 /** Contains update task body. */ 494 void run(); 495 }; 496 497 /** UIGDetailsElementInterface extension for the details-element type 'UI'. */ 476 498 class UIGDetailsElementUI : public UIGDetailsElementInterface 477 499 { … … 480 502 public: 481 503 482 /* Constructor: */ 504 /** Constructs details-element object for passed @a pParent set. 505 * @param fOpened brings whether the details-element should be visually opened. */ 483 506 UIGDetailsElementUI(UIGDetailsSet *pParent, bool fOpened) 484 507 : UIGDetailsElementInterface(pParent, DetailsElementType_UI, fOpened) {} … … 486 509 private: 487 510 488 /* Helper: Update stuff:*/511 /** Creates update task for this element. */ 489 512 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskUI(machine()); } 490 513 }; 491 514 492 515 493 /* Task 'Description':*/516 /** UITask extension used as update task for the details-element type 'Description'. */ 494 517 class UIGDetailsUpdateTaskDescription : public UIGDetailsUpdateTask 495 518 { … … 498 521 public: 499 522 500 /* Constructor:*/523 /** Constructs update task passing @a machine to the base-class. */ 501 524 UIGDetailsUpdateTaskDescription(const CMachine &machine) 502 525 : UIGDetailsUpdateTask(machine) {} … … 504 527 private: 505 528 506 /* Helpers: Prepare stuff:*/507 void run(); 508 }; 509 510 /* Element 'Description':*/529 /** Contains update task body. */ 530 void run(); 531 }; 532 533 /** UIGDetailsElementInterface extension for the details-element type 'Description'. */ 511 534 class UIGDetailsElementDescription : public UIGDetailsElementInterface 512 535 { … … 515 538 public: 516 539 517 /* Constructor: */ 540 /** Constructs details-element object for passed @a pParent set. 541 * @param fOpened brings whether the details-element should be visually opened. */ 518 542 UIGDetailsElementDescription(UIGDetailsSet *pParent, bool fOpened) 519 543 : UIGDetailsElementInterface(pParent, DetailsElementType_Description, fOpened) {} … … 521 545 private: 522 546 523 /* Helper: Update stuff:*/547 /** Creates update task for this element. */ 524 548 UITask* createUpdateTask() { return new UIGDetailsUpdateTaskDescription(machine()); } 525 549 }; 526 550 527 #endif /* __UIGDetailsElements_h__ */528 551 #endif /* !___UIGDetailsElements_h___ */ 552
Note:
See TracChangeset
for help on using the changeset viewer.