Пример #1
0
/** Creates a new VolumeGroupDialog
    @param parent pointer to the parent widget
    @param vgName Volume Group name
    @param pvList List of LVM Physical Volumes used to create Volume Group
*/
VolumeGroupDialog::VolumeGroupDialog(QWidget* parent, QString& vgName, QStringList& pvList) :
    QDialog(parent),
    m_DialogWidget(new VolumeGroupWidget(this)),
    m_TargetName(vgName),
    m_TargetPVList(pvList),
    m_IsValidSize(false),
    m_IsValidName(true),
    m_TotalSize(0),
    m_TotalUsedSize(0),
    m_ExtentSize(0)
{
    mainLayout = new QVBoxLayout(this);
    setLayout(mainLayout);
    mainLayout->addWidget(&dialogWidget());

    dialogButtonBox = new QDialogButtonBox;
    okButton = dialogButtonBox->addButton(QDialogButtonBox::Ok);
    cancelButton = dialogButtonBox->addButton(QDialogButtonBox::Cancel);
    mainLayout->addWidget(dialogButtonBox);

    cancelButton->setFocus();
    cancelButton->setDefault(true);

    setupDialog();
    setupConstraints();
    setupConnections();
}
Пример #2
0
void Simulation::Reset()
{    
    m_inertia_y.resize(m_mesh->m_system_dimension);
    m_external_force.resize(m_mesh->m_system_dimension);

    setupConstraints();
    m_selected_attachment_constraint = NULL;
	m_h = 0.03;
	m_gravity_constant = 10;
	m_stiffness_stretch = 50;
	m_damping_coefficient = 0.2;
	m_resistance_coefficient = 0.1;
	g_gravity = true;
}
/** Creates a new InsertDialog instance.
	@param parent the parent widget
	@param device the Device the Partition to insert is on
	@param insertedPartition the Partition to insert
	@param destpartition the Partition the new one is to be inserted to
*/
InsertDialog::InsertDialog(QWidget* parent, Device& device, Partition& insertedPartition, const Partition& destpartition) :
	SizeDialogBase(parent, device, insertedPartition, destpartition.firstSector(), destpartition.lastSector()),
	m_DestPartition(destpartition)
{
	setWindowTitle(i18nc("@title:window", "Insert a partition"));

	partition().move(destPartition().firstSector());
	partition().fileSystem().move(destPartition().fileSystem().firstSector());

	dialogWidget().hideRole();
	dialogWidget().hideFileSystem();
	dialogWidget().hideLabel();

	setupDialog();
	setupConstraints();
	setupConnections();

	KConfigGroup kcg(KSharedConfig::openConfig(), "insertDialog");
	restoreGeometry(kcg.readEntry<QByteArray>("Geometry", QByteArray()));
}
Пример #4
0
void RigidScene::firstInit()
{
	if (!constraints_setup && rigid_sceneobjs_bound.size()) setupConstraints();
}