VirtualBox

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

Last change on this file since 8907 was 8742, checked in by vboxsync, 17 years ago

FE/Qt4: Fixed last Qt3 support warnings & added copyright notice.

  • 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.215389.xyz. 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 <QUuid>
29#include <COMDefs.h>
30
31class SnapshotWgtItem;
32
33class QMenu;
34
35class VBoxSnapshotsWgt : public QWidget, public Ui::VBoxSnapshotsWgt
36{
37 Q_OBJECT;
38
39public:
40
41 VBoxSnapshotsWgt (QWidget *aParent);
42
43 void setMachine (const CMachine &aMachine);
44
45private slots:
46
47 void onCurrentChanged (QTreeWidgetItem *aNewItem,
48 QTreeWidgetItem *aOldItem = 0);
49 void onContextMenuRequested (const QPoint &aPoint);
50 void onItemChanged (QTreeWidgetItem *aItem, int aColumn);
51
52 void discardSnapshot();
53 void takeSnapshot();
54 void discardCurState();
55 void discardCurSnapAndState();
56 void showSnapshotDetails();
57
58 void machineDataChanged (const VBoxMachineDataChangeEvent &aE);
59 void machineStateChanged (const VBoxMachineStateChangeEvent &aE);
60 void sessionStateChanged (const VBoxSessionStateChangeEvent &aE);
61 void snapshotChanged (const VBoxSnapshotEvent &aE);
62
63private:
64
65 bool event (QEvent *aEvent);
66 void languageChange();
67
68 void refreshAll (bool aKeepSelected = true);
69 SnapshotWgtItem* findItem (const QUuid &aSnapshotId);
70 SnapshotWgtItem* curStateItem();
71 void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem);
72
73 CMachine mMachine;
74 QUuid mMachineId;
75 KSessionState mSessionState;
76 SnapshotWgtItem *mCurSnapshotItem;
77 QMenu *mContextMenu;
78 bool mContextMenuDirty;
79 bool mEditProtector;
80
81 QActionGroup *mSnapshotActionGroup;
82 QActionGroup *mCurStateActionGroup;
83
84 QAction *mDiscardSnapshotAction;
85 QAction *mTakeSnapshotAction;
86 QAction *mRevertToCurSnapAction;
87 QAction *mDiscardCurSnapAndStateAction;
88 QAction *mShowSnapshotDetailsAction;
89};
90
91#endif // __VBoxSnapshotsWgt_h__
92
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