Changeset 75915 in vbox
- Timestamp:
- Dec 3, 2018 3:48:32 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerOperationsPanel.cpp
r75897 r75915 27 27 # include <QProgressBar> 28 28 # include <QScrollArea> 29 # include <QScrollBar> 29 30 # include <QStyle> 30 31 … … 208 209 //m_pMainLayout->setSpacing(0); 209 210 211 m_pProgressBar = new QProgressBar; 212 if (m_pProgressBar) 213 { 214 m_pProgressBar->setMinimum(0); 215 m_pProgressBar->setMaximum(100); 216 /* Hide the QProgressBar's text since in MacOS it never shows: */ 217 m_pProgressBar->setTextVisible(false); 218 m_pMainLayout->addWidget(m_pProgressBar, 0, 0, 1, 1); 219 } 220 210 221 m_pCancelButton = new QIToolButton; 211 222 if (m_pCancelButton) … … 215 226 if (!m_comProgress.isNull() && !m_comProgress.GetCancelable()) 216 227 m_pCancelButton->setEnabled(false); 217 m_pMainLayout->addWidget(m_pCancelButton, 0, 0, 1, 1); 218 } 219 220 m_pProgressBar = new QProgressBar; 221 if (m_pProgressBar) 222 { 223 m_pProgressBar->setMinimum(0); 224 m_pProgressBar->setMaximum(100); 225 /* Hide the QProgressBar's text since in MacOS it never shows: */ 226 m_pProgressBar->setTextVisible(false); 227 m_pMainLayout->addWidget(m_pProgressBar, 0, 1, 1, 2); 228 } 228 m_pMainLayout->addWidget(m_pCancelButton, 0, 1, 1, 1); 229 } 230 229 231 m_pStatusLabel = new QILabel; 230 232 if (m_pStatusLabel) 231 233 { 232 234 m_pStatusLabel->setContextMenuPolicy(Qt::NoContextMenu); 233 m_pMainLayout->addWidget(m_pStatusLabel, 0, 3, 1, 1);235 m_pMainLayout->addWidget(m_pStatusLabel, 0, 2, 1, 1); 234 236 } 235 237 … … 238 240 { 239 241 m_pPercentageLabel->setContextMenuPolicy(Qt::NoContextMenu); 240 m_pMainLayout->addWidget(m_pPercentageLabel, 1, 1, 1, 4);242 m_pMainLayout->addWidget(m_pPercentageLabel, 1, 0, 1, 4); 241 243 } 242 244 … … 362 364 return; 363 365 366 QScrollBar *pVerticalScrollBar = m_pScrollArea->verticalScrollBar(); 367 if (pVerticalScrollBar) 368 QObject::connect(pVerticalScrollBar, &QScrollBar::rangeChanged, this, &UIGuestControlFileManagerOperationsPanel::sltScrollToBottom); 369 364 370 m_pScrollArea->setBackgroundRole(QPalette::Window); 365 371 m_pScrollArea->setWidgetResizable(true); … … 455 461 } 456 462 463 void UIGuestControlFileManagerOperationsPanel::sltScrollToBottom(int iMin, int iMax) 464 { 465 Q_UNUSED(iMin); 466 if (m_pScrollArea) 467 m_pScrollArea->verticalScrollBar()->setValue(iMax); 468 } 469 457 470 #include "UIGuestControlFileManagerOperationsPanel.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerOperationsPanel.h
r75897 r75915 74 74 void sltHandleWidgetFocusIn(QWidget *pWidget); 75 75 void sltHandleWidgetFocusOut(QWidget *pWidget); 76 void sltScrollToBottom(int iMin, int iMax); 76 77 77 78 private:
Note:
See TracChangeset
for help on using the changeset viewer.