VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 3 weeks 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.1 KB
Line 
1/* $Id: UITakeSnapshotDialog.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UITakeSnapshotDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2024 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 "UILibraryDefs.h"
40
41/* Forward declarations: */
42class QLabel;
43class QLineEdit;
44class QTextEdit;
45class QIDialogButtonBox;
46class QILabel;
47
48/** QIDialog subclass for taking snapshot name/description. */
49class SHARED_LIBRARY_STUFF UITakeSnapshotDialog : public QIDialog
50{
51 Q_OBJECT;
52
53public:
54
55 /** Constructs take snapshot dialog passing @ pParent to the base-class.
56 * @param cImmutableMedia Brings the amount of immutable mediums. */
57 UITakeSnapshotDialog(QWidget *pParent, ulong cImmutableMedia);
58
59 /** Defines snapshot @a icon. */
60 void setIcon(const QIcon &icon);
61
62 /** Defines snapshot @a strName. */
63 void setName(const QString &strName);
64
65 /** Returns snapshot name. */
66 QString name() const;
67 /** Returns snapshot description. */
68 QString description() const;
69
70protected:
71
72 /** Handles any Qt @a pEvent. */
73 virtual bool event(QEvent *pEvent) RT_OVERRIDE;
74
75private slots:
76
77 /** Handles @a strName change signal. */
78 void sltHandleNameChanged(const QString &strName);
79
80 /** Handles translation event. */
81 void sltRetranslateUI();
82
83private:
84
85 /** Prepares all. */
86 void prepare();
87 /** Prepares contents. */
88 void prepareContents();
89
90 /** Updates pixmap. */
91 void updatePixmap();
92
93 /** Holds the amount of immutable mediums. */
94 const ulong m_cImmutableMedia;
95
96 /** Holds the snapshot icon. */
97 QIcon m_icon;
98
99 /** Holds the icon label instance. */
100 QLabel *m_pLabelIcon;
101
102 /** Holds the name label instance. */
103 QLabel *m_pLabelName;
104 /** Holds the name editor instance. */
105 QLineEdit *m_pEditorName;
106
107 /** Holds the description label instance. */
108 QLabel *m_pLabelDescription;
109 /** Holds the description editor instance. */
110 QTextEdit *m_pEditorDescription;
111
112 /** Holds the information label instance. */
113 QILabel *m_pLabelInfo;
114
115 /** Holds the dialog button-box instance. */
116 QIDialogButtonBox *m_pButtonBox;
117};
118
119#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