VirtualBox

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

Last change on this file since 74942 was 73926, checked in by vboxsync, 6 years ago

FE/Qt: bugref:8472. Refactoring the term 'mediums' to media

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

© 2023 Oracle
ContactPrivacy policyTerms of Use