Changeset 67110 in vbox for trunk/src/VBox
- Timestamp:
- May 26, 2017 9:58:07 AM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPane.cpp
r67109 r67110 57 57 /* Cleanup: */ 58 58 cleanup(); 59 } 60 61 bool UIToolsPane::isToolOpened(ToolType enmType) const 62 { 63 for (int iTabIndex = 0; iTabIndex < m_pTabBar->count(); ++iTabIndex) 64 if (m_pTabBar->tabData(iTabIndex).value<ToolType>() == enmType) 65 return true; 66 return false; 67 } 68 69 void UIToolsPane::setCurrentTool(ToolType enmType) 70 { 71 activateTabBarTab(enmType, true); 59 72 } 60 73 … … 360 373 m_pTabBar->setTabData(iActualTabIndex, QVariant::fromValue(enmType)); 361 374 } 375 376 /* Notify listeners: */ 377 emit sigToolOpened(enmType); 362 378 } 363 379 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPane.h
r67109 r67110 55 55 Q_OBJECT; 56 56 57 signals: 58 59 /** Notifies listeners about tool of particular @a enmType is opened. */ 60 void sigToolOpened(ToolType enmType); 61 57 62 public: 58 63 … … 61 66 /** Destructs tools pane. */ 62 67 virtual ~UIToolsPane() /* override */; 68 69 /** Returns whether tool of particular @a enmType is opened. */ 70 bool isToolOpened(ToolType enmType) const; 71 /** Activates tool of particular @a enmType, creates new one if necessary. */ 72 void setCurrentTool(ToolType enmType); 63 73 64 74 /** Defines the @a comMachine object. */
Note:
See TracChangeset
for help on using the changeset viewer.