本文整理汇总了C++中TSceneProperties::getFieldGuideSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TSceneProperties::getFieldGuideSize方法的具体用法?C++ TSceneProperties::getFieldGuideSize怎么用?C++ TSceneProperties::getFieldGuideSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSceneProperties
的用法示例。
在下文中一共展示了TSceneProperties::getFieldGuideSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update
void SceneSettingsPopup::update()
{
TSceneProperties *sprop = getProperties();
QString str;
m_frameRateFld->setValue(sprop->getOutputProperties()->getFrameRate());
TPixel32 col1, col2;
Preferences::instance()->getChessboardColors(col1, col2);
m_bgColorFld->setChessboardColors(col1, col2);
TPixel bgColor = sprop->getBgColor();
m_bgColorFld->setColor(bgColor);
m_fieldGuideFld->setValue(sprop->getFieldGuideSize());
m_aspectRatioFld->setValue(sprop->getFieldGuideAspectRatio());
UnitParameters::setFieldGuideAspectRatio(sprop->getFieldGuideAspectRatio());
m_fullcolorSubsamplingFld->setValue(sprop->getFullcolorSubsampling());
if (m_tlvSubsamplingFld)
m_tlvSubsamplingFld->setValue(sprop->getTlvSubsampling());
int markerDistance = 0, markerOffset = 0;
sprop->getMarkers(markerDistance, markerOffset);
m_markerIntervalFld->setValue(markerDistance);
m_startFrameFld->setValue(markerOffset + 1);
}
示例2: onFieldGuideSizeEditingFinished
void SceneSettingsPopup::onFieldGuideSizeEditingFinished()
{
TSceneProperties *sprop = getProperties();
int fieldGuideSize = sprop->getFieldGuideSize();
int fieldGuideSizefld = m_fieldGuideFld->text().toInt();
if (fieldGuideSize == fieldGuideSizefld)
return;
sprop->setFieldGuideSize(fieldGuideSizefld);
TApp::instance()->getCurrentScene()->notifySceneChanged();
TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
}
示例3: QDialog
SceneSettingsPopup::SceneSettingsPopup()
: QDialog(TApp::instance()->getMainWindow())
{
setWindowTitle(tr("Scene Settings"));
setObjectName("SceneSettings");
TSceneProperties *sprop = getProperties();
//Frame Rate
double frameRate = sprop->getOutputProperties()->getFrameRate();
m_frameRateFld = new DoubleLineEdit(this, frameRate);
m_frameRateFld->setRange(1, 100);
m_frameRateFld->setDecimals(2);
//Camera BG color
m_bgColorFld = new ColorField(this, true, sprop->getBgColor());
//Field Guide Size - A/R
int fieldGuideSize = sprop->getFieldGuideSize();
m_fieldGuideFld = new IntLineEdit(this, fieldGuideSize, 0, 50);
m_aspectRatioFld = new DoubleLineEdit(this, 1.38);
m_aspectRatioFld->setRange(-10000.0, 10000.0);
m_aspectRatioFld->setDecimals(5);
//Image Subsampling - Tlv Subsampling
int fullcolorSubsampling = sprop->getFullcolorSubsampling();
m_fullcolorSubsamplingFld = new IntLineEdit(this, fullcolorSubsampling, 1);
int tlvSubsampling = sprop->getTlvSubsampling();
m_tlvSubsamplingFld = new IntLineEdit(this, tlvSubsampling, 1);
//Marker Interval - Start Frame
int distance, offset;
sprop->getMarkers(distance, offset);
m_markerIntervalFld = new IntLineEdit(this, distance, 0);
m_startFrameFld = new IntLineEdit(this, offset);
// layout
QGridLayout *mainLayout = new QGridLayout();
mainLayout->setMargin(10);
mainLayout->setHorizontalSpacing(5);
mainLayout->setVerticalSpacing(15);
{
//Frame Rate
mainLayout->addWidget(new QLabel(tr("Frame Rate:"), this), 0, 0, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_frameRateFld, 0, 1);
//Camera BG color
mainLayout->addWidget(new QLabel(tr("Camera BG Color:"), this), 1, 0, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_bgColorFld, 1, 1, 1, 4);
//Field Guide Size - A/R
mainLayout->addWidget(new QLabel(tr("Field Guide Size:"), this), 2, 0, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_fieldGuideFld, 2, 1);
mainLayout->addWidget(new QLabel(tr("A/R:"), this), 2, 2, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_aspectRatioFld, 2, 3);
//Image Subsampling - Tlv Subsampling
mainLayout->addWidget(new QLabel(tr("Image Subsampling:"), this), 3, 0, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_fullcolorSubsamplingFld, 3, 1);
if (m_tlvSubsamplingFld) {
mainLayout->addWidget(new QLabel(tr("TLV Subsampling:"), this), 4, 0, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_tlvSubsamplingFld, 4, 1);
}
//Marker Interval - Start Frame
mainLayout->addWidget(new QLabel(tr("Marker Interval:"), this), 5, 0, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_markerIntervalFld, 5, 1);
mainLayout->addWidget(new QLabel(tr(" Start Frame:"), this), 5, 2, Qt::AlignRight | Qt::AlignVCenter);
mainLayout->addWidget(m_startFrameFld, 5, 3);
}
mainLayout->setColumnStretch(0, 0);
mainLayout->setColumnStretch(1, 0);
mainLayout->setColumnStretch(2, 0);
mainLayout->setColumnStretch(3, 0);
mainLayout->setColumnStretch(4, 1);
mainLayout->setRowStretch(6, 1);
setLayout(mainLayout);
//signal-slot connections
bool ret = true;
//Frame Rate
ret = ret && connect(m_frameRateFld, SIGNAL(editingFinished()), this, SLOT(onFrameRateEditingFinished()));
//Camera BG color
ret = ret && connect(m_bgColorFld, SIGNAL(colorChanged(const TPixel32 &, bool)), this, SLOT(setBgColor(const TPixel32 &, bool)));
//Field Guide Size - A/R
ret = ret && connect(m_fieldGuideFld, SIGNAL(editingFinished()), this, SLOT(onFieldGuideSizeEditingFinished()));
ret = ret && connect(m_aspectRatioFld, SIGNAL(editingFinished()), this, SLOT(onFieldGuideAspectRatioEditingFinished()));
//Image Subsampling - Tlv Subsampling
ret = ret && connect(m_fullcolorSubsamplingFld, SIGNAL(editingFinished()), this, SLOT(onFullColorSubsampEditingFinished()));
if (m_tlvSubsamplingFld)
ret = ret && connect(m_tlvSubsamplingFld, SIGNAL(editingFinished()), this, SLOT(onTlvSubsampEditingFinished()));
//Marker Interval - Start Frame
ret = ret && connect(m_markerIntervalFld, SIGNAL(editingFinished()), this, SLOT(onMakerIntervalEditingFinished()));
ret = ret && connect(m_startFrameFld, SIGNAL(editingFinished()), this, SLOT(onStartFrameEditingFinished()));
assert(ret);
}