VirtualBox

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

Last change on this file since 82781 was 76581, checked in by vboxsync, 5 years ago

Fe/QT: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: UITakeSnapshotDialog.h 76581 2019-01-01 06:24:57Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UITakeSnapshotDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2019 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_UITakeSnapshotDialog_h
19#define FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QIcon>
26
27/* GUI includes: */
28#include "QIDialog.h"
29#include "QIWithRetranslateUI.h"
30#include "UILibraryDefs.h"
31
32/* Forward declarations: */
33class QLabel;
34class QLineEdit;
35class QTextEdit;
36class QIDialogButtonBox;
37class QILabel;
38class CMachine;
39
40/** QIDialog subclass for taking snapshot name/description. */
41class SHARED_LIBRARY_STUFF UITakeSnapshotDialog : public QIWithRetranslateUI<QIDialog>
42{
43 Q_OBJECT;
44
45public:
46
47 /** Constructs take snapshot dialog passing @ pParent to the base-class.
48 * @param comMachine Brings the machine to take snapshot for. */
49 UITakeSnapshotDialog(QWidget *pParent, const CMachine &comMachine);
50
51 /** Defines snapshot @a icon. */
52 void setIcon(const QIcon &icon);
53
54 /** Defines snapshot @a strName. */
55 void setName(const QString &strName);
56
57 /** Returns snapshot name. */
58 QString name() const;
59 /** Returns snapshot description. */
60 QString description() const;
61
62protected:
63
64 /** Handles any Qt @a pEvent. */
65 virtual bool event(QEvent *pEvent) /* override */;
66
67 /** Handles translation event. */
68 virtual void retranslateUi() /* override */;
69
70private slots:
71
72 /** Handles @a strName change signal. */
73 void sltHandleNameChanged(const QString &strName);
74
75private:
76
77 /** Prepares all. */
78 void prepare();
79 /** Prepares contents. */
80 void prepareContents();
81
82 /** Updates pixmap. */
83 void updatePixmap();
84
85 /** Holds the wrapper of machine to take snapshot for. */
86 const CMachine &m_comMachine;
87
88 /** Holds the snapshot icon. */
89 QIcon m_icon;
90
91 /** Holds the amount of immutable attachments. */
92 int m_cImmutableMedia;
93
94 /** Holds the icon label instance. */
95 QLabel *m_pLabelIcon;
96
97 /** Holds the name label instance. */
98 QLabel *m_pLabelName;
99 /** Holds the name editor instance. */
100 QLineEdit *m_pEditorName;
101
102 /** Holds the description label instance. */
103 QLabel *m_pLabelDescription;
104 /** Holds the description editor instance. */
105 QTextEdit *m_pEditorDescription;
106
107 /** Holds the information label instance. */
108 QILabel *m_pLabelInfo;
109
110 /** Holds the dialog button-box instance. */
111 QIDialogButtonBox *m_pButtonBox;
112};
113
114#endif /* !FEQT_INCLUDED_SRC_UITakeSnapshotDialog_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use