VirtualBox

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

Last change on this file since 98103 was 98103, checked in by vboxsync, 21 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: UITakeSnapshotDialog.h 98103 2023-01-17 14:15:46Z 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;
48class CMachine;
49
50/** QIDialog subclass for taking snapshot name/description. */
51class SHARED_LIBRARY_STUFF UITakeSnapshotDialog : public QIWithRetranslateUI<QIDialog>
52{
53 Q_OBJECT;
54
55public:
56
57 /** Constructs take snapshot dialog passing @ pParent to the base-class.
58 * @param comMachine Brings the machine to take snapshot for. */
59 UITakeSnapshotDialog(QWidget *pParent, const CMachine &comMachine);
60
61 /** Defines snapshot @a icon. */
62 void setIcon(const QIcon &icon);
63
64 /** Defines snapshot @a strName. */
65 void setName(const QString &strName);
66
67 /** Returns snapshot name. */
68 QString name() const;
69 /** Returns snapshot description. */
70 QString description() const;
71
72protected:
73
74 /** Handles any Qt @a pEvent. */
75 virtual bool event(QEvent *pEvent) RT_OVERRIDE;
76
77 /** Handles translation event. */
78 virtual void retranslateUi() RT_OVERRIDE;
79
80private slots:
81
82 /** Handles @a strName change signal. */
83 void sltHandleNameChanged(const QString &strName);
84
85private:
86
87 /** Prepares all. */
88 void prepare();
89 /** Prepares contents. */
90 void prepareContents();
91
92 /** Updates pixmap. */
93 void updatePixmap();
94
95 /** Holds the wrapper of machine to take snapshot for. */
96 const CMachine &m_comMachine;
97
98 /** Holds the snapshot icon. */
99 QIcon m_icon;
100
101 /** Holds the amount of immutable attachments. */
102 int m_cImmutableMedia;
103
104 /** Holds the icon label instance. */
105 QLabel *m_pLabelIcon;
106
107 /** Holds the name label instance. */
108 QLabel *m_pLabelName;
109 /** Holds the name editor instance. */
110 QLineEdit *m_pEditorName;
111
112 /** Holds the description label instance. */
113 QLabel *m_pLabelDescription;
114 /** Holds the description editor instance. */
115 QTextEdit *m_pEditorDescription;
116
117 /** Holds the information label instance. */
118 QILabel *m_pLabelInfo;
119
120 /** Holds the dialog button-box instance. */
121 QIDialogButtonBox *m_pButtonBox;
122};
123
124#endif /* !FEQT_INCLUDED_SRC_UITakeSnapshotDialog_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