1 | /* $Id: UIFDCreationDialog.h 72903 2018-07-04 19:59:39Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIFDCreationDialog class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2008-2017 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef __UIFDCreationDialog_h__
|
---|
19 | #define __UIFDCreationDialog_h__
|
---|
20 |
|
---|
21 | /* Qt includes: */
|
---|
22 | #include <QDialog>
|
---|
23 |
|
---|
24 |
|
---|
25 | /* GUI Includes */
|
---|
26 | #include "QIWithRetranslateUI.h"
|
---|
27 |
|
---|
28 | /* Forward declarations: */
|
---|
29 | class QDialogButtonBox;
|
---|
30 | class QLabel;
|
---|
31 | class QComboBox;
|
---|
32 | class UIFilePathSelector;
|
---|
33 |
|
---|
34 | /* A QDialog extension to get necessary setting from the user for floppy disk creation */
|
---|
35 | class SHARED_LIBRARY_STUFF UIFDCreationDialog : public QIWithRetranslateUI<QDialog>
|
---|
36 |
|
---|
37 | {
|
---|
38 | Q_OBJECT;
|
---|
39 |
|
---|
40 |
|
---|
41 | public:
|
---|
42 |
|
---|
43 | UIFDCreationDialog(QWidget *pParent = 0,
|
---|
44 | const QString &strMachineName = QString(),
|
---|
45 | const QString &strMachineFolder = QString());
|
---|
46 |
|
---|
47 | virtual void accept() /* override */;
|
---|
48 | /* Return the mediumID */
|
---|
49 | QString mediumID() const;
|
---|
50 |
|
---|
51 | protected:
|
---|
52 |
|
---|
53 | void retranslateUi();
|
---|
54 |
|
---|
55 | private slots:
|
---|
56 |
|
---|
57 |
|
---|
58 | private:
|
---|
59 | enum FDSize
|
---|
60 | {
|
---|
61 | FDSize_2_88M,
|
---|
62 | FDSize_1_44M,
|
---|
63 | FDSize_1_2M,
|
---|
64 | FDSize_720K,
|
---|
65 | FDSize_360K
|
---|
66 | };
|
---|
67 | void prepare();
|
---|
68 | QString getDefaultFolder() const;
|
---|
69 | UIFilePathSelector *m_pFilePathselector;
|
---|
70 | QString m_strMachineName;
|
---|
71 | QString m_strMachineFolder;
|
---|
72 | QLabel *m_pPathLabel;
|
---|
73 | QLabel *m_pSizeLabel;
|
---|
74 | QComboBox *m_pSizeCombo;
|
---|
75 | QDialogButtonBox *m_pButtonBox;
|
---|
76 | QString m_strMediumID;
|
---|
77 | };
|
---|
78 |
|
---|
79 | #endif // __UIFDCreationDialog_h__
|
---|