VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/UITakeSnapshotDialog.h@ 98779

Last change on this file since 98779 was 98779, checked in by vboxsync, 15 months ago

FE/Qt: bugref:10322: Runtime UI: Reworking CMachine wrapper usage step-by-step; Rest of snapshot related stuff, immutable medium check for shared lib.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: UITakeSnapshotDialog.h 98779 2023-02-28 11:48:37Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UITakeSnapshotDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h
29#define FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QIcon>
36
37/* GUI includes: */
38#include "QIDialog.h"
39#include "QIWithRetranslateUI.h"
40#include "UILibraryDefs.h"
41
42/* Forward declarations: */
43class QLabel;
44class QLineEdit;
45class QTextEdit;
46class QIDialogButtonBox;
47class QILabel;
48
49/** QIDialog subclass for taking snapshot name/description. */
50class SHARED_LIBRARY_STUFF UITakeSnapshotDialog : public QIWithRetranslateUI<QIDialog>
51{
52 Q_OBJECT;
53
54public:
55
56 /** Constructs take snapshot dialog passing @ pParent to the base-class.
57 * @param cImmutableMedia Brings the amount of immutable mediums. */
58 UITakeSnapshotDialog(QWidget *pParent, ulong cImmutableMedia);
59
60 /** Defines snapshot @a icon. */
61 void setIcon(const QIcon &icon);
62
63 /** Defines snapshot @a strName. */
64 void setName(const QString &strName);
65
66 /** Returns snapshot name. */
67 QString name() const;
68 /** Returns snapshot description. */
69 QString description() const;
70
71protected:
72
73 /** Handles any Qt @a pEvent. */
74 virtual bool event(QEvent *pEvent) RT_OVERRIDE;
75
76 /** Handles translation event. */
77 virtual void retranslateUi() RT_OVERRIDE;
78
79private slots:
80
81 /** Handles @a strName change signal. */
82 void sltHandleNameChanged(const QString &strName);
83
84private:
85
86 /** Prepares all. */
87 void prepare();
88 /** Prepares contents. */
89 void prepareContents();
90
91 /** Updates pixmap. */
92 void updatePixmap();
93
94 /** Holds the amount of immutable mediums. */
95 const ulong m_cImmutableMedia;
96
97 /** Holds the snapshot icon. */
98 QIcon m_icon;
99
100 /** Holds the icon label instance. */
101 QLabel *m_pLabelIcon;
102
103 /** Holds the name label instance. */
104 QLabel *m_pLabelName;
105 /** Holds the name editor instance. */
106 QLineEdit *m_pEditorName;
107
108 /** Holds the description label instance. */
109 QLabel *m_pLabelDescription;
110 /** Holds the description editor instance. */
111 QTextEdit *m_pEditorDescription;
112
113 /** Holds the information label instance. */
114 QILabel *m_pLabelInfo;
115
116 /** Holds the dialog button-box instance. */
117 QIDialogButtonBox *m_pButtonBox;
118};
119
120#endif /* !FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use