VBoxSettingsUtils.h revision 8e0c2ca3abd721979958f95b9af73b60665478c8
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* VBoxSettingsUtils class declaration
*/
/*
* Copyright (C) 2006-2008 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#ifndef __VBoxSettingsUtils_h__
#define __VBoxSettingsUtils_h__
#include <VBoxGlobal.h>
/* Qt includes */
#ifdef Q_WS_WIN
#include <QDialog>
#include <QLineEdit>
#include <QPushButton>
#endif
#include <QHBoxLayout>
#include <QLabel>
#include <QTreeWidget>
#include <QHeaderView>
#include <QKeyEvent>
#include <QTableView>
enum
{
/* mTwUSBFilters column numbers */
twUSBFilters_Name = 0,
};
/**
* QTreeWidget class reimplementation to use as boot items table.
* It has one unsorted column without header.
* Keymapping handlers for ctrl-up & ctrl-down are translated into
* Emits itemToggled() signal when the item changed.
*/
{
{
}
~BootItemsTable() {}
void moveItemUp();
void moveItemDown();
void itemToggled();
void onItemChanged()
{
emit itemToggled();
}
{
{
{
emit moveItemUp();
return;
emit moveItemDown();
return;
default:
break;
}
}
}
};
#ifdef Q_WS_WIN
/**
* QDialog class reimplementation to use for adding network interface.
* It has one line-edit field for entering network interface's name and
*/
{
mLeName (0)
{
/* Setup Input layout */
"network interface"));
/* Setup Button layout */
/* Resize to fit the aIfaceName in one string */
inputLayout->spacing() +
/* Validate interface name field */
validate();
}
~VBoxAddNIDialog() {}
void validate()
{
}
{
setFixedHeight (height());
}
};
#endif
{
enum { USBListItemType = 1002 };
, mId (-1) {}
, mId (-1) {}
int mId;
};
/**
* Table-View class reimplementation to extend standard QTableView.
*/
{
const QModelIndex &aPrevious)
{
}
{
/* Restore edit-mode on focus in. */
edit (currentIndex());
}
};
{
{
setVisible (false);
}
};
#endif // __VBoxSettingsUtils_h__