Changeset 548 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Feb 2, 2007 1:57:12 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r382 r548 245 245 return toString (aHD.GetType()); 246 246 } 247 247 248 248 QString toString (CEnums::DiskControllerType t, LONG d) const; 249 249 … … 321 321 322 322 void startEnumeratingMedia(); 323 bool isInEnumeratingProcess() { return media_enum_thread ? true : false; } 324 325 /** Returns a list of all currently enumerated media (it is empty if the 326 * enumeration has been finished or never been started). */ 327 VBoxMediaList currentMediaList() const { return media_list; } 323 324 /** 325 * Returns a list of all currently registered media. This list is used 326 * to globally track the accessiblity state of all media on a dedicated 327 * thread. This the list is initially empty (before the first enumeration 328 * process is started using #startEnumeratingMedia()). 329 */ 330 const VBoxMediaList ¤tMediaList() const { return media_list; } 331 332 /** Returns true if the media enumeration is in progress. */ 333 bool isMediaEnumerationStarted() const { return media_enum_thread != NULL; } 334 335 void addMedia (const VBoxMedia &); 336 void updateMedia (const VBoxMedia &); 337 void removeMedia (VBoxDefs::DiskType, const QUuid &); 328 338 329 339 /* various helpers */ … … 360 370 361 371 /** 362 * Emitted during the enumeration process started 363 * by #startEnumeratingMedia(). */ 364 void mediaEnumerated (const VBoxMedia &media); 372 * Emitted at the beginning of the enumeration process started 373 * by #startEnumeratingMedia(). 374 */ 375 void mediaEnumStarted(); 376 377 /** 378 * Emitted when a new media item from the list has updated 379 * its accessibility state. 380 */ 381 void mediaEnumerated (const VBoxMedia &aMedia, int aIndex); 365 382 366 383 /** … … 368 385 * by #startEnumeratingMedia(). 369 386 * @note #currentMediaList() will return an empty list 370 * when this signal is emitted, use the argument instead. */ 371 void mediaEnumerated (const VBoxMediaList &list); 387 * when this signal is emitted, use the argument instead. 388 */ 389 void mediaEnumFinished (const VBoxMediaList &aList); 390 391 /** Emitted when a new media is added using #addMedia(). */ 392 void mediaAdded (const VBoxMedia &); 393 394 /** Emitted when the media is updated using #updateMedia(). */ 395 void mediaUpdated (const VBoxMedia &); 396 397 /** Emitted when the media is removed using #removeMedia(). */ 398 void mediaRemoved (VBoxDefs::DiskType, const QUuid &); 372 399 373 400 /* signals emitted when the VirtualBox callback is called by the server -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaComboBox.h
r382 r548 27 27 28 28 #include <qcombobox.h> 29 #include <quuid.h>30 29 31 30 class QListBoxItem; … … 37 36 public: 38 37 39 VBoxMediaComboBox (QWidget *aParent = 0, 40 const char *aName = 0, int aType = 0);38 VBoxMediaComboBox (QWidget *aParent = 0, const char *aName = 0, 39 int aType = 0, bool aUseEmptyItem = false); 41 40 ~VBoxMediaComboBox() {} 42 41 43 42 void refresh(); 44 void appendItem (const QString &, const QUuid &, const QString &);45 void replaceItem (int, const QString &, const QString &);46 void removeLastItem();47 void setReadyForRefresh();48 void setRequiredItem (const QUuid &);49 43 void setUseEmptyItem (bool); 50 44 void setBelongsTo (const QUuid &); 51 45 QUuid getId(); 52 46 QUuid getBelongsTo(); 53 void setCurrentItem (int);47 void setCurrentItem (const QUuid &); 54 48 55 49 protected slots: 56 50 57 void mediaEnumerated (const VBoxMedia &); 58 void listEnumerated (const VBoxMediaList &); 51 void mediaEnumStarted(); 52 void mediaEnumerated (const VBoxMedia &, int); 53 void mediaEnumFinished (const VBoxMediaList &); 54 void mediaAdded (const VBoxMedia &); 55 void mediaUpdated (const VBoxMedia &); 56 void mediaRemoved (VBoxDefs::DiskType, const QUuid &); 59 57 void processOnItem (QListBoxItem *); 60 void updateToolTip(int);58 void processActivated (int); 61 59 62 60 protected: 63 61 64 void loadCleanContent(); 65 int updateMedia (const QString &, const QUuid &, const QString &, 66 VBoxMedia::Status); 62 void updateToolTip (int); 63 void setCurrentItem (int); 64 void processMedia (const VBoxMedia &); 65 void processHdMedia (const VBoxMedia &); 66 void processCdMedia (const VBoxMedia &); 67 void processFdMedia (const VBoxMedia &); 68 void appendItem (const QString &, const QUuid &, 69 const QString &, QPixmap *); 70 void replaceItem (int, const QString &, 71 const QString &, QPixmap *); 72 void updateShortcut (const QString &, const QUuid &, const QString &, 73 VBoxMedia::Status); 67 74 68 75 int mType; … … 72 79 QUuid mRequiredId; 73 80 bool mUseEmptyItem; 74 bool mToBeRefreshed; 81 QPixmap mPmInacc; 82 QPixmap mPmError; 75 83 }; 76 84 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h
r382 r548 91 91 void vmListBoxCurrentChanged (bool aRefreshDetails = true, 92 92 bool aRefreshSnapshots = true); 93 void mediaEnum erated (const VBoxMediaList &list);93 void mediaEnumFinished (const VBoxMediaList &); 94 94 95 95 /* VirtualBox callback events we're interested in */
Note:
See TracChangeset
for help on using the changeset viewer.