Changeset 80955 in vbox
- Timestamp:
- Sep 23, 2019 5:27:06 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133541
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIEmptyFilePathSelector.cpp
r79365 r80955 62 62 #endif 63 63 mSelectButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_disabled_16px.png")); 64 connect(mSelectButton, SIGNAL(clicked()), this, SLOT(choose()));64 connect(mSelectButton, &QToolButton::clicked, this, &UIEmptyFilePathSelector::choose); 65 65 mMainLayout->addWidget(mSelectButton); 66 66 … … 254 254 } 255 255 } 256 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
r79365 r80955 96 96 97 97 /* Setup connections: */ 98 connect(this, SIGNAL(activated(int)), this, SLOT(onActivated(int)));99 connect(m_pCopyAction, SIGNAL(triggered(bool)), this, SLOT(copyToClipboard()));98 connect(this, static_cast<void(UIFilePathSelector::*)(int)>(&UIFilePathSelector::activated), this, &UIFilePathSelector::onActivated); 99 connect(m_pCopyAction, &QAction::triggered, this, &UIFilePathSelector::copyToClipboard); 100 100 101 101 /* Editable by default: */ … … 127 127 /* Install line-edit connection/event-filter: */ 128 128 Assert(lineEdit()); 129 connect(lineEdit(), SIGNAL(textEdited(const QString &)),130 this, SLOT(onTextEdited(const QString &)));129 connect(lineEdit(), &QLineEdit::textEdited, 130 this, &UIFilePathSelector::onTextEdited); 131 131 lineEdit()->installEventFilter(this); 132 132 } … … 137 137 /* Remove line-edit event-filter/connection: */ 138 138 lineEdit()->removeEventFilter(this); 139 disconnect(lineEdit(), SIGNAL(textEdited(const QString &)),140 this, SLOT(onTextEdited(const QString &)));139 disconnect(lineEdit(), &QLineEdit::textEdited, 140 this, &UIFilePathSelector::onTextEdited); 141 141 } 142 142 if (comboBox()) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
r79798 r80955 492 492 /* Configure UIHostComboEditorPrivate instance: */ 493 493 setFocusProxy(m_pEditor); 494 connect(m_pEditor, SIGNAL(sigDataChanged()), this, SLOT(sltCommitData()));494 connect(m_pEditor, &UIHostComboEditorPrivate::sigDataChanged, this, &UIHostComboEditor::sltCommitData); 495 495 } 496 496 /* Create 'clear' tool-button: */ … … 500 500 m_pButtonClear->removeBorder(); 501 501 m_pButtonClear->setIcon(UIIconPool::iconSet(":/eraser_16px.png")); 502 connect(m_pButtonClear, SIGNAL(clicked(bool)), m_pEditor, SLOT(sltClear()));502 connect(m_pButtonClear, &QIToolButton::clicked, m_pEditor, &UIHostComboEditorPrivate::sltClear); 503 503 } 504 504 /* Add widgets to layout: */ … … 541 541 setContextMenuPolicy(Qt::NoContextMenu); 542 542 setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding); 543 connect(this, SIGNAL(selectionChanged()), this, SLOT(sltDeselect()));543 connect(this, &UIHostComboEditorPrivate::selectionChanged, this, &UIHostComboEditorPrivate::sltDeselect); 544 544 545 545 /* Setup release-pending-keys timer: */ 546 546 m_pReleaseTimer = new QTimer(this); 547 547 m_pReleaseTimer->setInterval(200); 548 connect(m_pReleaseTimer, SIGNAL(timeout()), this, SLOT(sltReleasePendingKeys()));548 connect(m_pReleaseTimer, &QTimer::timeout, this, &UIHostComboEditorPrivate::sltReleasePendingKeys); 549 549 550 550 #if defined(VBOX_WS_MAC) || defined(VBOX_WS_WIN) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
r79798 r80955 71 71 72 72 /* Connect selection preserver: */ 73 connect(this, SIGNAL(selectionChanged()), this, SLOT(sltDeselect()));73 connect(this, &UIHotKeyLineEdit::selectionChanged, this, &UIHotKeyLineEdit::sltDeselect); 74 74 } 75 75 … … 155 155 m_pResetButton->removeBorder(); 156 156 m_pResetButton->setIcon(UIIconPool::iconSet(":/import_16px.png")); 157 connect(m_pResetButton, SIGNAL(clicked(bool)), this, SLOT(sltReset()));157 connect(m_pResetButton, &QToolButton::clicked, this, &UIHotKeyEditor::sltReset); 158 158 m_pClearButton->removeBorder(); 159 159 m_pClearButton->setIcon(UIIconPool::iconSet(":/eraser_16px.png")); 160 connect(m_pClearButton, SIGNAL(clicked(bool)), this, SLOT(sltClear()));160 connect(m_pClearButton, &QToolButton::clicked, this, &UIHotKeyEditor::sltClear); 161 161 162 162 /* Translate finally: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBarEditorWindow.cpp
r79365 r80955 1071 1071 setRestrictionsOfMenuHelp(gEDataManager->restrictedRuntimeMenuHelpActionTypes(machineID())); 1072 1072 /* And listen for the menu-bar configuration changes after that: */ 1073 connect(gEDataManager, SIGNAL(sigMenuBarConfigurationChange(const QString&)),1074 this, SLOT(sltHandleConfigurationChange(const QString&)));1073 connect(gEDataManager, &UIExtraDataManager::sigMenuBarConfigurationChange, 1074 this, &UIMenuBarEditorWidget::sltHandleConfigurationChange); 1075 1075 } 1076 1076 } … … 1139 1139 pCopiedMenuAction->setProperty("class", UIExtraDataMetaDefs::MenuType_All); 1140 1140 pCopiedMenuAction->setProperty("type", pAction->extraDataID()); 1141 connect(pCopiedMenuAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));1141 connect(pCopiedMenuAction, &QAction::triggered, this, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick); 1142 1142 m_actions.insert(pAction->extraDataKey(), pCopiedMenuAction); 1143 1143 /* Add menu action into tool-bar: */ … … 1191 1191 pCopiedMenuAction->setProperty("class", pCopiedMenu->property("class")); 1192 1192 pCopiedMenuAction->setProperty("type", pAction->extraDataID()); 1193 connect(pCopiedMenuAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));1193 connect(pCopiedMenuAction, &QAction::triggered, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick); 1194 1194 m_actions.insert(pAction->extraDataKey(), pCopiedMenuAction); 1195 1195 } … … 1211 1211 pCopiedAction->setProperty("class", pMenu->property("class")); 1212 1212 pCopiedAction->setProperty("type", iExtraDataID); 1213 connect(pCopiedAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));1213 connect(pCopiedAction, &QAction::triggered, this, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick); 1214 1214 m_actions.insert(strExtraDataID, pCopiedAction); 1215 1215 } … … 1228 1228 pCopiedAction->setProperty("class", pMenu->property("class")); 1229 1229 pCopiedAction->setProperty("type", pAction->extraDataID()); 1230 connect(pCopiedAction, SIGNAL(triggered(bool)), this, SLOT(sltHandleMenuBarMenuClick()));1230 connect(pCopiedAction, &QAction::triggered, this, &UIMenuBarEditorWidget::sltHandleMenuBarMenuClick); 1231 1231 m_actions.insert(pAction->extraDataKey(), pCopiedAction); 1232 1232 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r79365 r80955 890 890 m_pToolbar->setPalette(pal); 891 891 /* Configure child connections: */ 892 connect(m_pToolbar, SIGNAL(sigResized()), this, SLOT(sltHandleToolbarResize()));893 connect(m_pToolbar, SIGNAL(sigAutoHideToggled()), this, SLOT(sltAutoHideToggled()));894 connect(m_pToolbar, SIGNAL(sigMinimizeAction()), this, SIGNAL(sigMinimizeAction()));895 connect(m_pToolbar, SIGNAL(sigExitAction()), this, SIGNAL(sigExitAction()));896 connect(m_pToolbar, SIGNAL(sigCloseAction()), this, SIGNAL(sigCloseAction()));892 connect(m_pToolbar, &UIMiniToolBarPrivate::sigResized, this, &UIMiniToolBar::sltHandleToolbarResize); 893 connect(m_pToolbar, &UIMiniToolBarPrivate::sigAutoHideToggled, this, &UIMiniToolBar::sltAutoHideToggled); 894 connect(m_pToolbar, &UIMiniToolBarPrivate::sigMinimizeAction, this, &UIMiniToolBar::sigMinimizeAction); 895 connect(m_pToolbar, &UIMiniToolBarPrivate::sigExitAction, this, &UIMiniToolBar::sigExitAction); 896 connect(m_pToolbar, &UIMiniToolBarPrivate::sigCloseAction, this, &UIMiniToolBar::sigCloseAction); 897 897 /* Add child to area: */ 898 898 m_pToolbar->setParent(m_pArea); … … 906 906 m_pHoverEnterTimer->setSingleShot(true); 907 907 m_pHoverEnterTimer->setInterval(500); 908 connect(m_pHoverEnterTimer, SIGNAL(timeout()), this, SLOT(sltHoverEnter()));908 connect(m_pHoverEnterTimer, &QTimer::timeout, this, &UIMiniToolBar::sltHoverEnter); 909 909 } 910 910 m_pHoverLeaveTimer = new QTimer(this); … … 912 912 m_pHoverLeaveTimer->setSingleShot(true); 913 913 m_pHoverLeaveTimer->setInterval(500); 914 connect(m_pHoverLeaveTimer, SIGNAL(timeout()), this, SLOT(sltHoverLeave()));914 connect(m_pHoverLeaveTimer, &QTimer::timeout, this, &UIMiniToolBar::sltHoverLeave); 915 915 } 916 916 … … 1188 1188 1189 1189 #include "UIMiniToolBar.moc" 1190 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
r76606 r80955 1013 1013 /* Finish configure table-view (after model is configured): */ 1014 1014 m_pTableView->setModel(m_pTableModel); 1015 connect(m_pTableView, SIGNAL(sigCurrentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(sltCurrentChanged()));1016 connect(m_pTableView, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(sltShowTableContexMenu(const QPoint &)));1015 connect(m_pTableView, &UIPortForwardingView::sigCurrentChanged, this, &UIPortForwardingTable::sltCurrentChanged); 1016 connect(m_pTableView, &UIPortForwardingView::customContextMenuRequested, this, &UIPortForwardingTable::sltShowTableContexMenu); 1017 1017 1018 1018 /* Prepare delegates: */ … … 1110 1110 m_pActionAdd->setShortcut(QKeySequence("Ins")); 1111 1111 m_pActionAdd->setIcon(UIIconPool::iconSet(":/controller_add_16px.png", ":/controller_add_disabled_16px.png")); 1112 connect(m_pActionAdd, SIGNAL(triggered(bool)), this, SLOT(sltAddRule()));1112 connect(m_pActionAdd, &QAction::triggered, this, &UIPortForwardingTable::sltAddRule); 1113 1113 m_pToolBar->addAction(m_pActionAdd); 1114 1114 } … … 1120 1120 /* Configure action: */ 1121 1121 m_pActionCopy->setIcon(UIIconPool::iconSet(":/controller_add_16px.png", ":/controller_add_disabled_16px.png")); 1122 connect(m_pActionCopy, SIGNAL(triggered(bool)), this, SLOT(sltCopyRule()));1122 connect(m_pActionCopy, &QAction::triggered, this, &UIPortForwardingTable::sltCopyRule); 1123 1123 } 1124 1124 … … 1130 1130 m_pActionRemove->setShortcut(QKeySequence("Del")); 1131 1131 m_pActionRemove->setIcon(UIIconPool::iconSet(":/controller_remove_16px.png", ":/controller_remove_disabled_16px.png")); 1132 connect(m_pActionRemove, SIGNAL(triggered(bool)), this, SLOT(sltRemoveRule()));1132 connect(m_pActionRemove, &QAction::triggered, this, &UIPortForwardingTable::sltRemoveRule); 1133 1133 m_pToolBar->addAction(m_pActionRemove); 1134 1134 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp
r79365 r80955 339 339 m_pButtonCancel->setEnabled(m_fCancelEnabled); 340 340 m_pButtonCancel->setFocusPolicy(Qt::ClickFocus); 341 connect(m_pButtonCancel, SIGNAL(clicked()), this, SLOT(sltCancelOperation()));341 connect(m_pButtonCancel, &UIMiniCancelButton::clicked, this, &UIProgressDialog::sltCancelOperation); 342 342 343 343 /* Add into layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISlidingToolBar.cpp
r79365 r80955 24 24 #include "UIAnimationFramework.h" 25 25 #include "UIMachineWindow.h" 26 #include "UIMenuBarEditorWindow.h" 26 27 #ifdef VBOX_WS_MAC 27 28 # include "VBoxUtils-darwin.h" … … 166 167 pal2.setColor(QPalette::Window, palette().color(QPalette::Window)); 167 168 m_pWidget->setPalette(pal2); 168 connect(m_pWidget, SIGNAL(sigCancelClicked()), this, SLOT(close())); 169 UIMenuBarEditorWidget *pEditorWidget = qobject_cast<UIMenuBarEditorWidget*>(m_pWidget); 170 if (pEditorWidget) 171 connect(pEditorWidget, &UIMenuBarEditorWidget::sigCancelClicked, this, &UISlidingToolBar::close); 169 172 /* Add child-widget into area: */ 170 173 m_pWidget->setParent(m_pArea); … … 213 216 214 217 /* Activate window after it was shown: */ 215 connect(this, SIGNAL(sigShown()), this,216 SLOT(sltActivateWindow()), Qt::QueuedConnection);218 connect(this, &UISlidingToolBar::sigShown, 219 this, &UISlidingToolBar::sltActivateWindow, Qt::QueuedConnection); 217 220 /* Update window geometry after parent geometry changed: */ 221 /* Leave this in the old connection syntax for now: */ 218 222 connect(parent(), SIGNAL(sigGeometryChange(const QRect&)), 219 223 this, SLOT(sltParentGeometryChanged(const QRect&))); … … 228 232 "startWidgetGeometry", "finalWidgetGeometry", 229 233 SIGNAL(sigExpand()), SIGNAL(sigCollapse())); 230 connect(m_pAnimation, SIGNAL(sigStateEnteredStart()), this, SLOT(sltMarkAsCollapsed()));231 connect(m_pAnimation, SIGNAL(sigStateEnteredFinal()), this, SLOT(sltMarkAsExpanded()));234 connect(m_pAnimation, &UIAnimation::sigStateEnteredStart, this, &UISlidingToolBar::sltMarkAsCollapsed); 235 connect(m_pAnimation, &UIAnimation::sigStateEnteredFinal, this, &UISlidingToolBar::sltMarkAsExpanded); 232 236 /* Update geometry animation: */ 233 237 updateAnimation(); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIStatusBarEditorWindow.cpp
r79365 r80955 845 845 gEDataManager->statusBarIndicatorOrder(machineID())); 846 846 /* And listen for the status-bar configuration changes after that: */ 847 connect(gEDataManager, SIGNAL(sigStatusBarConfigurationChange(const QUuid &)),848 this, SLOT(sltHandleConfigurationChange(const QUuid &)));847 connect(gEDataManager, &UIExtraDataManager::sigStatusBarConfigurationChange, 848 this, &UIStatusBarEditorWidget::sltHandleConfigurationChange); 849 849 } 850 850 } … … 857 857 { 858 858 /* Configure status button: */ 859 connect(pButton, SIGNAL(sigClick()), this, SLOT(sltHandleButtonClick()));860 connect(pButton, SIGNAL(sigDragObjectDestroy()), this, SLOT(sltHandleDragObjectDestroy()));859 connect(pButton, &UIStatusBarEditorButton::sigClick, this, &UIStatusBarEditorWidget::sltHandleButtonClick); 860 connect(pButton, &UIStatusBarEditorButton::sigDragObjectDestroy, this, &UIStatusBarEditorWidget::sltHandleDragObjectDestroy); 861 861 /* Add status button into button-layout: */ 862 862 m_pButtonLayout->addWidget(pButton); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.cpp
r76606 r80955 113 113 { 114 114 /* Disconnect button-click signal: */ 115 disconnect(this, SIGNAL(sigButtonClicked()), this, SLOT(sltButtonClicked()));115 disconnect(this, &UIGraphicsRotatorButton::sigButtonClicked, this, &UIGraphicsRotatorButton::sltButtonClicked); 116 116 if (fEnabled) 117 117 { 118 118 /* Connect button-click signal: */ 119 connect(this, SIGNAL(sigButtonClicked()), this, SLOT(sltButtonClicked()));119 connect(this, &UIGraphicsRotatorButton::sigButtonClicked, this, &UIGraphicsRotatorButton::sltButtonClicked); 120 120 } 121 121 } … … 230 230 } 231 231 } 232
Note:
See TracChangeset
for help on using the changeset viewer.