Changeset 4141 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 14, 2007 8:21:59 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23624
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h
r4071 r4141 97 97 void machineStateChanged (CEnums::MachineState state); 98 98 void additionsStateChanged (const QString &, bool, bool); 99 void dvdfdChanged (VBoxDefs::DiskType aType); 99 100 100 101 protected: -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r4128 r4141 172 172 void updateAdditionsState (const QString&, bool, bool); 173 173 174 void updateDVDFDState (VBoxDefs::DiskType aType); 175 174 176 void tryClose(); 175 177 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
r4071 r4141 129 129 MachineStateChangeEventType, 130 130 AdditionsStateChangeEventType, 131 DVDFDChangeEventType, 131 132 MachineDataChangeEventType, 132 133 MachineRegisteredEventType, -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r4131 r4141 243 243 }; 244 244 245 /** DVD/FD change event */ 246 class DVDFDChangeEvent : public QEvent 247 { 248 public: 249 DVDFDChangeEvent (VBoxDefs::DiskType aType) 250 : QEvent ((QEvent::Type) VBoxDefs::DVDFDChangeEventType) 251 , mType (aType) {} 252 VBoxDefs::DiskType diskType() const { return mType; } 253 private: 254 VBoxDefs::DiskType mType; 255 }; 256 245 257 /** Menu activation event */ 246 258 class ActivateMenuEvent : public QEvent … … 406 418 STDMETHOD(OnDVDDriveChange)() 407 419 { 408 LogTrace(); 420 LogFlowFunc (("DVD Drive changed\n")); 421 QApplication::postEvent (mView, new DVDFDChangeEvent (VBoxDefs::CD)); 409 422 return S_OK; 410 423 } … … 412 425 STDMETHOD(OnFloppyDriveChange)() 413 426 { 427 LogFlowFunc (("Floppy Drive changed\n")); 428 QApplication::postEvent (mView, new DVDFDChangeEvent (VBoxDefs::FD)); 414 429 return S_OK; 415 430 } … … 1083 1098 ge->additionActive(), 1084 1099 ge->supportsSeamless()); 1100 return true; 1101 } 1102 1103 case VBoxDefs::DVDFDChangeEventType: 1104 { 1105 DVDFDChangeEvent *ev = (DVDFDChangeEvent *) e; 1106 LogFlowFunc (("DVDFDChangeEvent\n")); 1107 1108 emit dvdfdChanged (ev->diskType()); 1085 1109 return true; 1086 1110 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r4128 r4141 856 856 connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool)), 857 857 this, SLOT (updateAdditionsState (const QString &, bool, bool))); 858 connect (console, SIGNAL (dvdfdChanged (VBoxDefs::DiskType)), 859 this, SLOT (updateDVDFDState (VBoxDefs::DiskType))); 858 860 859 861 #ifdef Q_WS_MAC … … 2225 2227 vboxProblem().cannotSaveMachineSettings (m); 2226 2228 } 2227 updateAppearanceOf (FloppyStuff);2228 2229 } 2229 2230 } … … 2245 2246 vboxProblem().cannotSaveMachineSettings (m); 2246 2247 } 2247 updateAppearanceOf (FloppyStuff);2248 2248 } 2249 2249 } … … 2271 2271 vboxProblem().cannotSaveMachineSettings (m); 2272 2272 } 2273 updateAppearanceOf (DVDStuff);2274 2273 } 2275 2274 } … … 2293 2292 vboxProblem().cannotSaveMachineSettings (m); 2294 2293 } 2295 updateAppearanceOf (DVDStuff);2296 2294 } 2297 2295 } … … 2396 2394 /// @todo (r=dmik) use VBoxProblemReporter::cannotMountMedia... 2397 2395 AssertWrapperOk (drv); 2398 if (drv.isOk())2399 updateAppearanceOf (DVDStuff);2400 2396 } 2401 2397 … … 2607 2603 vboxProblem().cannotSaveMachineSettings (m); 2608 2604 } 2609 updateAppearanceOf (FloppyStuff);2610 2605 } 2611 2606 } … … 2635 2630 vboxProblem().cannotSaveMachineSettings (m); 2636 2631 } 2637 updateAppearanceOf (DVDStuff);2638 2632 } 2639 2633 } … … 2896 2890 } 2897 2891 2892 void VBoxConsoleWnd::updateDVDFDState (VBoxDefs::DiskType aType) 2893 { 2894 Assert (aType == VBoxDefs::CD || aType == VBoxDefs::FD); 2895 updateAppearanceOf (aType == VBoxDefs::CD ? DVDStuff : 2896 aType == VBoxDefs::FD ? FloppyStuff : AllStuff); 2897 } 2898 2898 2899 /** 2899 2900 * Helper to safely close the main console window.
Note:
See TracChangeset
for help on using the changeset viewer.