[55401] | 1 | /* $Id: UITakeSnapshotDialog.h 104358 2024-04-18 05:33:40Z vboxsync $ */
|
---|
[8743] | 2 | /** @file
|
---|
[67535] | 3 | * VBox Qt GUI - UITakeSnapshotDialog class declaration.
|
---|
[8743] | 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
[8743] | 8 | *
|
---|
[96407] | 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
|
---|
[8743] | 26 | */
|
---|
| 27 |
|
---|
[76581] | 28 | #ifndef FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h
|
---|
| 29 | #define FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h
|
---|
[76532] | 30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 31 | # pragma once
|
---|
| 32 | #endif
|
---|
[8743] | 33 |
|
---|
[72813] | 34 | /* Qt includes: */
|
---|
| 35 | #include <QIcon>
|
---|
| 36 |
|
---|
[41587] | 37 | /* GUI includes: */
|
---|
[67535] | 38 | #include "QIDialog.h"
|
---|
[72022] | 39 | #include "UILibraryDefs.h"
|
---|
[8743] | 40 |
|
---|
[41587] | 41 | /* Forward declarations: */
|
---|
[67535] | 42 | class QLabel;
|
---|
| 43 | class QLineEdit;
|
---|
| 44 | class QTextEdit;
|
---|
| 45 | class QIDialogButtonBox;
|
---|
| 46 | class QILabel;
|
---|
[41587] | 47 |
|
---|
[67535] | 48 | /** QIDialog subclass for taking snapshot name/description. */
|
---|
[104358] | 49 | class SHARED_LIBRARY_STUFF UITakeSnapshotDialog : public QIDialog
|
---|
[8743] | 50 | {
|
---|
[9729] | 51 | Q_OBJECT;
|
---|
[8743] | 52 |
|
---|
| 53 | public:
|
---|
| 54 |
|
---|
[67535] | 55 | /** Constructs take snapshot dialog passing @ pParent to the base-class.
|
---|
[98779] | 56 | * @param cImmutableMedia Brings the amount of immutable mediums. */
|
---|
| 57 | UITakeSnapshotDialog(QWidget *pParent, ulong cImmutableMedia);
|
---|
[8743] | 58 |
|
---|
[72813] | 59 | /** Defines snapshot @a icon. */
|
---|
| 60 | void setIcon(const QIcon &icon);
|
---|
[67535] | 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 |
|
---|
[9089] | 70 | protected:
|
---|
| 71 |
|
---|
[72813] | 72 | /** Handles any Qt @a pEvent. */
|
---|
[93990] | 73 | virtual bool event(QEvent *pEvent) RT_OVERRIDE;
|
---|
[72813] | 74 |
|
---|
[8743] | 75 | private slots:
|
---|
| 76 |
|
---|
[72022] | 77 | /** Handles @a strName change signal. */
|
---|
[67535] | 78 | void sltHandleNameChanged(const QString &strName);
|
---|
| 79 |
|
---|
[104358] | 80 | /** Handles translation event. */
|
---|
| 81 | void sltRetranslateUI();
|
---|
| 82 |
|
---|
[67535] | 83 | private:
|
---|
| 84 |
|
---|
| 85 | /** Prepares all. */
|
---|
| 86 | void prepare();
|
---|
[72022] | 87 | /** Prepares contents. */
|
---|
| 88 | void prepareContents();
|
---|
[67535] | 89 |
|
---|
[72813] | 90 | /** Updates pixmap. */
|
---|
| 91 | void updatePixmap();
|
---|
| 92 |
|
---|
[98779] | 93 | /** Holds the amount of immutable mediums. */
|
---|
| 94 | const ulong m_cImmutableMedia;
|
---|
[67535] | 95 |
|
---|
[72813] | 96 | /** Holds the snapshot icon. */
|
---|
| 97 | QIcon m_icon;
|
---|
| 98 |
|
---|
[67535] | 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;
|
---|
[8743] | 117 | };
|
---|
| 118 |
|
---|
[76581] | 119 | #endif /* !FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h */
|
---|