VirtualBox

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

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

FE/Qt4: Replaced languageChange by the appropriate QEvent & retranslateUi.

  • 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 <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
45
46 virtual void changeEvent (QEvent *aEvent);
47 void retranslateUi();
48
49private slots:
50
51 void onCurrentChanged (QTreeWidgetItem *aNewItem,
52 QTreeWidgetItem *aOldItem = 0);
53 void onContextMenuRequested (const QPoint &aPoint);
54 void onItemChanged (QTreeWidgetItem *aItem, int aColumn);
55
56 void discardSnapshot();
57 void takeSnapshot();
58 void discardCurState();
59 void discardCurSnapAndState();
60 void showSnapshotDetails();
61
62 void machineDataChanged (const VBoxMachineDataChangeEvent &aE);
63 void machineStateChanged (const VBoxMachineStateChangeEvent &aE);
64 void sessionStateChanged (const VBoxSessionStateChangeEvent &aE);
65 void snapshotChanged (const VBoxSnapshotEvent &aE);
66
67private:
68
69 void refreshAll (bool aKeepSelected = true);
70 SnapshotWgtItem* findItem (const QUuid &aSnapshotId);
71 SnapshotWgtItem* curStateItem();
72 void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem);
73
74 CMachine mMachine;
75 QUuid mMachineId;
76 KSessionState mSessionState;
77 SnapshotWgtItem *mCurSnapshotItem;
78 QMenu *mContextMenu;
79 bool mContextMenuDirty;
80 bool mEditProtector;
81
82 QActionGroup *mSnapshotActionGroup;
83 QActionGroup *mCurStateActionGroup;
84
85 QAction *mDiscardSnapshotAction;
86 QAction *mTakeSnapshotAction;
87 QAction *mRevertToCurSnapAction;
88 QAction *mDiscardCurSnapAndStateAction;
89 QAction *mShowSnapshotDetailsAction;
90};
91
92#endif // __VBoxSnapshotsWgt_h__
93
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