UISettingsDialogSpecific.h revision 4df306bda1892d084d7cad28a8c426fc76bc7e63
2N/A/** @file
2N/A *
2N/A * VBox frontends: Qt4 GUI ("VirtualBox"):
2N/A * UISettingsDialogSpecific class declaration
2N/A */
2N/A
2N/A/*
2N/A * Copyright (C) 2006-2011 Oracle Corporation
2N/A *
2N/A * This file is part of VirtualBox Open Source Edition (OSE), as
2N/A * available from http://www.virtualbox.org. This file is free software;
2N/A * you can redistribute it and/or modify it under the terms of the GNU
2N/A * General Public License (GPL) as published by the Free Software
2N/A * Foundation, in version 2 as it comes in the "COPYING" file of the
2N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2N/A */
2N/A
2N/A#ifndef __UISettingsDialogSpecific_h__
2N/A#define __UISettingsDialogSpecific_h__
2N/A
2N/A/* Local includes */
2N/A#include "COMDefs.h"
2N/A#include "UISettingsDialog.h"
2N/A
2N/A/* Dialog which encapsulate all the specific functionalities of the Global Settings */
2N/Aclass UISettingsDialogGlobal : public UISettingsDialog
2N/A{
2N/A Q_OBJECT;
2N/A
2N/Apublic:
2N/A
2N/A enum GLSettingsPage
2N/A {
2N/A GLSettingsPage_General = 0,
2N/A GLSettingsPage_Input,
2N/A GLSettingsPage_Update,
2N/A GLSettingsPage_Language,
2N/A GLSettingsPage_Display,
2N/A GLSettingsPage_USB,
2N/A GLSettingsPage_Network,
2N/A GLSettingsPage_Extension,
2N/A GLSettingsPage_Proxy,
2N/A GLSettingsPage_MAX
2N/A };
UISettingsDialogGlobal(QWidget *pParent);
protected:
void loadData();
void saveData();
void retranslateUi();
QString title() const;
private:
bool isPageAvailable(int iPageId);
};
/* Dialog which encapsulate all the specific functionalities of the Virtual Machine Settings */
class UISettingsDialogMachine : public UISettingsDialog
{
Q_OBJECT;
public:
enum VMSettingsPage
{
VMSettingsPage_General = 0,
VMSettingsPage_System,
VMSettingsPage_Display,
VMSettingsPage_Storage,
VMSettingsPage_Audio,
VMSettingsPage_Network,
VMSettingsPage_Ports,
VMSettingsPage_Serial,
VMSettingsPage_Parallel,
VMSettingsPage_USB,
VMSettingsPage_SF,
VMSettingsPage_MAX
};
UISettingsDialogMachine(QWidget *pParent, const QString &strMachineId,
const QString &strCategory, const QString &strControl);
protected:
void loadData();
void saveData();
void retranslateUi();
QString title() const;
void recorrelate(UISettingsPage *pSettingsPage);
private slots:
void sltMarkLoaded();
void sltMarkSaved();
void sltMachineStateChanged(QString strMachineId, KMachineState machineState);
void sltMachineDataChanged(QString strMachineId);
void sltCategoryChanged(int cId);
void sltAllowResetFirstRunFlag();
void sltSetFirstRunFlag();
void sltResetFirstRunFlag();
private:
bool isPageAvailable(int iPageId);
bool isSettingsChanged();
QString m_strMachineId;
KMachineState m_machineState;
CSession m_session;
CMachine m_machine;
CConsole m_console;
bool m_fAllowResetFirstRunFlag;
bool m_fResetFirstRunFlag;
};
#endif // __UISettingsDialogSpecific_h__