VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSnapshotsWgt.h@ 10631

Last change on this file since 10631 was 9729, checked in by vboxsync, 17 years ago

Backed out 32068 - see comment #163 in bug #2664.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.8 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt4 GUI ("VirtualBox"):
4 * VBoxSnapshotsWgt class declaration
5 */
6
7/*
8 * Copyright (C) 2006-2008 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 __VBoxSnapshotsWgt_h__
24#define __VBoxSnapshotsWgt_h__
25
26#include "VBoxSnapshotsWgt.gen.h"
27#include "VBoxGlobal.h"
28#include "QIWithRetranslateUI.h"
29
30/* Qt includes */
31#include <QUuid>
32
33class SnapshotWgtItem;
34
35class QMenu;
36
37class VBoxSnapshotsWgt : public QIWithRetranslateUI<QWidget>,
38 public Ui::VBoxSnapshotsWgt
39{
40 Q_OBJECT;
41
42public:
43
44 VBoxSnapshotsWgt (QWidget *aParent);
45
46 void setMachine (const CMachine &aMachine);
47
48protected:
49
50 void retranslateUi();
51
52private slots:
53
54 void onCurrentChanged (QTreeWidgetItem *aNewItem,
55 QTreeWidgetItem *aOldItem = 0);
56 void onContextMenuRequested (const QPoint &aPoint);
57 void onItemChanged (QTreeWidgetItem *aItem, int aColumn);
58
59 void discardSnapshot();
60 void takeSnapshot();
61 void discardCurState();
62 void discardCurSnapAndState();
63 void showSnapshotDetails();
64
65 void machineDataChanged (const VBoxMachineDataChangeEvent &aE);
66 void machineStateChanged (const VBoxMachineStateChangeEvent &aE);
67 void sessionStateChanged (const VBoxSessionStateChangeEvent &aE);
68 void snapshotChanged (const VBoxSnapshotEvent &aE);
69
70private:
71
72 void refreshAll (bool aKeepSelected = true);
73 SnapshotWgtItem* findItem (const QUuid &aSnapshotId);
74 SnapshotWgtItem* curStateItem();
75 void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem);
76
77 CMachine mMachine;
78 QUuid mMachineId;
79 KSessionState mSessionState;
80 SnapshotWgtItem *mCurSnapshotItem;
81 QMenu *mContextMenu;
82 bool mContextMenuDirty;
83 bool mEditProtector;
84
85 QActionGroup *mSnapshotActionGroup;
86 QActionGroup *mCurStateActionGroup;
87
88 QAction *mDiscardSnapshotAction;
89 QAction *mTakeSnapshotAction;
90 QAction *mRevertToCurSnapAction;
91 QAction *mDiscardCurSnapAndStateAction;
92 QAction *mShowSnapshotDetailsAction;
93};
94
95#endif // __VBoxSnapshotsWgt_h__
96
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