Changeset 75673 in vbox
- Timestamp:
- Nov 22, 2018 3:56:42 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 2 edited
-
UIGuestControlFileTable.cpp (modified) (6 diffs)
-
UIGuestControlFileTable.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp
r75662 r75673 148 148 149 149 QCheckBox *m_pAskNextTimeCheckBox; 150 Q Label*m_pQuestionLabel;150 QILabel *m_pQuestionLabel; 151 151 152 152 }; … … 636 636 QVBoxLayout *pLayout = new QVBoxLayout(this); 637 637 638 m_pQuestionLabel = new Q Label;638 m_pQuestionLabel = new QILabel; 639 639 if (m_pQuestionLabel) 640 640 { … … 691 691 , m_pMainLayout(0) 692 692 , m_pLocationComboBox(0) 693 , m_pWarningLabel(0) 693 694 { 694 695 prepareObjects(); … … 782 783 783 784 } 785 m_pWarningLabel = new QILabel(this); 786 if (m_pWarningLabel) 787 { 788 m_pMainLayout->addWidget(m_pWarningLabel, 2, 0, 5, 5); 789 m_pWarningLabel->setStyleSheet("font: 24pt;"); 790 m_pWarningLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); 791 } 792 m_pWarningLabel->setVisible(!isEnabled()); 793 m_pView->setVisible(isEnabled()); 794 784 795 m_pSearchLineEdit = new QILineEdit; 785 796 if (m_pSearchLineEdit) … … 1258 1269 m_pRootItem->setData(UIGuestControlFileManager::tr("Permissions"), UIGuestControlFileModelColumn_Permissions); 1259 1270 } 1271 if (m_pWarningLabel) 1272 m_pWarningLabel->setText(UIGuestControlFileManager::tr("No Guest Session")); 1260 1273 } 1261 1274 … … 1400 1413 } 1401 1414 1415 bool UIGuestControlFileTable::event(QEvent *pEvent) 1416 { 1417 if (pEvent->type() == QEvent::EnabledChange) 1418 { 1419 m_pWarningLabel->setVisible(!isEnabled()); 1420 m_pView->setVisible(isEnabled()); 1421 } 1422 return QIWithRetranslateUI<QWidget>::event(pEvent); 1423 } 1424 1425 1402 1426 QString UIGuestControlFileTable::fileTypeString(FileObjectType type) 1403 1427 { -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h
r75643 r75673 307 307 virtual void prepareToolbar() = 0; 308 308 virtual void createFileViewContextMenu(const QWidget *pWidget, const QPoint &point) = 0; 309 virtual bool event(QEvent *pEvent) /* override */; 309 310 QString fileTypeString(FileObjectType type); 310 311 /* @p item index is item location in model not in 'proxy' model */ … … 378 379 QStringList m_copyCutBuffer; 379 380 QILineEdit *m_pSearchLineEdit; 380 friend class UIGuestControlFileModel; 381 QILabel *m_pWarningLabel; 382 friend class UIGuestControlFileModel; 381 383 }; 382 384
Note:
See TracChangeset
for help on using the changeset viewer.

