diff options
Diffstat (limited to 'src/Authoring/Studio/Application')
4 files changed, 22 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Application/DataInputDlg.cpp b/src/Authoring/Studio/Application/DataInputDlg.cpp index 03febb71..d428d1a2 100644 --- a/src/Authoring/Studio/Application/DataInputDlg.cpp +++ b/src/Authoring/Studio/Application/DataInputDlg.cpp @@ -51,7 +51,9 @@ CDataInputDlg::CDataInputDlg(CDataInputDialogItem **datainput, QStandardItemMode m_ui->comboBoxTypeList->setItemDelegate(itemDelegate); m_ui->comboBoxTypeList->addItem(tr("Boolean")); +#ifdef DATAINPUT_EVALUATOR_ENABLED m_ui->comboBoxTypeList->addItem(tr("Evaluator")); +#endif m_ui->comboBoxTypeList->addItem(tr("Float")); m_ui->comboBoxTypeList->addItem(tr("Ranged Number")); m_ui->comboBoxTypeList->addItem(tr("String")); @@ -96,9 +98,11 @@ void CDataInputDlg::initDialog() m_min = m_dataInput->minValue; m_max = m_dataInput->maxValue; } +#ifdef DATAINPUT_EVALUATOR_ENABLED else if (m_type == DataTypeEvaluator) { m_ui->lineEditEvaluation->setText(m_dataInput->valueString); } +#endif } else { m_name = getUniqueId(tr("newDataInput")); m_ui->lineEditInputName->setText(m_name); @@ -115,9 +119,11 @@ void CDataInputDlg::on_buttonBox_accepted() m_dataInput->minValue = m_min; m_dataInput->maxValue = m_max; } +#ifdef DATAINPUT_EVALUATOR_ENABLED else if (m_type == DataTypeEvaluator) { m_dataInput->valueString = m_text; } +#endif QDialog::accept(); } @@ -183,15 +189,18 @@ void CDataInputDlg::updateVisibility(int type) m_ui->doubleSpinBoxMin->setVisible(false); m_ui->doubleSpinBoxMax->setVisible(false); } - +#ifdef DATAINPUT_EVALUATOR_ENABLED if (type == DataTypeEvaluator) { m_ui->lineEditEvaluation->setVisible(true); m_ui->labelEvaluation->setVisible(true); - } else { m_ui->lineEditEvaluation->setVisible(false); m_ui->labelEvaluation->setVisible(false); } +#else + m_ui->lineEditEvaluation->setVisible(false); + m_ui->labelEvaluation->setVisible(false); +#endif } const bool CDataInputDlg::isEquivalentDataType(int dlgType, @@ -214,7 +223,11 @@ const bool CDataInputDlg::isEquivalentDataType(int dlgType, // Variant can be bound to any property type. // Allow also Evaluator binding to any property as we only know the evaluation // result type at runtime. - || dlgType == EDataType::DataTypeVariant || dlgType == EDataType::DataTypeEvaluator) { + || dlgType == EDataType::DataTypeVariant +#ifdef DATAINPUT_EVALUATOR_ENABLED + || dlgType == EDataType::DataTypeEvaluator +#endif + ) { return true; } diff --git a/src/Authoring/Studio/Application/DataInputDlg.h b/src/Authoring/Studio/Application/DataInputDlg.h index 0af8e743..e38ee8b8 100644 --- a/src/Authoring/Studio/Application/DataInputDlg.h +++ b/src/Authoring/Studio/Application/DataInputDlg.h @@ -48,7 +48,9 @@ QT_FORWARD_DECLARE_CLASS(QStandardItemModel) enum EDataType { DataTypeBoolean = 0, +#ifdef DATAINPUT_EVALUATOR_ENABLED DataTypeEvaluator, +#endif DataTypeFloat, DataTypeRangedNumber, DataTypeString, diff --git a/src/Authoring/Studio/Application/DataInputListDlg.cpp b/src/Authoring/Studio/Application/DataInputListDlg.cpp index 8ef2a895..a80e8fce 100644 --- a/src/Authoring/Studio/Application/DataInputListDlg.cpp +++ b/src/Authoring/Studio/Application/DataInputListDlg.cpp @@ -164,9 +164,11 @@ void CDataInputListDlg::updateContents() dataInput.append(new QStandardItem(tr("String"))); } else if (dataInputType == DataTypeFloat) { dataInput.append(new QStandardItem(tr("Float"))); +#ifdef DATAINPUT_EVALUATOR_ENABLED } else if (dataInputType == DataTypeEvaluator) { dataInput.append(new QStandardItem(tr("Evaluator"))); dataInput.append(new QStandardItem(m_dataInputs.at(i)->valueString)); +#endif } else if (dataInputType == DataTypeBoolean) { dataInput.append(new QStandardItem(tr("Boolean"))); } else if (dataInputType == DataTypeVector3) { diff --git a/src/Authoring/Studio/Application/DataInputSelectView.cpp b/src/Authoring/Studio/Application/DataInputSelectView.cpp index 852bdbb2..468930af 100644 --- a/src/Authoring/Studio/Application/DataInputSelectView.cpp +++ b/src/Authoring/Studio/Application/DataInputSelectView.cpp @@ -85,9 +85,11 @@ QString DataInputSelectView::getDiTypeStr(int type) case EDataType::DataTypeBoolean: return tr("Boolean"); break; +#ifdef DATAINPUT_EVALUATOR_ENABLED case EDataType::DataTypeEvaluator: return tr("Evaluator"); break; +#endif case EDataType::DataTypeFloat: return tr("Float"); break; |