Changeset 57608 in vbox
- Timestamp:
- Sep 3, 2015 11:44:27 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 102475
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp
r57551 r57608 42 42 : QIWithRetranslateUI2<QIDialog>(pParent) 43 43 , m_strVersion(strVersion) 44 , m_pLabel(0) 44 45 { 45 46 /* Prepare: */ … … 49 50 bool VBoxAboutDlg::event(QEvent *pEvent) 50 51 { 52 /* Set fixed-size for dialog: */ 51 53 if (pEvent->type() == QEvent::Polish) 52 54 setFixedSize(m_size); 55 /* Call to base-class: */ 53 56 return QIDialog::event(pEvent); 54 57 } … … 57 60 { 58 61 QPainter painter(this); 62 /* Draw About-VirtualBox background image: */ 59 63 painter.drawPixmap(0, 0, m_pixmap); 60 64 } … … 63 67 { 64 68 setWindowTitle(tr("VirtualBox - About")); 65 QString strAboutText = tr("VirtualBox Graphical User Interface");69 const QString strAboutText = tr("VirtualBox Graphical User Interface"); 66 70 #ifdef VBOX_BLEEDING_EDGE 67 QString strVersionText = "EXPERIMENTAL build %1 - " + QString(VBOX_BLEEDING_EDGE);68 #else 69 QString strVersionText = tr("Version %1");70 #endif 71 const QString strVersionText = "EXPERIMENTAL build %1 - " + QString(VBOX_BLEEDING_EDGE); 72 #else /* !VBOX_BLEEDING_EDGE */ 73 const QString strVersionText = tr("Version %1"); 74 #endif /* !VBOX_BLEEDING_EDGE */ 71 75 #if VBOX_OSE 72 76 m_strAboutText = strAboutText + " " + strVersionText.arg(m_strVersion) + "\n" + 73 77 QString("%1 2004-" VBOX_C_YEAR " " VBOX_VENDOR).arg(QChar(0xa9)); 74 #else /* VBOX_OSE */78 #else /* !VBOX_OSE */ 75 79 m_strAboutText = strAboutText + "\n" + strVersionText.arg(m_strVersion); 76 #endif /* VBOX_OSE */80 #endif /* !VBOX_OSE */ 77 81 m_strAboutText = m_strAboutText + "\n" + QString("Copyright %1 2015 Oracle and/or its affiliates. All rights reserved.").arg(QChar(0xa9)); 82 AssertPtrReturnVoid(m_pLabel); 78 83 m_pLabel->setText(m_strAboutText); 79 84 } … … 88 93 89 94 /* Branding: Use a custom about splash picture if set: */ 90 QString strSplash = vboxGlobal().brandingGetKey("UI/AboutSplash");95 const QString strSplash = vboxGlobal().brandingGetKey("UI/AboutSplash"); 91 96 if (vboxGlobal().brandingIsActive() && !strSplash.isEmpty()) 92 97 { … … 99 104 100 105 /* Load image: */ 101 QIcon icon = UIIconPool::iconSet(strPath);106 const QIcon icon = UIIconPool::iconSet(strPath); 102 107 m_size = icon.availableSizes().first(); 103 108 m_pixmap = icon.pixmap(m_size); 104 109 105 /* Prepare main-layout: */110 /* Prepares main-layout: */ 106 111 prepareMainLayout(); 107 112 … … 121 126 { 122 127 /* Prepare label for version text: */ 123 124 128 QPalette palette; 125 129 /* Branding: Set a different text color (because splash also could be white), 126 130 * otherwise use white as default color: */ 127 QString strColor = vboxGlobal().brandingGetKey("UI/AboutTextColor");131 const QString strColor = vboxGlobal().brandingGetKey("UI/AboutTextColor"); 128 132 if (!strColor.isEmpty()) 129 133 palette.setColor(QPalette::WindowText, QColor(strColor).name()); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h
r57551 r57608 40 40 /** Constructs dialog passing @a pParent to the QWidget base-class constructor. 41 41 * @param strVersion is used to specify the version number of VirtualBox. */ 42 VBoxAboutDlg(QWidget *pParent, const QString &strVersion);42 VBoxAboutDlg(QWidget *pParent, const QString &strVersion); 43 43 44 44 protected: 45 45 46 /** Handles Qt polish event. */46 /** Handles any Qt @a pEvent. */ 47 47 bool event(QEvent *pEvent); 48 48 49 /** Handles Qt paint -event to draw About-VirtualBox image. */49 /** Handles Qt paint @a pEvent. */ 50 50 void paintEvent(QPaintEvent *pEvent); 51 51 … … 55 55 private: 56 56 57 /** Prepare About-VirtualBox dialog. */57 /** Prepares About-VirtualBox dialog. */ 58 58 void prepare(); 59 59 60 /** Prepare main-layout routine. */60 /** Prepares main-layout. */ 61 61 void prepareMainLayout(); 62 62
Note:
See TracChangeset
for help on using the changeset viewer.