Exemplo n.º 1
0
GDeviceWidget* GCamera::ProvideNewDeviceGroupBox( QWidget* inWhichWidget, QBoxLayout::Direction orientation /*= QBoxLayout::LeftToRight*/ )
{
	GCameraSettingsWidget* pWidToReturn = new GCameraSettingsWidget(this, inWhichWidget);
	// a kind of device widget in the GCameraSettingsWidget so that it get populated by classes inheriting GCamera
	GDeviceWidget* pDevSpefWid = new GDeviceWidget(0, pWidToReturn->CameraSpecificGroupBox());
	pWidToReturn->CameraSpecificGroupBox()->layout()->addWidget(pDevSpefWid);
 	PopulateDeviceWidget(pDevSpefWid);
	return pWidToReturn;
}
Exemplo n.º 2
0
GDeviceWidget* GDevice::ProvideNewDeviceGroupBox( QWidget* inWhichWidget, QBoxLayout::Direction orientation /*= QBoxLayout::LeftToRight*/ )
{
	// we create the appropriate QGroupBox with connections to the device
	GDeviceWidget* pGroupBoxDeviceWidget = new GDeviceWidget(this, inWhichWidget);
	// we make a layout with the orientation
	QBoxLayout* DeviceLayout = new QBoxLayout(orientation);
	pGroupBoxDeviceWidget->setLayout(DeviceLayout);
	DeviceLayout->setSpacing(1);
	DeviceLayout->setContentsMargins(1, 1, 1, 1);

	// call the virtual function that populates the widget
	PopulateDeviceWidget(pGroupBoxDeviceWidget);

	return pGroupBoxDeviceWidget;
}