2012-01-27 23:01:21 +00:00
|
|
|
#include "inputcamera.h"
|
|
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QPainter>
|
|
|
|
#include <QColorDialog>
|
|
|
|
|
|
|
|
#include "dialogwanderer.h"
|
|
|
|
|
|
|
|
InputCamera::InputCamera(QWidget* form, QString label, CameraDefinition* value):BaseInput(form, label)
|
|
|
|
{
|
|
|
|
_value = value;
|
|
|
|
|
|
|
|
_preview = new QWidget(form);
|
|
|
|
|
2012-02-28 13:45:11 +00:00
|
|
|
_control = new QPushButton(tr("Edit"), form);
|
2012-01-27 23:01:21 +00:00
|
|
|
_control->setMaximumWidth(150);
|
|
|
|
|
|
|
|
connect((QPushButton*)_control, SIGNAL(clicked()), this, SLOT(editCamera()));
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputCamera::updatePreview()
|
|
|
|
{
|
|
|
|
//_preview->update();
|
|
|
|
|
|
|
|
BaseInput::updatePreview();
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputCamera::applyValue()
|
|
|
|
{
|
|
|
|
BaseInput::applyValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputCamera::revert()
|
|
|
|
{
|
|
|
|
BaseInput::revert();
|
|
|
|
}
|
|
|
|
|
|
|
|
void InputCamera::editCamera()
|
|
|
|
{
|
2012-04-12 20:20:57 +00:00
|
|
|
int result;
|
|
|
|
|
2012-01-27 23:01:21 +00:00
|
|
|
DialogWanderer* dialog = new DialogWanderer(_control, _value, true);
|
2012-04-12 20:20:57 +00:00
|
|
|
result = dialog->exec();
|
2012-01-27 23:01:21 +00:00
|
|
|
|
|
|
|
delete dialog;
|
|
|
|
|
2012-04-12 20:20:57 +00:00
|
|
|
if (result == QDialog::Accepted)
|
|
|
|
{
|
|
|
|
applyValue();
|
|
|
|
}
|
2012-01-27 23:01:21 +00:00
|
|
|
}
|