Ejemplo n.º 1
0
QWidget* FrameMetricWrapper::createWidget()
{
	QWidget* widget = new QWidget;
	QVBoxLayout* topLayout = new QVBoxLayout(widget);
	QHBoxLayout* hLayout = new QHBoxLayout;
	hLayout->setMargin(0);
	topLayout->setMargin(0);
	topLayout->addLayout(hLayout);

	mSpaceSelector = SpaceProperty::initialize("selectSpace",
											  "Space",
											  "Select coordinate system to store position in.");
	mSpaceSelector->setSpaceProvider(spaceProvider());
	hLayout->addWidget(new SpaceEditWidget(widget, mSpaceSelector));

	mFrameWidget = new Transform3DWidget(widget);
//	connect(mData.get(), SIGNAL(transformChanged()), this, SLOT(dataChangedSlot()));
//	connect(mData.get(), SIGNAL(propertiesChanged()), this, SLOT(dataChangedSlot()));
	connect(mFrameWidget, SIGNAL(changed()), this, SLOT(frameWidgetChangedSlot()));
	topLayout->addWidget(mFrameWidget);

	QPushButton* sampleButton = new QPushButton("Sample");
	sampleButton->setToolTip("Set the position equal to the current tool tip position.");
	hLayout->addWidget(sampleButton);

	connect(mSpaceSelector.get(), SIGNAL(valueWasSet()), this, SLOT(spaceSelected()));
	connect(sampleButton, SIGNAL(clicked()), this, SLOT(moveToToolPosition()));

	this->addColorWidget(topLayout);

//	this->dataChangedSlot();

	return widget;
}
Ejemplo n.º 2
0
bool ColorProperty::setValue(QColor val)
{
    if (val == mValue)
        return false;

    mValue = val;
	mStore.writeValue(color2string(val));
    emit valueWasSet();
    emit changed();
    return true;
}
Ejemplo n.º 3
0
bool Vector3DProperty::setValue(const Vector3D& val)
{
	if (similar(val, mValue))
		return false;

	//	std::cout << "set val " << "  " << val << "  , org=" << mValue << std::endl;

	mValue = val;
	mStore.writeValue(qstring_cast(val));
	emit
	valueWasSet();
	emit
	changed();
	return true;
}