Changeset 80736 in vbox for trunk/src/VBox
- Timestamp:
- Sep 11, 2019 2:38:29 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r79365 r80736 445 445 446 446 /* Connect header-resize signal just before widget is shown after all the items properly loaded and initialized: */ 447 connect(mTwFolders->header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(sltAdjustTreeFields()));447 connect(mTwFolders->header(), &QHeaderView::sectionResized, this, &UIMachineSettingsSF::sltAdjustTreeFields); 448 448 449 449 /* Adjusting size after all pending show events are processed: */ … … 751 751 { 752 752 /* Configure tree-widget connections: */ 753 connect(mTwFolders, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),754 this, SLOT(sltHandleCurrentItemChange(QTreeWidgetItem *)));755 connect(mTwFolders, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),756 this, SLOT(sltHandleDoubleClick(QTreeWidgetItem *)));757 connect(mTwFolders, SIGNAL(customContextMenuRequested(const QPoint &)),758 this, SLOT(sltHandleContextMenuRequest(const QPoint &)));753 connect(mTwFolders, &QITreeWidget::currentItemChanged, 754 this, &UIMachineSettingsSF::sltHandleCurrentItemChange); 755 connect(mTwFolders, &QITreeWidget::itemDoubleClicked, 756 this, &UIMachineSettingsSF::sltHandleDoubleClick); 757 connect(mTwFolders, &QITreeWidget::customContextMenuRequested, 758 this, &UIMachineSettingsSF::sltHandleContextMenuRequest); 759 759 } 760 760 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r79365 r80736 167 167 168 168 /* Setup connections: */ 169 connect(mGbSerial, SIGNAL(toggled(bool)),170 this, SLOT(sltGbSerialToggled(bool)));171 connect(mCbNumber, SIGNAL(activated(const QString &)),172 this, SLOT(sltCbNumberActivated(const QString &)));173 connect(mCbMode, SIGNAL(activated(const QString &)),174 this, SLOT(sltCbModeActivated(const QString &)));169 connect(mGbSerial, &QCheckBox::toggled, 170 this, &UIMachineSettingsSerial::sltGbSerialToggled); 171 connect(mCbNumber, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::activated), 172 this, &UIMachineSettingsSerial::sltCbNumberActivated); 173 connect(mCbMode, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::activated), 174 this, &UIMachineSettingsSerial::sltCbModeActivated); 175 175 176 176 /* Prepare validation: */ … … 310 310 { 311 311 /* Prepare validation: */ 312 connect(mLeIRQ, SIGNAL(textChanged(const QString&)), m_pParent, SLOT(revalidate()));313 connect(mLeIOPort, SIGNAL(textChanged(const QString&)), m_pParent, SLOT(revalidate()));314 connect(mLePath, SIGNAL(textChanged(const QString&)), m_pParent, SLOT(revalidate()));312 connect(mLeIRQ, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate); 313 connect(mLeIOPort, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate); 314 connect(mLePath, &QLineEdit::textChanged, m_pParent, &UIMachineSettingsSerialPage::revalidate); 315 315 } 316 316 … … 687 687 688 688 # include "UIMachineSettingsSerial.moc" 689 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r79365 r80736 3168 3168 if (pOpenMediumMenu) 3169 3169 { 3170 /* Era ze menu initially: */3170 /* Erase menu initially: */ 3171 3171 pOpenMediumMenu->clear(); 3172 3172 /* Depending on current medium type: */ … … 3178 3178 QAction *pCreateNewHardDisk = pOpenMediumMenu->addAction(tr("Create New Hard Disk...")); 3179 3179 pCreateNewHardDisk->setIcon(iconPool()->icon(HDNewEn, HDNewDis)); 3180 connect(pCreateNewHardDisk, SIGNAL(triggered(bool)), this, SLOT(sltCreateNewHardDisk()));3180 connect(pCreateNewHardDisk, &QAction::triggered, this, &UIMachineSettingsStorage::sltCreateNewHardDisk); 3181 3181 /* Add "Choose a virtual hard disk" action: */ 3182 3182 addChooseExistingMediumAction(pOpenMediumMenu, tr("Choose Virtual Hard Disk...")); … … 3198 3198 pEjectCurrentMedium->setEnabled(!m_pMediumIdHolder->isNull()); 3199 3199 pEjectCurrentMedium->setIcon(iconPool()->icon(CDUnmountEnabled, CDUnmountDisabled)); 3200 connect(pEjectCurrentMedium, SIGNAL(triggered(bool)), this, SLOT(sltUnmountDevice()));3200 connect(pEjectCurrentMedium, &QAction::triggered, this, &UIMachineSettingsStorage::sltUnmountDevice); 3201 3201 break; 3202 3202 } … … 3214 3214 pEjectCurrentMedium->setEnabled(!m_pMediumIdHolder->isNull()); 3215 3215 pEjectCurrentMedium->setIcon(iconPool()->icon(FDUnmountEnabled, FDUnmountDisabled)); 3216 connect(pEjectCurrentMedium, SIGNAL(triggered(bool)), this, SLOT(sltUnmountDevice()));3216 connect(pEjectCurrentMedium, &QAction::triggered, this, &UIMachineSettingsStorage::sltUnmountDevice); 3217 3217 break; 3218 3218 } … … 3968 3968 { 3969 3969 /* Configure this: */ 3970 connect(&uiCommon(), SIGNAL(sigMediumEnumerated(const QUuid &)),3971 this, SLOT(sltHandleMediumEnumerated(const QUuid &)));3972 connect(&uiCommon(), SIGNAL(sigMediumDeleted(const QUuid &)),3973 this, SLOT(sltHandleMediumDeleted(const QUuid &)));3970 connect(&uiCommon(), &UICommon::sigMediumEnumerated, 3971 this, &UIMachineSettingsStorage::sltHandleMediumEnumerated); 3972 connect(&uiCommon(), &UICommon::sigMediumDeleted, 3973 this, &UIMachineSettingsStorage::sltHandleMediumDeleted); 3974 3974 3975 3975 /* Configure tree-view: */ 3976 connect(m_pTreeStorage, SIGNAL(currentItemChanged(const QModelIndex &, const QModelIndex &)),3977 this, SLOT(sltHandleCurrentItemChange()));3978 connect(m_pTreeStorage, SIGNAL(customContextMenuRequested(const QPoint &)),3979 this, SLOT(sltHandleContextMenuRequest(const QPoint &)));3980 connect(m_pTreeStorage, SIGNAL(drawItemBranches(QPainter *, const QRect &, const QModelIndex &)),3981 this, SLOT(sltHandleDrawItemBranches(QPainter *, const QRect &, const QModelIndex &)));3982 connect(m_pTreeStorage, SIGNAL(mouseMoved(QMouseEvent *)),3983 this, SLOT(sltHandleMouseMove(QMouseEvent *)));3976 connect(m_pTreeStorage, &QITreeView::currentItemChanged, 3977 this, &UIMachineSettingsStorage::sltHandleCurrentItemChange); 3978 connect(m_pTreeStorage, &QITreeView::customContextMenuRequested, 3979 this, &UIMachineSettingsStorage::sltHandleContextMenuRequest); 3980 connect(m_pTreeStorage, &QITreeView::drawItemBranches, 3981 this, &UIMachineSettingsStorage::sltHandleDrawItemBranches); 3982 connect(m_pTreeStorage, &QITreeView::mouseMoved, 3983 this, &UIMachineSettingsStorage::sltHandleMouseMove); 3984 3984 connect(m_pTreeStorage, &QITreeView::mousePressed, 3985 3985 this, &UIMachineSettingsStorage::sltHandleMouseClick); 3986 3986 connect(m_pTreeStorage, &QITreeView::mouseReleased, 3987 3987 this, &UIMachineSettingsStorage::sltHandleMouseRelease); 3988 connect(m_pTreeStorage, SIGNAL(mouseDoubleClicked(QMouseEvent *)),3989 this, SLOT(sltHandleMouseClick(QMouseEvent *)));3988 connect(m_pTreeStorage, &QITreeView::mouseDoubleClicked, 3989 this, &UIMachineSettingsStorage::sltHandleMouseClick); 3990 3990 connect(m_pTreeStorage, &QITreeView::dragEntered, 3991 3991 this, &UIMachineSettingsStorage::sltHandleDragEnter); … … 3996 3996 3997 3997 /* Create model: */ 3998 connect(m_pModelStorage, SIGNAL(rowsInserted(const QModelIndex &, int, int)),3999 this, SLOT(sltHandleRowInsertion(const QModelIndex &, int)));4000 connect(m_pModelStorage, SIGNAL(rowsRemoved(const QModelIndex&, int, int)),4001 this, SLOT(sltHandleRowRemoval()));3998 connect(m_pModelStorage, &StorageModel::rowsInserted, 3999 this, &UIMachineSettingsStorage::sltHandleRowInsertion); 4000 connect(m_pModelStorage, &StorageModel::rowsRemoved, 4001 this, &UIMachineSettingsStorage::sltHandleRowRemoval); 4002 4002 4003 4003 /* Configure actions: */ 4004 connect(m_pActionAddController, SIGNAL(triggered(bool)), this, SLOT(sltAddController()));4005 connect(m_pActionAddControllerIDE, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerIDE()));4006 connect(m_pActionAddControllerSATA, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerSATA()));4007 connect(m_pActionAddControllerSCSI, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerSCSI()));4008 connect(m_pActionAddControllerFloppy, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerFloppy()));4009 connect(m_pActionAddControllerSAS, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerSAS()));4010 connect(m_pActionAddControllerUSB, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerUSB()));4011 connect(m_pActionAddControllerNVMe, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerNVMe()));4012 connect(m_pActionAddControllerVirtioSCSI, SIGNAL(triggered(bool)), this, SLOT(sltAddControllerVirtioSCSI()));4013 connect(m_pActionRemoveController, SIGNAL(triggered(bool)), this, SLOT(sltRemoveController()));4014 connect(m_pActionAddAttachment, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachment()));4015 connect(m_pActionAddAttachmentHD, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachmentHD()));4016 connect(m_pActionAddAttachmentCD, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachmentCD()));4017 connect(m_pActionAddAttachmentFD, SIGNAL(triggered(bool)), this, SLOT(sltAddAttachmentFD()));4018 connect(m_pActionRemoveAttachment, SIGNAL(triggered(bool)), this, SLOT(sltRemoveAttachment()));4004 connect(m_pActionAddController, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddController); 4005 connect(m_pActionAddControllerIDE, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerIDE); 4006 connect(m_pActionAddControllerSATA, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerSATA); 4007 connect(m_pActionAddControllerSCSI, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerSCSI); 4008 connect(m_pActionAddControllerFloppy, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerFloppy); 4009 connect(m_pActionAddControllerSAS, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerSAS); 4010 connect(m_pActionAddControllerUSB, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerUSB); 4011 connect(m_pActionAddControllerNVMe, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerNVMe); 4012 connect(m_pActionAddControllerVirtioSCSI, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddControllerVirtioSCSI); 4013 connect(m_pActionRemoveController, &QAction::triggered, this, &UIMachineSettingsStorage::sltRemoveController); 4014 connect(m_pActionAddAttachment, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachment); 4015 connect(m_pActionAddAttachmentHD, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachmentHD); 4016 connect(m_pActionAddAttachmentCD, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachmentCD); 4017 connect(m_pActionAddAttachmentFD, &QAction::triggered, this, &UIMachineSettingsStorage::sltAddAttachmentFD); 4018 connect(m_pActionRemoveAttachment, &QAction::triggered, this, &UIMachineSettingsStorage::sltRemoveAttachment); 4019 4019 4020 4020 /* Configure tool-button: */ 4021 connect(mTbOpen, SIGNAL(clicked(bool)), mTbOpen, SLOT(showMenu()));4021 connect(mTbOpen, &QIToolButton::clicked, mTbOpen, &QIToolButton::showMenu); 4022 4022 /* Configure menu: */ 4023 connect(mTbOpen->menu(), SIGNAL(aboutToShow()), this, SLOT(sltPrepareOpenMediumMenu()));4023 connect(mTbOpen->menu(), &QMenu::aboutToShow, this, &UIMachineSettingsStorage::sltPrepareOpenMediumMenu); 4024 4024 4025 4025 /* Configure widgets: */ 4026 connect(m_pMediumIdHolder, SIGNAL(sigChanged()), this, SLOT(sltSetInformation())); 4027 connect(mSbPortCount, SIGNAL(valueChanged(int)), this, SLOT(sltSetInformation())); 4028 connect(mLeName, SIGNAL(textEdited(const QString &)), this, SLOT(sltSetInformation())); 4029 connect(mCbBus, SIGNAL(activated(int)), this, SLOT(sltSetInformation())); 4030 connect(mCbType, SIGNAL(activated(int)), this, SLOT(sltSetInformation())); 4031 connect(mCbSlot, SIGNAL(activated(int)), this, SLOT(sltSetInformation())); 4032 connect(mCbIoCache, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation())); 4033 connect(mCbPassthrough, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation())); 4034 connect(mCbTempEject, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation())); 4035 connect(mCbNonRotational, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation())); 4036 connect(m_pCheckBoxHotPluggable, SIGNAL(stateChanged(int)), this, SLOT(sltSetInformation())); 4026 connect(m_pMediumIdHolder, &UIMediumIDHolder::sigChanged, 4027 this, &UIMachineSettingsStorage::sltSetInformation); 4028 connect(mSbPortCount, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), 4029 this, &UIMachineSettingsStorage::sltSetInformation); 4030 connect(mLeName, &QLineEdit::textEdited, 4031 this, &UIMachineSettingsStorage::sltSetInformation); 4032 connect(mCbBus, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), 4033 this, &UIMachineSettingsStorage::sltSetInformation); 4034 connect(mCbType, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), 4035 this, &UIMachineSettingsStorage::sltSetInformation); 4036 connect(mCbSlot, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), 4037 this, &UIMachineSettingsStorage::sltSetInformation); 4038 connect(mCbIoCache, &QCheckBox::stateChanged, 4039 this, &UIMachineSettingsStorage::sltSetInformation); 4040 connect(mCbPassthrough, &QCheckBox::stateChanged, 4041 this, &UIMachineSettingsStorage::sltSetInformation); 4042 connect(mCbTempEject, &QCheckBox::stateChanged, 4043 this, &UIMachineSettingsStorage::sltSetInformation); 4044 connect(mCbNonRotational, &QCheckBox::stateChanged, 4045 this, &UIMachineSettingsStorage::sltSetInformation); 4046 connect(m_pCheckBoxHotPluggable, &QCheckBox::stateChanged, 4047 this, &UIMachineSettingsStorage::sltSetInformation); 4037 4048 } 4038 4049 … … 4185 4196 QAction *pChooseExistingMedium = pOpenMediumMenu->addAction(strActionName); 4186 4197 pChooseExistingMedium->setIcon(iconPool()->icon(ChooseExistingEn, ChooseExistingDis)); 4187 connect(pChooseExistingMedium, SIGNAL(triggered(bool)), this, SLOT(sltChooseExistingMedium()));4198 connect(pChooseExistingMedium, &QAction::triggered, this, &UIMachineSettingsStorage::sltChooseExistingMedium); 4188 4199 } 4189 4200 … … 4197 4208 QAction *pHostDriveAction = pOpenMediumMenu->addAction(medium.name()); 4198 4209 pHostDriveAction->setData(medium.id()); 4199 connect(pHostDriveAction, SIGNAL(triggered(bool)), this, SLOT(sltChooseHostDrive()));4210 connect(pHostDriveAction, &QAction::triggered, this, &UIMachineSettingsStorage::sltChooseHostDrive); 4200 4211 } 4201 4212 }
Note:
See TracChangeset
for help on using the changeset viewer.