VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/VBoxSnapshotDetailsDlg.h@ 25045

Last change on this file since 25045 was 24737, checked in by vboxsync, 15 years ago

FE/Qt4: Snapshot Details Dialog: Preserving aspect ratio for initially opened screen-shot, supporting situation when screen-shot is not available but thumbnail is.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.3 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt4 GUI ("VirtualBox"):
4 * VBoxSnapshotDetailsDlg class declaration
5 */
6
7/*
8 * Copyright (C) 2008-2009 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBoxSnapshotDetailsDlg_h__
24#define __VBoxSnapshotDetailsDlg_h__
25
26/* Local includes */
27#include "VBoxSnapshotDetailsDlg.gen.h"
28#include "QIWithRetranslateUI.h"
29#include "COMDefs.h"
30
31/* Global forwards */
32class QScrollArea;
33
34class VBoxSnapshotDetailsDlg : public QIWithRetranslateUI <QDialog>, public Ui::VBoxSnapshotDetailsDlg
35{
36 Q_OBJECT;
37
38public:
39
40 VBoxSnapshotDetailsDlg (QWidget *aParent);
41
42 void getFromSnapshot (const CSnapshot &aSnapshot);
43 void putBackToSnapshot();
44
45protected:
46
47 void retranslateUi();
48
49 bool eventFilter (QObject *aObject, QEvent *aEvent);
50 void showEvent (QShowEvent *aEvent);
51
52private slots:
53
54 void onNameChanged (const QString &aText);
55
56private:
57
58 CSnapshot mSnapshot;
59
60 QPixmap mThumbnail;
61 QPixmap mScreenshot;
62};
63
64class VBoxScreenshotViewer : public QIWithRetranslateUI2 <QWidget>
65{
66 Q_OBJECT;
67
68public:
69
70 VBoxScreenshotViewer (QWidget *aParent, const QPixmap &aScreenshot,
71 const QString &aSnapshotName, const QString &aMachineName);
72
73private:
74
75 void retranslateUi();
76
77 void showEvent (QShowEvent *aEvent);
78 void resizeEvent (QResizeEvent *aEvent);
79 void mousePressEvent (QMouseEvent *aEvent);
80 void keyPressEvent (QKeyEvent *aEvent);
81
82 void adjustPicture();
83
84 QScrollArea *mArea;
85 QLabel *mPicture;
86
87 QPixmap mScreenshot;
88 QString mSnapshotName;
89 QString mMachineName;
90
91 bool mZoomMode;
92};
93
94#endif // __VBoxSnapshotDetailsDlg_h__
95
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