VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/VBoxSnapshotsWgt.h@ 23912

Last change on this file since 23912 was 23879, checked in by vboxsync, 16 years ago

Main: rename snapshot APIs, remove DiscardCurrentSnapshotAndState; tree snapshots implementation still missing

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.7 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 showSnapshotDetails();
63
64 void machineDataChanged (const VBoxMachineDataChangeEvent &aE);
65 void machineStateChanged (const VBoxMachineStateChangeEvent &aE);
66 void sessionStateChanged (const VBoxSessionStateChangeEvent &aE);
67#if 0
68 void snapshotChanged (const VBoxSnapshotEvent &aE);
69#endif
70
71private:
72
73 void refreshAll (bool aKeepSelected = true);
74 SnapshotWgtItem* findItem (const QString &aSnapshotId);
75 SnapshotWgtItem* curStateItem();
76 void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem);
77
78 CMachine mMachine;
79 QString mMachineId;
80 KSessionState mSessionState;
81 SnapshotWgtItem *mCurSnapshotItem;
82 QMenu *mContextMenu;
83 bool mContextMenuDirty;
84 bool mEditProtector;
85
86 QActionGroup *mSnapshotActionGroup;
87 QActionGroup *mCurStateActionGroup;
88
89 QAction *mDiscardSnapshotAction;
90 QAction *mTakeSnapshotAction;
91 QAction *mRevertToCurSnapAction;
92 QAction *mShowSnapshotDetailsAction;
93};
94
95#endif // __VBoxSnapshotsWgt_h__
96
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette