Changeset 91278 in vbox
- Timestamp:
- Sep 16, 2021 12:11:05 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
r91277 r91278 50 50 *********************************************************************************************************************************/ 51 51 52 UIDiskEditorGroupBox::UIDiskEditorGroupBox(bool fExpertMode, QWidget *pParent /* = 0 */)53 : QIWithRetranslateUI<QGroupBox>(pParent)54 , m_fExpertMode(fExpertMode)55 {56 if (!m_fExpertMode)57 setFlat(true);58 }59 60 52 /* static */ 61 53 QString UIDiskEditorGroupBox::appendExtension(const QString &strName, const QString &strExtension) … … 302 294 303 295 UIMediumSizeAndPathGroupBox::UIMediumSizeAndPathGroupBox(bool fExpertMode, QWidget *pParent, qulonglong uMinimumMediumSize) 304 : UIDiskEditorGroupBox(fExpertMode,pParent)296 : QIWithRetranslateUI<QGroupBox>(pParent) 305 297 , m_pLocationEditor(0) 306 298 , m_pLocationOpenButton(0) … … 308 300 , m_pLocationLabel(0) 309 301 , m_pSizeLabel(0) 302 , m_fExpertMode(fExpertMode) 310 303 { 311 304 prepare(uMinimumMediumSize); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.h
r91272 r91278 52 52 #include "CMediumFormat.h" 53 53 54 /** Base class for disk related group boxes. */ 55 class SHARED_LIBRARY_STUFF UIDiskEditorGroupBox : public QIWithRetranslateUI<QGroupBox> 56 { 57 Q_OBJECT; 58 59 public: 60 61 UIDiskEditorGroupBox(bool fExpertMode, QWidget *pParent = 0); 62 63 static QString appendExtension(const QString &strName, const QString &strExtension); 64 static QString constructMediumFilePath(const QString &strFileName, const QString &strPath); 65 static bool checkFATSizeLimitation(const qulonglong uVariant, const QString &strMediumPath, const qulonglong uSize); 66 static QString openFileDialogForDiskFile(const QString &strInitialPath, const CMediumFormat &comMediumFormat, 54 /** A set of static utility functions used by several wizard in the context of virtual media. */ 55 namespace SHARED_LIBRARY_STUFF UIDiskEditorGroupBox 56 { 57 QString appendExtension(const QString &strName, const QString &strExtension); 58 QString constructMediumFilePath(const QString &strFileName, const QString &strPath); 59 bool checkFATSizeLimitation(const qulonglong uVariant, const QString &strMediumPath, const qulonglong uSize); 60 QString openFileDialogForDiskFile(const QString &strInitialPath, const CMediumFormat &comMediumFormat, 67 61 KDeviceType enmDeviceType, QWidget *pParent); 68 62 /** Attempts to find a file extention for the device type @p enmDeviceType within the extensions 69 63 * returned by CMediumFormat::DescribeFileExtensions(..). */ 70 static QString defaultExtension(const CMediumFormat &mediumFormatRef, KDeviceType enmDeviceType); 71 72 protected: 73 74 bool m_fExpertMode; 75 }; 76 64 QString defaultExtension(const CMediumFormat &mediumFormatRef, KDeviceType enmDeviceType); 65 }; 77 66 78 67 class SHARED_LIBRARY_STUFF UIDiskVariantWidget : public QIWithRetranslateUI<QWidget> … … 114 103 115 104 116 class SHARED_LIBRARY_STUFF UIMediumSizeAndPathGroupBox : public UIDiskEditorGroupBox105 class SHARED_LIBRARY_STUFF UIMediumSizeAndPathGroupBox : public QIWithRetranslateUI<QGroupBox> 117 106 { 118 107 Q_OBJECT; … … 153 142 QIRichTextLabel *m_pLocationLabel; 154 143 QIRichTextLabel *m_pSizeLabel; 144 bool m_fExpertMode; 155 145 }; 156 146
Note:
See TracChangeset
for help on using the changeset viewer.