Changeset 68281 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 3, 2017 11:50:39 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIDesktopPane.cpp
r68246 r68281 36 36 # include "QIWithRetranslateUI.h" 37 37 # include "UIDesktopPane.h" 38 # include "UIIconPool.h"39 38 # include "VBoxUtils.h" 40 39 … … 141 140 /** Defines a tools pane welcome @a strText. */ 142 141 void setToolsPaneText(const QString &strText); 142 /** Defines a tools pane welcome @a icon. */ 143 void setToolsPaneIcon(const QIcon &icon); 143 144 /** Add a tool element. 144 145 * @param pAction Brings tool action reference. … … 183 184 /** Holds the tools pane text label instance. */ 184 185 QILabel *m_pLabelToolsPaneText; 186 /** Holds the tools pane icon label instance. */ 187 QLabel *m_pLabelToolsPaneIcon; 185 188 }; 186 189 … … 467 470 , m_pErrBox(0), m_pErrLabel(0), m_pErrText(0) 468 471 , m_pRefreshButton(0), m_pRefreshAction(pRefreshAction) 469 , m_pToolsPane(0), m_pLayoutWidget(0), m_pLabelToolsPaneText(0) 472 , m_pToolsPane(0), m_pLayoutWidget(0), m_pLabelToolsPaneText(0), m_pLabelToolsPaneIcon(0) 470 473 { 471 474 /* Translate finally: */ … … 504 507 /* Assign corresponding text: */ 505 508 m_pLabelToolsPaneText->setText(strText); 509 510 /* Raise corresponding widget: */ 511 setCurrentWidget(m_pToolsPane); 512 } 513 514 void UIDesktopPanePrivate::setToolsPaneIcon(const QIcon &icon) 515 { 516 /* Prepare tools pane if necessary: */ 517 prepareToolsPane(); 518 519 /* Assign corresponding icon: */ 520 m_pLabelToolsPaneIcon->setPixmap(icon.pixmap(QSize(200, 200))); 506 521 507 522 /* Raise corresponding widget: */ … … 675 690 } 676 691 677 /* Create picture label: */678 QLabel *pLabelPicture= new QLabel;679 AssertPtrReturnVoid( pLabelPicture);692 /* Create welcome picture label: */ 693 m_pLabelToolsPaneIcon = new QLabel; 694 AssertPtrReturnVoid(m_pLabelToolsPaneIcon); 680 695 { 681 696 /* Configure label: */ 682 const QIcon icon = UIIconPool::iconSet(":/tools_200px.png"); 683 pLabelPicture->setPixmap(icon.pixmap(QSize(200, 200))); 684 pLabelPicture->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 697 m_pLabelToolsPaneIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 685 698 686 699 /* Add into layout: */ 687 pLayoutWelcome->addWidget( pLabelPicture);688 pLayoutWelcome->setAlignment( pLabelPicture, Qt::AlignHCenter | Qt::AlignTop);700 pLayoutWelcome->addWidget(m_pLabelToolsPaneIcon); 701 pLayoutWelcome->setAlignment(m_pLabelToolsPaneIcon, Qt::AlignHCenter | Qt::AlignTop); 689 702 } 690 703 … … 744 757 } 745 758 759 void UIDesktopPane::setToolsPaneIcon(const QIcon &icon) 760 { 761 m_pDesktopPrivate->setToolsPaneIcon(icon); 762 } 763 746 764 void UIDesktopPane::addToolDescription(QAction *pAction, const QString &strDescription) 747 765 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIDesktopPane.h
r68235 r68281 24 24 /* Forward declarations: */ 25 25 class QAction; 26 class QIcon; 27 class QString; 26 28 class UIDesktopPanePrivate; 27 29 … … 48 50 /** Defines a tools pane welcome @a strText. */ 49 51 void setToolsPaneText(const QString &strText); 52 /** Defines a tools pane welcome @a icon. */ 53 void setToolsPaneIcon(const QIcon &icon); 50 54 /** Add a tool element. 51 55 * @param pAction Brings tool action reference. -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneGlobal.cpp
r68235 r68281 27 27 # include "UIActionPoolSelector.h" 28 28 # include "UIDesktopPane.h" 29 # include "UIHostNetworkManager.h" 30 # include "UIIconPool.h" 29 31 # include "UIMediumManager.h" 30 # include "UIHostNetworkManager.h"31 32 # include "UIToolsPaneGlobal.h" 32 33 … … 183 184 { 184 185 /* Translate Global Tools welcome screen: */ 185 setDetailsText( 186 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_200px.png")); 187 m_pPaneDesktop->setToolsPaneText( 186 188 tr("<h3>Welcome to VirtualBox!</h3>" 187 189 "<p>This window represents a set of global tools " -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneMachine.cpp
r68235 r68281 28 28 # include "UIDesktopPane.h" 29 29 # include "UIGDetails.h" 30 # include "UIIconPool.h" 30 31 # include "UISnapshotPane.h" 31 32 # include "UIToolsPaneMachine.h" … … 201 202 { 202 203 /* Translate Machine Tools welcome screen: */ 203 setDetailsText( 204 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_200px.png")); 205 m_pPaneDesktop->setToolsPaneText( 204 206 tr("<h3>Welcome to VirtualBox!</h3>" 205 207 "<p>The left part of this window is a list of all virtual "
Note:
See TracChangeset
for help on using the changeset viewer.