VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.h@ 91350

Last change on this file since 91350 was 91350, checked in by vboxsync, 3 years ago

FE/Qt: bugref:9083. Some renaming and improvement.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: UIFDCreationDialog.h 91350 2021-09-23 14:09:33Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIFDCreationDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2008-2021 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 FEQT_INCLUDED_SRC_medium_UIFDCreationDialog_h
19#define FEQT_INCLUDED_SRC_medium_UIFDCreationDialog_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QDialog>
26#include <QUuid>
27
28/* GUI Includes */
29#include "QIWithRetranslateUI.h"
30
31/* Forward declarations: */
32class QCheckBox;
33class QComboBox;
34class QDialogButtonBox;
35class QLabel;
36class UIFilePathSelector;
37class CMedium;
38
39/* A QDialog extension to get necessary setting from the user for floppy disk creation. */
40class SHARED_LIBRARY_STUFF UIFDCreationDialog : public QIWithRetranslateUI<QDialog>
41{
42 Q_OBJECT;
43
44public:
45
46 /** Constructs the floppy disc creation dialog passing @a pParent to the base-class.
47 * @param strDefaultFolder Brings the default folder.
48 * @param strMachineName Brings the machine name. */
49 UIFDCreationDialog(QWidget *pParent,
50 const QString &strDefaultFolder,
51 const QString &strMachineName = QString());
52
53 /** Return the medium ID. */
54 QUuid mediumID() const;
55
56public slots:
57
58 /** Creates the floppy disc image, asynchronously. */
59 virtual void accept() /* override final */;
60
61protected:
62
63 /** Handles translation event. */
64 virtual void retranslateUi() /* override final */;
65
66private slots:
67
68 /** Handles signal about @a comMedium was created. */
69 void sltHandleMediumCreated(const CMedium &comMedium);
70 void sltPathChanged(const QString &strPath);
71
72private:
73
74 /** Floppy disc sizes. */
75 enum FDSize
76 {
77 //FDSize_2_88M,
78 FDSize_1_44M,
79 FDSize_1_2M,
80 FDSize_720K,
81 FDSize_360K
82 };
83
84 /** Prepares all. */
85 void prepare();
86
87 /** Returns default file-path. */
88 QString getDefaultFilePath() const;
89 /** Returns false if the file is already exists. */
90 bool checkFilePath(const QString &strPath) const;
91
92 /** Holds the default folder. */
93 QString m_strDefaultFolder;
94 /** Holds the machine name. */
95 QString m_strMachineName;
96
97 /** Holds the path label instance. */
98 QLabel *m_pPathLabel;
99 /** Holds the file path selector instance. */
100 UIFilePathSelector *m_pFilePathSelector;
101 /** Holds the size label instance. */
102 QLabel *m_pSizeLabel;
103 /** Holds the size combo instance. */
104 QComboBox *m_pSizeCombo;
105 /** Holds the format check-box instance. */
106 QCheckBox *m_pFormatCheckBox;
107 /** holds the button-box instance. */
108 QDialogButtonBox *m_pButtonBox;
109
110 /** Holds the created medium ID. */
111 QUuid m_uMediumID;
112};
113
114#endif /* !FEQT_INCLUDED_SRC_medium_UIFDCreationDialog_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette