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 */
|
---|
32 | class QScrollArea;
|
---|
33 |
|
---|
34 | class VBoxSnapshotDetailsDlg : public QIWithRetranslateUI <QDialog>, public Ui::VBoxSnapshotDetailsDlg
|
---|
35 | {
|
---|
36 | Q_OBJECT;
|
---|
37 |
|
---|
38 | public:
|
---|
39 |
|
---|
40 | VBoxSnapshotDetailsDlg (QWidget *aParent);
|
---|
41 |
|
---|
42 | void getFromSnapshot (const CSnapshot &aSnapshot);
|
---|
43 | void putBackToSnapshot();
|
---|
44 |
|
---|
45 | protected:
|
---|
46 |
|
---|
47 | void retranslateUi();
|
---|
48 |
|
---|
49 | bool eventFilter (QObject *aObject, QEvent *aEvent);
|
---|
50 | void showEvent (QShowEvent *aEvent);
|
---|
51 |
|
---|
52 | private slots:
|
---|
53 |
|
---|
54 | void onNameChanged (const QString &aText);
|
---|
55 |
|
---|
56 | private:
|
---|
57 |
|
---|
58 | CSnapshot mSnapshot;
|
---|
59 |
|
---|
60 | QPixmap mThumbnail;
|
---|
61 | QPixmap mScreenshot;
|
---|
62 | };
|
---|
63 |
|
---|
64 | class VBoxScreenshotViewer : public QIWithRetranslateUI2 <QWidget>
|
---|
65 | {
|
---|
66 | Q_OBJECT;
|
---|
67 |
|
---|
68 | public:
|
---|
69 |
|
---|
70 | VBoxScreenshotViewer (QWidget *aParent, const QPixmap &aScreenshot,
|
---|
71 | const QString &aSnapshotName, const QString &aMachineName);
|
---|
72 |
|
---|
73 | private:
|
---|
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 |
|
---|