VirtualBox

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

Last change on this file since 10971 was 10852, checked in by vboxsync, 16 years ago

Fe/Qt4: Fixing the assert during taking/discarding snapshot in selector/snapshot sub-window.

  • 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#if 0
69 void snapshotChanged (const VBoxSnapshotEvent &aE);
70#endif
71
72private:
73
74 void refreshAll (bool aKeepSelected = true);
75 SnapshotWgtItem* findItem (const QUuid &aSnapshotId);
76 SnapshotWgtItem* curStateItem();
77 void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem);
78
79 CMachine mMachine;
80 QUuid mMachineId;
81 KSessionState mSessionState;
82 SnapshotWgtItem *mCurSnapshotItem;
83 QMenu *mContextMenu;
84 bool mContextMenuDirty;
85 bool mEditProtector;
86
87 QActionGroup *mSnapshotActionGroup;
88 QActionGroup *mCurStateActionGroup;
89
90 QAction *mDiscardSnapshotAction;
91 QAction *mTakeSnapshotAction;
92 QAction *mRevertToCurSnapAction;
93 QAction *mDiscardCurSnapAndStateAction;
94 QAction *mShowSnapshotDetailsAction;
95};
96
97#endif // __VBoxSnapshotsWgt_h__
98
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