Changeset 47616 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 8, 2013 4:23:33 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r47461 r47616 387 387 src/widgets/VBoxOSTypeSelectorButton.h \ 388 388 src/widgets/UINameAndSystemEditor.h \ 389 src/widgets/VBoxWarningPane.h \389 src/widgets/UIWarningPane.h \ 390 390 src/widgets/UIFilmContainer.h \ 391 391 src/widgets/graphics/UIGraphicsButton.h \ … … 637 637 src/widgets/VBoxOSTypeSelectorButton.cpp \ 638 638 src/widgets/UINameAndSystemEditor.cpp \ 639 src/widgets/VBoxWarningPane.cpp \639 src/widgets/UIWarningPane.cpp \ 640 640 src/widgets/UIFilmContainer.cpp \ 641 641 src/widgets/graphics/UIGraphicsButton.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r47595 r47616 27 27 /* Local includes */ 28 28 #include "UISettingsDialog.h" 29 #include " VBoxWarningPane.h"29 #include "UIWarningPane.h" 30 30 #include "VBoxGlobal.h" 31 31 #include "UIMessageCenter.h" … … 63 63 , m_fValid(true) 64 64 , m_fSilent(true) 65 , m_pWarningPane(new VBoxWarningPane(this))65 , m_pWarningPane(new UIWarningPane(this)) 66 66 /* Whats-this stuff: */ 67 67 , m_pWhatsThisTimer(new QTimer(this)) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
r47595 r47616 31 31 class QStackedWidget; 32 32 class QTimer; 33 class VBoxWarningPane;33 class UIWarningPane; 34 34 class VBoxSettingsSelector; 35 35 class UISettingsPage; … … 143 143 QString m_strErrorString; 144 144 QString m_strWarningString; 145 VBoxWarningPane *m_pWarningPane;145 UIWarningPane *m_pWarningPane; 146 146 147 147 /* Whats-This stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp
r47605 r47616 3 3 * 4 4 * VBox frontends: Qt4 GUI ("VirtualBox"): 5 * VBoxWarningPane class implementation5 * UIWarningPane class implementation 6 6 */ 7 7 8 8 /* 9 * Copyright (C) 2009-201 1Oracle Corporation9 * Copyright (C) 2009-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 18 18 */ 19 19 20 /* Global includes*/20 /* Qt includes: */ 21 21 #include <QHBoxLayout> 22 #include <QLabel> 22 23 23 /* Local includes*/24 #include " VBoxWarningPane.h"24 /* GUI includes: */ 25 #include "UIWarningPane.h" 25 26 26 VBoxWarningPane::VBoxWarningPane(QWidget *pParent)27 UIWarningPane::UIWarningPane(QWidget *pParent) 27 28 : QWidget(pParent) 29 , m_pLabelIcon(0) 30 , m_pLabelText(0) 28 31 { 29 QHBoxLayout *pLayout = new QHBoxLayout(this); 30 pLayout->setContentsMargins(0, 0, 0, 0); 31 pLayout->addWidget(&m_icon); 32 pLayout->addWidget(&m_label); 32 /* Prepare: */ 33 prepare(); 33 34 } 34 35 35 void VBoxWarningPane::setWarningPixmap(const QPixmap &imgPixmap)36 void UIWarningPane::setWarningPixmap(const QPixmap &pixmap) 36 37 { 37 m_ icon.setPixmap(imgPixmap);38 m_pLabelIcon->setPixmap(pixmap); 38 39 } 39 40 40 void VBoxWarningPane::setWarningText(const QString &strText)41 void UIWarningPane::setWarningText(const QString &strText) 41 42 { 42 m_ label.setText(strText);43 m_pLabelText->setText(strText); 43 44 } 44 45 46 void UIWarningPane::prepare() 47 { 48 /* Prepare content: */ 49 prepareContent(); 50 } 51 52 void UIWarningPane::prepareContent() 53 { 54 /* Create layout: */ 55 QHBoxLayout *pLayout = new QHBoxLayout(this); 56 { 57 /* Configure layout: */ 58 pLayout->setContentsMargins(0, 0, 0, 0); 59 /* Create icon label: */ 60 m_pLabelIcon = new QLabel; 61 /* Create text label: */ 62 m_pLabelText = new QLabel; 63 /* Add widgets into layout: */ 64 pLayout->addWidget(m_pLabelIcon); 65 pLayout->addWidget(m_pLabelText); 66 } 67 } 68 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.h
r47605 r47616 2 2 * 3 3 * VBox frontends: Qt4 GUI ("VirtualBox"): 4 * VBoxWarningPane class declaration4 * UIWarningPane class declaration 5 5 */ 6 6 7 7 /* 8 * Copyright (C) 2009-201 0Oracle Corporation8 * Copyright (C) 2009-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 17 */ 18 18 19 #ifndef __ VBoxWarningPane_h__20 #define __ VBoxWarningPane_h__19 #ifndef __UIWarningPane_h__ 20 #define __UIWarningPane_h__ 21 21 22 22 /* Global includes */ 23 23 #include <QWidget> 24 #include <QLabel>25 24 26 class VBoxWarningPane: public QWidget 25 /* Forward declarations: */ 26 class QLabel; 27 28 /* Warning-pane prototype: */ 29 class UIWarningPane: public QWidget 27 30 { 28 31 Q_OBJECT; … … 30 33 public: 31 34 32 VBoxWarningPane(QWidget *pParent = 0); 35 /* Constructor: */ 36 UIWarningPane(QWidget *pParent = 0); 33 37 34 void setWarningPixmap(const QPixmap &imgPixmap); 38 /* API: Warning stuff: */ 39 void setWarningPixmap(const QPixmap &pixmap); 35 40 void setWarningText(const QString &strText); 36 41 37 42 private: 38 43 39 QLabel m_icon; 40 QLabel m_label; 44 /* Helpers: Prepare stuff: */ 45 void prepare(); 46 void prepareContent(); 47 48 /* Variables: Widgets: */ 49 QLabel *m_pLabelIcon; 50 QLabel *m_pLabelText; 41 51 }; 42 52 43 #endif // __VBoxWarningPane_h__ 44 53 #endif /* __UIWarningPane_h__ */
Note:
See TracChangeset
for help on using the changeset viewer.