VBoxVMInformationDlg.h revision f075f002ffa30e5c88a649c22e08e496f233e68a
c1c9242f0046150566414e1f222cb667e03e605evboxsync/** @file
c1c9242f0046150566414e1f222cb667e03e605evboxsync *
c1c9242f0046150566414e1f222cb667e03e605evboxsync * VBox frontends: Qt4 GUI ("VirtualBox"):
c1c9242f0046150566414e1f222cb667e03e605evboxsync * VBoxVMInformationDlg class declaration
c1c9242f0046150566414e1f222cb667e03e605evboxsync */
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync/*
c1c9242f0046150566414e1f222cb667e03e605evboxsync * Copyright (C) 2006-2008 Sun Microsystems, Inc.
c1c9242f0046150566414e1f222cb667e03e605evboxsync *
c1c9242f0046150566414e1f222cb667e03e605evboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c1c9242f0046150566414e1f222cb667e03e605evboxsync * available from http://www.virtualbox.org. This file is free software;
c1c9242f0046150566414e1f222cb667e03e605evboxsync * you can redistribute it and/or modify it under the terms of the GNU
c1c9242f0046150566414e1f222cb667e03e605evboxsync * General Public License (GPL) as published by the Free Software
c1c9242f0046150566414e1f222cb667e03e605evboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c1c9242f0046150566414e1f222cb667e03e605evboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c1c9242f0046150566414e1f222cb667e03e605evboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c1c9242f0046150566414e1f222cb667e03e605evboxsync *
c1c9242f0046150566414e1f222cb667e03e605evboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
c1c9242f0046150566414e1f222cb667e03e605evboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
c1c9242f0046150566414e1f222cb667e03e605evboxsync * additional information or have any questions.
c1c9242f0046150566414e1f222cb667e03e605evboxsync */
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync#ifndef __VBoxVMInformationDlg_h__
c1c9242f0046150566414e1f222cb667e03e605evboxsync#define __VBoxVMInformationDlg_h__
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync#include "VBoxVMInformationDlg.gen.h"
c1c9242f0046150566414e1f222cb667e03e605evboxsync#include "QIMainDialog.h"
c1c9242f0046150566414e1f222cb667e03e605evboxsync#include "COMDefs.h"
c1c9242f0046150566414e1f222cb667e03e605evboxsync#include "QIWithRetranslateUI.h"
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsyncclass VBoxConsoleView;
c1c9242f0046150566414e1f222cb667e03e605evboxsyncclass QTimer;
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsyncclass VBoxVMInformationDlg : public QIWithRetranslateUI2<QIMainDialog>,
c1c9242f0046150566414e1f222cb667e03e605evboxsync public Ui::VBoxVMInformationDlg
c1c9242f0046150566414e1f222cb667e03e605evboxsync{
c1c9242f0046150566414e1f222cb667e03e605evboxsync Q_OBJECT;
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsyncpublic:
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync typedef QMap<QString, QString> DataMapType;
c1c9242f0046150566414e1f222cb667e03e605evboxsync typedef QMap<QString, QStringList> LinksMapType;
c1c9242f0046150566414e1f222cb667e03e605evboxsync struct CounterElementType {QString type; DataMapType list;};
c1c9242f0046150566414e1f222cb667e03e605evboxsync typedef QMap <QString, VBoxVMInformationDlg*> InfoDlgMap;
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync static void createInformationDlg (const CSession &aSession,
c1c9242f0046150566414e1f222cb667e03e605evboxsync VBoxConsoleView *aConsole);
c1c9242f0046150566414e1f222cb667e03e605evboxsync
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync VBoxVMInformationDlg (VBoxConsoleView *aConsole, const CSession &aSession,
c1c9242f0046150566414e1f222cb667e03e605evboxsync Qt::WindowFlags aFlags);
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync ~VBoxVMInformationDlg();
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsyncprotected:
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync void retranslateUi();
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync virtual bool event (QEvent *aEvent);
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync virtual void resizeEvent (QResizeEvent *aEvent);
c1c9242f0046150566414e1f222cb667e03e605evboxsync virtual void showEvent (QShowEvent *aEvent);
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsyncprivate slots:
c1c9242f0046150566414e1f222cb667e03e605evboxsync
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync void updateDetails();
c1c9242f0046150566414e1f222cb667e03e605evboxsync void processStatistics();
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync void onPageChanged (int aIndex);
c1c9242f0046150566414e1f222cb667e03e605evboxsync void suicide();
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsyncprivate:
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync QString parseStatistics (const QString &aText);
c1c9242f0046150566414e1f222cb667e03e605evboxsync void refreshStatistics();
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync QString formatValue (const QString &aValueName, const QString &aValue, int aMaxSize);
c1c9242f0046150566414e1f222cb667e03e605evboxsync QString formatHardDisk (KStorageBus aBus, LONG aChannel, LONG aDevice, const QString &aBelongsTo);
c1c9242f0046150566414e1f222cb667e03e605evboxsync QString formatAdapter (ULONG aSlot, const QString &aBelongsTo);
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync QString composeArticle (const QString &aBelongsTo);
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync static InfoDlgMap mSelfArray;
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync bool mIsPolished;
c1c9242f0046150566414e1f222cb667e03e605evboxsync VBoxConsoleView *mConsole;
c1c9242f0046150566414e1f222cb667e03e605evboxsync CSession mSession;
c1c9242f0046150566414e1f222cb667e03e605evboxsync QTimer *mStatTimer;
c1c9242f0046150566414e1f222cb667e03e605evboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync int mWidth;
c1c9242f0046150566414e1f222cb667e03e605evboxsync int mHeight;
c1c9242f0046150566414e1f222cb667e03e605evboxsync bool mMax;
c1c9242f0046150566414e1f222cb667e03e605evboxsync
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync DataMapType mNamesMap;
c1c9242f0046150566414e1f222cb667e03e605evboxsync DataMapType mValuesMap;
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync DataMapType mUnitsMap;
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync LinksMapType mLinksMap;
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync};
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync
c1c9242f0046150566414e1f222cb667e03e605evboxsync#endif // __VBoxVMInformationDlg_h__
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync
54d2d2606d7c83a456819cd038a73e0f9a600ca4vboxsync