1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
4 | * VBoxSnapshotDetailsDlg class declaration
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2008-2009 Oracle Corporation
|
---|
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 |
|
---|
19 | #ifndef __VBoxSnapshotDetailsDlg_h__
|
---|
20 | #define __VBoxSnapshotDetailsDlg_h__
|
---|
21 |
|
---|
22 | /* Local includes */
|
---|
23 | #include "VBoxSnapshotDetailsDlg.gen.h"
|
---|
24 | #include "QIWithRetranslateUI.h"
|
---|
25 | #include "COMDefs.h"
|
---|
26 |
|
---|
27 | /* Global forwards */
|
---|
28 | class QScrollArea;
|
---|
29 |
|
---|
30 | class VBoxSnapshotDetailsDlg : public QIWithRetranslateUI <QDialog>, public Ui::VBoxSnapshotDetailsDlg
|
---|
31 | {
|
---|
32 | Q_OBJECT;
|
---|
33 |
|
---|
34 | public:
|
---|
35 |
|
---|
36 | VBoxSnapshotDetailsDlg (QWidget *aParent);
|
---|
37 |
|
---|
38 | void getFromSnapshot (const CSnapshot &aSnapshot);
|
---|
39 | void putBackToSnapshot();
|
---|
40 |
|
---|
41 | protected:
|
---|
42 |
|
---|
43 | void retranslateUi();
|
---|
44 |
|
---|
45 | bool eventFilter (QObject *aObject, QEvent *aEvent);
|
---|
46 | void showEvent (QShowEvent *aEvent);
|
---|
47 |
|
---|
48 | private slots:
|
---|
49 |
|
---|
50 | void onNameChanged (const QString &aText);
|
---|
51 |
|
---|
52 | private:
|
---|
53 |
|
---|
54 | CSnapshot mSnapshot;
|
---|
55 |
|
---|
56 | QPixmap mThumbnail;
|
---|
57 | QPixmap mScreenshot;
|
---|
58 | };
|
---|
59 |
|
---|
60 | class VBoxScreenshotViewer : public QIWithRetranslateUI2 <QWidget>
|
---|
61 | {
|
---|
62 | Q_OBJECT;
|
---|
63 |
|
---|
64 | public:
|
---|
65 |
|
---|
66 | VBoxScreenshotViewer (QWidget *aParent, const QPixmap &aScreenshot,
|
---|
67 | const QString &aSnapshotName, const QString &aMachineName);
|
---|
68 |
|
---|
69 | private:
|
---|
70 |
|
---|
71 | void retranslateUi();
|
---|
72 |
|
---|
73 | void showEvent (QShowEvent *aEvent);
|
---|
74 | void resizeEvent (QResizeEvent *aEvent);
|
---|
75 | void mousePressEvent (QMouseEvent *aEvent);
|
---|
76 | void keyPressEvent (QKeyEvent *aEvent);
|
---|
77 |
|
---|
78 | void adjustPicture();
|
---|
79 |
|
---|
80 | QScrollArea *mArea;
|
---|
81 | QLabel *mPicture;
|
---|
82 |
|
---|
83 | QPixmap mScreenshot;
|
---|
84 | QString mSnapshotName;
|
---|
85 | QString mMachineName;
|
---|
86 |
|
---|
87 | bool mZoomMode;
|
---|
88 | };
|
---|
89 |
|
---|
90 | #endif // __VBoxSnapshotDetailsDlg_h__
|
---|
91 |
|
---|