1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
4 | * VBoxVMInformationDlg 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 __VBoxVMInformationDlg_h__
|
---|
24 | #define __VBoxVMInformationDlg_h__
|
---|
25 |
|
---|
26 | #include <VBoxVMInformationDlg.gen.h>
|
---|
27 | #include <QIAbstractDialog.h>
|
---|
28 | #include <COMDefs.h>
|
---|
29 |
|
---|
30 | class VBoxConsoleView;
|
---|
31 | class QTimer;
|
---|
32 |
|
---|
33 | class VBoxVMInformationDlg : public QIAbstractDialog, public Ui::VBoxVMInformationDlg
|
---|
34 | {
|
---|
35 | Q_OBJECT
|
---|
36 |
|
---|
37 | public:
|
---|
38 |
|
---|
39 | typedef QMap<QString, QString> DataMapType;
|
---|
40 | typedef QMap<QString, QStringList> LinksMapType;
|
---|
41 | struct CounterElementType {QString type; DataMapType list;};
|
---|
42 | typedef QMap <QString, VBoxVMInformationDlg*> InfoDlgMap;
|
---|
43 |
|
---|
44 | static void createInformationDlg (const CSession &aSession,
|
---|
45 | VBoxConsoleView *aConsole);
|
---|
46 |
|
---|
47 | VBoxVMInformationDlg (VBoxConsoleView *aConsole, const CSession &aSession,
|
---|
48 | Qt::WindowFlags aFlags);
|
---|
49 | ~VBoxVMInformationDlg();
|
---|
50 |
|
---|
51 | protected:
|
---|
52 |
|
---|
53 | virtual void languageChange();
|
---|
54 |
|
---|
55 | virtual bool event (QEvent *aEvent);
|
---|
56 | virtual void resizeEvent (QResizeEvent *aEvent);
|
---|
57 | virtual void showEvent (QShowEvent *aEvent);
|
---|
58 |
|
---|
59 | private slots:
|
---|
60 |
|
---|
61 | void updateDetails();
|
---|
62 | void processStatistics();
|
---|
63 | void onPageChanged (int aIndex);
|
---|
64 |
|
---|
65 | private:
|
---|
66 |
|
---|
67 | QString parseStatistics (const QString &aText);
|
---|
68 | void refreshStatistics();
|
---|
69 |
|
---|
70 | QString formatHardDisk (KStorageBus aBus, LONG aChannel, LONG aDevice, const QString &aBelongsTo);
|
---|
71 | QString formatAdapter (ULONG aSlot, const QString &aBelongsTo);
|
---|
72 |
|
---|
73 | QString composeArticle (const QString &aBelongsTo);
|
---|
74 |
|
---|
75 | static InfoDlgMap mSelfArray;
|
---|
76 |
|
---|
77 | bool mIsPolished;
|
---|
78 | VBoxConsoleView *mConsole;
|
---|
79 | CSession mSession;
|
---|
80 | QTimer *mStatTimer;
|
---|
81 |
|
---|
82 | int mWidth;
|
---|
83 | int mHeight;
|
---|
84 | bool mMax;
|
---|
85 |
|
---|
86 | DataMapType mNamesMap;
|
---|
87 | DataMapType mValuesMap;
|
---|
88 | DataMapType mUnitsMap;
|
---|
89 | LinksMapType mLinksMap;
|
---|
90 | };
|
---|
91 |
|
---|
92 | #endif // __VBoxVMInformationDlg_h__
|
---|
93 |
|
---|