Merge with feature.
--HG-- branch : develop
This commit is contained in:
commit
fc6e65e601
|
@ -1803,6 +1803,10 @@ QString VApplication::PostfixOperator(const QString &name) const
|
||||||
*/
|
*/
|
||||||
QString VApplication::FormulaFromUser(const QString &formula)
|
QString VApplication::FormulaFromUser(const QString &formula)
|
||||||
{
|
{
|
||||||
|
if (formula.isEmpty())
|
||||||
|
{
|
||||||
|
return formula;
|
||||||
|
}
|
||||||
QString newFormula = formula;// Local copy for making changes
|
QString newFormula = formula;// Local copy for making changes
|
||||||
|
|
||||||
Calculator *cal = new Calculator(formula);// Eval formula
|
Calculator *cal = new Calculator(formula);// Eval formula
|
||||||
|
@ -1901,6 +1905,11 @@ QString VApplication::FormulaFromUser(const QString &formula)
|
||||||
*/
|
*/
|
||||||
QString VApplication::FormulaToUser(const QString &formula)
|
QString VApplication::FormulaToUser(const QString &formula)
|
||||||
{
|
{
|
||||||
|
if (formula.isEmpty())
|
||||||
|
{
|
||||||
|
return formula;
|
||||||
|
}
|
||||||
|
|
||||||
QString newFormula = formula;// Local copy for making changes
|
QString newFormula = formula;// Local copy for making changes
|
||||||
|
|
||||||
QMap<int, QString> tokens;
|
QMap<int, QString> tokens;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "../../visualization/vistoolalongline.h"
|
#include "../../visualization/vistoolalongline.h"
|
||||||
#include "../../tools/vabstracttool.h"
|
#include "../../tools/vabstracttool.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
|
@ -45,7 +46,6 @@ DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId,
|
||||||
formula(QString()), formulaBaseHeight(0), line(nullptr)
|
formula(QString()), formulaBaseHeight(0), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -62,11 +62,10 @@ DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId,
|
||||||
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
||||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogAlongLine::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogAlongLine::FXLength);
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogAlongLine::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogAlongLine::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogAlongLine::FormulaTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogAlongLine::FormulaTextChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogAlongLine::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogAlongLine::DeployFormulaTextEdit);
|
||||||
connect(listWidget, &QListWidget::itemDoubleClicked, this, &DialogTool::PutVal);
|
|
||||||
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
connect(ui->comboBoxFirstPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||||
this, &DialogAlongLine::PointChanged);
|
this, &DialogAlongLine::PointChanged);
|
||||||
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
connect(ui->comboBoxSecondPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||||
|
@ -100,6 +99,19 @@ void DialogAlongLine::PointChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogAlongLine::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogAlongLine::ShowVisualization()
|
void DialogAlongLine::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,6 +75,8 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void FormulaTextChanged();
|
void FormulaTextChanged();
|
||||||
void PointChanged();
|
void PointChanged();
|
||||||
|
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>428</width>
|
<width>412</width>
|
||||||
<height>532</height>
|
<height>284</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -87,16 +87,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert variable into the formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -165,6 +162,9 @@
|
||||||
<property name="tabChangesFocus">
|
<property name="tabChangesFocus">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="plainText">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -206,251 +206,98 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<property name="fieldGrowthPolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
<item>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<item row="0" column="0">
|
||||||
<item>
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<property name="text">
|
||||||
<property name="fieldGrowthPolicy">
|
<string>Point label</string>
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelFirstPoint">
|
|
||||||
<property name="text">
|
|
||||||
<string>First point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxFirstPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>First point of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelSecondPoint">
|
|
||||||
<property name="text">
|
|
||||||
<string>Second point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSecondPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Second point of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>Type of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineType">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Show line from first point to this point</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Line color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineColor"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QLabel" name="labelFirstPoint">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>First point</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="1">
|
||||||
<bool>true</bool>
|
<widget class="QComboBox" name="comboBoxFirstPoint">
|
||||||
</property>
|
<property name="toolTip">
|
||||||
</widget>
|
<string>First point of line</string>
|
||||||
</item>
|
</property>
|
||||||
<item>
|
</widget>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</item>
|
||||||
<property name="toolTip">
|
<item row="2" column="0">
|
||||||
<string>Variables - Click twice to insert into formula</string>
|
<widget class="QLabel" name="labelSecondPoint">
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Second point</string>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxSecondPoint">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Second point of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show line from first point to this point</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Line color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineColor"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -465,21 +312,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxFirstPoint</tabstop>
|
<tabstop>comboBoxFirstPoint</tabstop>
|
||||||
<tabstop>comboBoxSecondPoint</tabstop>
|
<tabstop>comboBoxSecondPoint</tabstop>
|
||||||
<tabstop>comboBoxLineType</tabstop>
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "../../container/vcontainer.h"
|
#include "../../container/vcontainer.h"
|
||||||
#include "../../libs/ifc/xml/vdomdocument.h"
|
#include "../../libs/ifc/xml/vdomdocument.h"
|
||||||
#include "../../visualization/vistoolarc.h"
|
#include "../../visualization/vistoolarc.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -51,8 +52,6 @@ DialogArc::DialogArc(const VContainer *data, const quint32 &toolId, QWidget *par
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
InitVariables(ui);
|
|
||||||
|
|
||||||
plainTextEditFormula = ui->plainTextEditFormula;
|
plainTextEditFormula = ui->plainTextEditFormula;
|
||||||
this->formulaBaseHeight = ui->plainTextEditFormula->height();
|
this->formulaBaseHeight = ui->plainTextEditFormula->height();
|
||||||
this->formulaBaseHeightF1 = ui->plainTextEditF1->height();
|
this->formulaBaseHeightF1 = ui->plainTextEditF1->height();
|
||||||
|
@ -78,9 +77,9 @@ DialogArc::DialogArc(const VContainer *data, const quint32 &toolId, QWidget *par
|
||||||
|
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
connect(ui->toolButtonPutHereRadius, &QPushButton::clicked, this, &DialogArc::PutRadius);
|
connect(ui->toolButtonExprRadius, &QPushButton::clicked, this, &DialogArc::FXRadius);
|
||||||
connect(ui->toolButtonPutHereF1, &QPushButton::clicked, this, &DialogArc::PutF1);
|
connect(ui->toolButtonExprF1, &QPushButton::clicked, this, &DialogArc::FXF1);
|
||||||
connect(ui->toolButtonPutHereF2, &QPushButton::clicked, this, &DialogArc::PutF2);
|
connect(ui->toolButtonExprF2, &QPushButton::clicked, this, &DialogArc::FXF2);
|
||||||
|
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogArc::RadiusChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogArc::RadiusChanged);
|
||||||
connect(ui->plainTextEditF1, &QPlainTextEdit::textChanged, this, &DialogArc::F1Changed);
|
connect(ui->plainTextEditF1, &QPlainTextEdit::textChanged, this, &DialogArc::F1Changed);
|
||||||
|
@ -259,43 +258,6 @@ void DialogArc::closeEvent(QCloseEvent *event)
|
||||||
DialogTool::closeEvent(event);
|
DialogTool::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief PutRadius put variable into formula of radius
|
|
||||||
*/
|
|
||||||
void DialogArc::PutRadius()
|
|
||||||
{
|
|
||||||
PutValHere(ui->plainTextEditFormula, ui->listWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief PutF1 put variable into formula of first angle
|
|
||||||
*/
|
|
||||||
void DialogArc::PutF1()
|
|
||||||
{
|
|
||||||
PutValHere(ui->plainTextEditF1, ui->listWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief PutF2 put variable into formula of second angle
|
|
||||||
*/
|
|
||||||
void DialogArc::PutF2()
|
|
||||||
{
|
|
||||||
PutValHere(ui->plainTextEditF2, ui->listWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief LineAngles show variable angles of lines
|
|
||||||
*/
|
|
||||||
// cppcheck-suppress unusedFunction
|
|
||||||
void DialogArc::LineAngles()
|
|
||||||
{
|
|
||||||
ShowLineAngles();
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief RadiusChanged after change formula of radius calculate value and show result
|
* @brief RadiusChanged after change formula of radius calculate value and show result
|
||||||
|
@ -329,6 +291,45 @@ void DialogArc::F2Changed()
|
||||||
ValFormulaChanged(flagF2, ui->plainTextEditF2, timerF2);
|
ValFormulaChanged(flagF2, ui->plainTextEditF2, timerF2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogArc::FXRadius()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit radius"));
|
||||||
|
dialog->SetFormula(GetRadius());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetRadius(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogArc::FXF1()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit first angle"));
|
||||||
|
dialog->SetFormula(GetF1());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetF1(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogArc::FXF2()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit second angle"));
|
||||||
|
dialog->SetFormula(GetF2());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetF2(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief CheckState if all is right enable button ok
|
* @brief CheckState if all is right enable button ok
|
||||||
|
@ -377,27 +378,6 @@ void DialogArc::EvalF()
|
||||||
CheckAngles();
|
CheckAngles();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief ShowLineAngles show varibles angles of lines
|
|
||||||
*/
|
|
||||||
void DialogArc::ShowLineAngles()
|
|
||||||
{
|
|
||||||
ui->listWidget->blockSignals(true);
|
|
||||||
ui->listWidget->clear();
|
|
||||||
ui->listWidget->blockSignals(false);
|
|
||||||
const QMap<QString, QSharedPointer<VLineAngle> > lineAnglesTable = data->DataAngleLines();
|
|
||||||
QMap<QString, QSharedPointer<VLineAngle> >::const_iterator i;
|
|
||||||
for (i = lineAnglesTable.constBegin(); i != lineAnglesTable.constEnd(); ++i)
|
|
||||||
{
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(i.key());
|
|
||||||
|
|
||||||
item->setFont(QFont("Times", 12, QFont::Bold));
|
|
||||||
ui->listWidget->addItem(item);
|
|
||||||
}
|
|
||||||
ui->listWidget->setCurrentRow (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogArc::CheckAngles()
|
void DialogArc::CheckAngles()
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,14 +70,13 @@ public slots:
|
||||||
void DeployFormulaTextEdit();
|
void DeployFormulaTextEdit();
|
||||||
void DeployF1TextEdit();
|
void DeployF1TextEdit();
|
||||||
void DeployF2TextEdit();
|
void DeployF2TextEdit();
|
||||||
void PutRadius();
|
|
||||||
void PutF1();
|
|
||||||
void PutF2();
|
|
||||||
// cppcheck-suppress unusedFunction
|
|
||||||
void LineAngles();
|
|
||||||
void RadiusChanged();
|
void RadiusChanged();
|
||||||
void F1Changed();
|
void F1Changed();
|
||||||
void F2Changed();
|
void F2Changed();
|
||||||
|
|
||||||
|
void FXRadius();
|
||||||
|
void FXF1();
|
||||||
|
void FXF2();
|
||||||
protected:
|
protected:
|
||||||
virtual void CheckState();
|
virtual void CheckState();
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
|
@ -131,7 +130,6 @@ private:
|
||||||
|
|
||||||
void EvalRadius();
|
void EvalRadius();
|
||||||
void EvalF();
|
void EvalF();
|
||||||
void ShowLineAngles();
|
|
||||||
void CheckAngles();
|
void CheckAngles();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>425</width>
|
<width>425</width>
|
||||||
<height>577</height>
|
<height>329</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -87,16 +87,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHereRadius">
|
<widget class="QToolButton" name="toolButtonExprRadius">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert variable into the formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -265,16 +262,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHereF1">
|
<widget class="QToolButton" name="toolButtonExprF1">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert variable into formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -443,16 +437,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHereF2">
|
<widget class="QToolButton" name="toolButtonExprF2">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert marked variable into formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -556,195 +547,39 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="label_4">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="label_4">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<string>Center point</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Center point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxBasePoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Select point of center of arc</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxColor"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QComboBox" name="comboBoxBasePoint">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>Select point of center of arc</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="1">
|
||||||
<bool>true</bool>
|
<widget class="QComboBox" name="comboBoxColor"/>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="1" column="0">
|
||||||
</item>
|
<widget class="QLabel" name="label">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QListWidget" name="listWidget">
|
<string>Color</string>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Variables</string>
|
</widget>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -759,23 +594,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHereRadius</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>plainTextEditF1</tabstop>
|
<tabstop>plainTextEditF1</tabstop>
|
||||||
<tabstop>toolButtonPutHereF1</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLengthF1</tabstop>
|
<tabstop>pushButtonGrowLengthF1</tabstop>
|
||||||
<tabstop>plainTextEditF2</tabstop>
|
<tabstop>plainTextEditF2</tabstop>
|
||||||
<tabstop>toolButtonPutHereF2</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLengthF2</tabstop>
|
<tabstop>pushButtonGrowLengthF2</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>comboBoxBasePoint</tabstop>
|
<tabstop>comboBoxBasePoint</tabstop>
|
||||||
<tabstop>comboBoxColor</tabstop>
|
<tabstop>comboBoxColor</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "../../visualization/vistoolbisector.h"
|
#include "../../visualization/vistoolbisector.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../tools/vabstracttool.h"
|
#include "../../tools/vabstracttool.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +47,6 @@ DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QW
|
||||||
line(nullptr)
|
line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -63,9 +63,7 @@ DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QW
|
||||||
FillComboBoxPoints(ui->comboBoxThirdPoint);
|
FillComboBoxPoints(ui->comboBoxThirdPoint);
|
||||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogBisector::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogBisector::FXLength);
|
||||||
connect(listWidget, &QListWidget::itemDoubleClicked, this, &DialogBisector::PutVal);
|
|
||||||
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogBisector::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogBisector::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogBisector::FormulaTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogBisector::FormulaTextChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogBisector::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogBisector::DeployFormulaTextEdit);
|
||||||
|
@ -110,6 +108,19 @@ void DialogBisector::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogBisector::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogBisector::ShowVisualization()
|
void DialogBisector::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,6 +79,7 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void FormulaTextChanged();
|
void FormulaTextChanged();
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>428</width>
|
<width>428</width>
|
||||||
<height>565</height>
|
<height>317</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -84,16 +84,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert marked variable into the formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -200,283 +197,127 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<string>Point label</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelFirstPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>First point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxFirstPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>First point of angle</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelSecondPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Second point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSecondPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Second point of angle</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="labelThirdPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Third point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxThirdPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Third point of angle</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Type of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineType">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Show line from second point to this point</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Line color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<item row="1" column="0">
|
||||||
<property name="text">
|
<widget class="QLabel" name="labelFirstPoint">
|
||||||
<string>Hide empty measurements</string>
|
<property name="sizePolicy">
|
||||||
</property>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<property name="checked">
|
<horstretch>0</horstretch>
|
||||||
<bool>true</bool>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>First point</string>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</property>
|
||||||
<property name="toolTip">
|
</widget>
|
||||||
<string>Variables - Click twice to insert into formula</string>
|
</item>
|
||||||
</property>
|
<item row="1" column="1">
|
||||||
</widget>
|
<widget class="QComboBox" name="comboBoxFirstPoint">
|
||||||
</item>
|
<property name="toolTip">
|
||||||
</layout>
|
<string>First point of angle</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="labelSecondPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Second point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxSecondPoint">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Second point of angle</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="labelThirdPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Third point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxThirdPoint">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Third point of angle</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineType">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show line from second point to this point</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Line color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="locale">
|
<property name="locale">
|
||||||
|
@ -494,22 +335,12 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxFirstPoint</tabstop>
|
<tabstop>comboBoxFirstPoint</tabstop>
|
||||||
<tabstop>comboBoxSecondPoint</tabstop>
|
<tabstop>comboBoxSecondPoint</tabstop>
|
||||||
<tabstop>comboBoxThirdPoint</tabstop>
|
<tabstop>comboBoxThirdPoint</tabstop>
|
||||||
<tabstop>comboBoxLineType</tabstop>
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
#include "../../visualization/vistoolcurveintersectaxis.h"
|
#include "../../visualization/vistoolcurveintersectaxis.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../tools/vabstracttool.h"
|
#include "../../tools/vabstracttool.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -43,7 +45,6 @@ DialogCurveIntersectAxis::DialogCurveIntersectAxis(const VContainer *data, const
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -59,8 +60,7 @@ DialogCurveIntersectAxis::DialogCurveIntersectAxis(const VContainer *data, const
|
||||||
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
||||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHereAngle, &QPushButton::clicked, this, &DialogCurveIntersectAxis::PutAngle);
|
connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogCurveIntersectAxis::FXAngle);
|
||||||
connect(listWidget, &QListWidget::itemDoubleClicked, this, &DialogCurveIntersectAxis::PutVal);
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCurveIntersectAxis::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCurveIntersectAxis::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCurveIntersectAxis::AngleTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCurveIntersectAxis::AngleTextChanged);
|
||||||
connect(ui->pushButtonGrowLengthAngle, &QPushButton::clicked, this, &DialogCurveIntersectAxis::DeployAngleTextEdit);
|
connect(ui->pushButtonGrowLengthAngle, &QPushButton::clicked, this, &DialogCurveIntersectAxis::DeployAngleTextEdit);
|
||||||
|
@ -221,12 +221,6 @@ void DialogCurveIntersectAxis::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogCurveIntersectAxis::PutAngle()
|
|
||||||
{
|
|
||||||
PutValHere(ui->plainTextEditFormula, ui->listWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogCurveIntersectAxis::EvalAngle()
|
void DialogCurveIntersectAxis::EvalAngle()
|
||||||
{
|
{
|
||||||
|
@ -245,6 +239,19 @@ void DialogCurveIntersectAxis::DeployAngleTextEdit()
|
||||||
DeployFormula(ui->plainTextEditFormula, ui->pushButtonGrowLengthAngle, formulaBaseHeightAngle);
|
DeployFormula(ui->plainTextEditFormula, ui->pushButtonGrowLengthAngle, formulaBaseHeightAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogCurveIntersectAxis::FXAngle()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit angle"));
|
||||||
|
dialog->SetFormula(GetAngle());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetAngle(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogCurveIntersectAxis::ShowVisualization()
|
void DialogCurveIntersectAxis::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,10 +66,10 @@ public:
|
||||||
virtual void ShowDialog(bool click);
|
virtual void ShowDialog(bool click);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
void PutAngle();
|
|
||||||
void EvalAngle();
|
void EvalAngle();
|
||||||
void AngleTextChanged();
|
void AngleTextChanged();
|
||||||
void DeployAngleTextEdit();
|
void DeployAngleTextEdit();
|
||||||
|
void FXAngle();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>419</width>
|
<width>419</width>
|
||||||
<height>532</height>
|
<height>284</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -84,13 +84,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHereAngle">
|
<widget class="QToolButton" name="toolButtonExprAngle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -197,279 +197,117 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<property name="fieldGrowthPolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
<item>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<item row="0" column="0">
|
||||||
<item>
|
<widget class="QLabel" name="label_4">
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<property name="sizePolicy">
|
||||||
<property name="fieldGrowthPolicy">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
<horstretch>0</horstretch>
|
||||||
</property>
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="label_4">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<string>Axis point</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Axis point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxAxisPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Axis Point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Curve</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxCurve">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Curve</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Type of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineType">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Show line from first point to this point</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Line color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QComboBox" name="comboBoxAxisPoint">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>Axis Point</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="0">
|
||||||
<bool>true</bool>
|
<widget class="QLabel" name="label_5">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
</item>
|
<horstretch>0</horstretch>
|
||||||
<item>
|
<verstretch>0</verstretch>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</sizepolicy>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Variables</string>
|
<property name="text">
|
||||||
</property>
|
<string>Curve</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxCurve">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Curve</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Point label</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineType">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show line from first point to this point</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Line color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -484,21 +322,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHereAngle</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
||||||
<tabstop>comboBoxAxisPoint</tabstop>
|
<tabstop>comboBoxAxisPoint</tabstop>
|
||||||
<tabstop>comboBoxCurve</tabstop>
|
<tabstop>comboBoxCurve</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxLineType</tabstop>
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "../../visualization/vistoolcutarc.h"
|
#include "../../visualization/vistoolcutarc.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../xml/vpattern.h"
|
#include "../../xml/vpattern.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +47,6 @@ DialogCutArc::DialogCutArc(const VContainer *data, const quint32 &toolId, QWidge
|
||||||
path(nullptr)
|
path(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -60,9 +60,7 @@ DialogCutArc::DialogCutArc(const VContainer *data, const quint32 &toolId, QWidge
|
||||||
FillComboBoxArcs(ui->comboBoxArc);
|
FillComboBoxArcs(ui->comboBoxArc);
|
||||||
FillComboBoxLineColors(ui->comboBoxColor);
|
FillComboBoxLineColors(ui->comboBoxColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogCutArc::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutArc::FXLength);
|
||||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogCutArc::PutVal);
|
|
||||||
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCutArc::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCutArc::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCutArc::FormulaTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCutArc::FormulaTextChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogCutArc::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogCutArc::DeployFormulaTextEdit);
|
||||||
|
@ -76,6 +74,19 @@ void DialogCutArc::FormulaTextChanged()
|
||||||
this->FormulaChangedPlainText();
|
this->FormulaChangedPlainText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogCutArc::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogCutArc::ShowVisualization()
|
void DialogCutArc::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,6 +69,7 @@ public slots:
|
||||||
* @brief FormulaTextChanged when formula text changes for validation and calc
|
* @brief FormulaTextChanged when formula text changes for validation and calc
|
||||||
*/
|
*/
|
||||||
void FormulaTextChanged();
|
void FormulaTextChanged();
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>412</width>
|
<width>412</width>
|
||||||
<height>466</height>
|
<height>218</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -84,13 +84,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -197,211 +197,55 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="label_3">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="label_3">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<string>Arc</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Arc</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxArc">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Selected arc</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QComboBox" name="comboBoxArc">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>Selected arc</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="0">
|
||||||
<bool>true</bool>
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
</item>
|
<horstretch>0</horstretch>
|
||||||
<item>
|
<verstretch>0</verstretch>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</sizepolicy>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Variables - Click twice to insert into formula</string>
|
<property name="text">
|
||||||
</property>
|
<string>Point label</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -416,19 +260,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>comboBoxArc</tabstop>
|
<tabstop>comboBoxArc</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "../../container/vcontainer.h"
|
#include "../../container/vcontainer.h"
|
||||||
#include "../../xml/vpattern.h"
|
#include "../../xml/vpattern.h"
|
||||||
#include "../../visualization/vistoolcutspline.h"
|
#include "../../visualization/vistoolcutspline.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +46,6 @@ DialogCutSpline::DialogCutSpline(const VContainer *data, const quint32 &toolId,
|
||||||
path(nullptr)
|
path(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -59,8 +59,7 @@ DialogCutSpline::DialogCutSpline(const VContainer *data, const quint32 &toolId,
|
||||||
FillComboBoxSplines(ui->comboBoxSpline);
|
FillComboBoxSplines(ui->comboBoxSpline);
|
||||||
FillComboBoxLineColors(ui->comboBoxColor);
|
FillComboBoxLineColors(ui->comboBoxColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogCutSpline::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutSpline::FXLength);
|
||||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogCutSpline::PutVal);
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCutSpline::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCutSpline::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCutSpline::FormulaChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCutSpline::FormulaChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogCutSpline::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogCutSpline::DeployFormulaTextEdit);
|
||||||
|
@ -179,6 +178,19 @@ void DialogCutSpline::DeployFormulaTextEdit()
|
||||||
DeployFormula(ui->plainTextEditFormula, ui->pushButtonGrowLength, formulaBaseHeight);
|
DeployFormula(ui->plainTextEditFormula, ui->pushButtonGrowLength, formulaBaseHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogCutSpline::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogCutSpline::ShowVisualization()
|
void DialogCutSpline::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,6 +64,7 @@ public slots:
|
||||||
* @brief DeployFormulaTextEdit grow or shrink formula input
|
* @brief DeployFormulaTextEdit grow or shrink formula input
|
||||||
*/
|
*/
|
||||||
void DeployFormulaTextEdit();
|
void DeployFormulaTextEdit();
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>412</width>
|
<width>412</width>
|
||||||
<height>466</height>
|
<height>218</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -84,13 +84,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -197,211 +197,55 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="label_3">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="label_3">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<string>Curve</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Curve</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSpline">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Selected curve</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QComboBox" name="comboBoxSpline">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>Selected curve</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="0">
|
||||||
<bool>true</bool>
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
</item>
|
<horstretch>0</horstretch>
|
||||||
<item>
|
<verstretch>0</verstretch>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</sizepolicy>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Variables - Click twice to insert into formula</string>
|
<property name="text">
|
||||||
</property>
|
<string>Point label</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -416,19 +260,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>comboBoxSpline</tabstop>
|
<tabstop>comboBoxSpline</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "../../container/vcontainer.h"
|
#include "../../container/vcontainer.h"
|
||||||
#include "../../xml/vpattern.h"
|
#include "../../xml/vpattern.h"
|
||||||
#include "../../visualization/vistoolcutsplinepath.h"
|
#include "../../visualization/vistoolcutsplinepath.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +46,6 @@ DialogCutSplinePath::DialogCutSplinePath(const VContainer *data, const quint32 &
|
||||||
path(nullptr)
|
path(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -59,8 +59,7 @@ DialogCutSplinePath::DialogCutSplinePath(const VContainer *data, const quint32 &
|
||||||
FillComboBoxSplinesPath(ui->comboBoxSplinePath);
|
FillComboBoxSplinesPath(ui->comboBoxSplinePath);
|
||||||
FillComboBoxLineColors(ui->comboBoxColor);
|
FillComboBoxLineColors(ui->comboBoxColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogCutSplinePath::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogCutSplinePath::FXLength);
|
||||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogCutSplinePath::PutVal);
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCutSplinePath::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogCutSplinePath::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCutSplinePath::FormulaChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogCutSplinePath::FormulaChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogCutSplinePath::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogCutSplinePath::DeployFormulaTextEdit);
|
||||||
|
@ -179,6 +178,19 @@ void DialogCutSplinePath::DeployFormulaTextEdit()
|
||||||
DeployFormula(ui->plainTextEditFormula, ui->pushButtonGrowLength, formulaBaseHeight);
|
DeployFormula(ui->plainTextEditFormula, ui->pushButtonGrowLength, formulaBaseHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogCutSplinePath::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogCutSplinePath::ShowVisualization()
|
void DialogCutSplinePath::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,6 +64,7 @@ public slots:
|
||||||
* @brief DeployFormulaTextEdit grow or shrink formula input
|
* @brief DeployFormulaTextEdit grow or shrink formula input
|
||||||
*/
|
*/
|
||||||
void DeployFormulaTextEdit();
|
void DeployFormulaTextEdit();
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>412</width>
|
<width>412</width>
|
||||||
<height>466</height>
|
<height>218</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -84,13 +84,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -197,217 +197,61 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="label_3">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="label_3">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<string>Curve</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Curve</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSplinePath">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Selected curve path</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QComboBox" name="comboBoxSplinePath">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>Selected curve path</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="0">
|
||||||
<bool>true</bool>
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
</item>
|
<horstretch>0</horstretch>
|
||||||
<item>
|
<verstretch>0</verstretch>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</sizepolicy>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Variables - Click twice to insert into formula</string>
|
<property name="text">
|
||||||
</property>
|
<string>Point label</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -422,19 +266,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>comboBoxSplinePath</tabstop>
|
<tabstop>comboBoxSplinePath</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -423,13 +423,3 @@ void DialogDetail::DeleteItem()
|
||||||
ValidObjects(false);
|
ValidObjects(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogDetail::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ public slots:
|
||||||
void ClickedReverse(bool checked);
|
void ClickedReverse(bool checked);
|
||||||
void ObjectChanged(int row);
|
void ObjectChanged(int row);
|
||||||
void DeleteItem();
|
void DeleteItem();
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief SaveData Put dialog data in local variables
|
* @brief SaveData Put dialog data in local variables
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include "dialogeditwrongformula.h"
|
#include "dialogeditwrongformula.h"
|
||||||
#include "ui_dialogeditwrongformula.h"
|
#include "ui_dialogeditwrongformula.h"
|
||||||
|
#include "../../container/vcontainer.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
|
@ -35,7 +36,7 @@ DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const qui
|
||||||
checkZero(false), postfix(QString()), restoreCursor(false)
|
checkZero(false), postfix(QString()), restoreCursor(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
InitVariables();
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
this->formulaBaseHeight = ui->plainTextEditFormula->height();
|
this->formulaBaseHeight = ui->plainTextEditFormula->height();
|
||||||
ui->plainTextEditFormula->installEventFilter(this);
|
ui->plainTextEditFormula->installEventFilter(this);
|
||||||
|
@ -105,6 +106,195 @@ void DialogEditWrongFormula::EvalFormula()
|
||||||
Eval(plainTextEditFormula->toPlainText(), flagFormula, labelResultCalculation, postfix, checkZero);
|
Eval(plainTextEditFormula->toPlainText(), flagFormula, labelResultCalculation, postfix, checkZero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief ValChenged show description when current variable changed
|
||||||
|
* @param row number of row
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::ValChenged(int row)
|
||||||
|
{
|
||||||
|
if (ui->listWidget->count() == 0)
|
||||||
|
{
|
||||||
|
ui->labelDescription->setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QListWidgetItem *item = ui->listWidget->item( row );
|
||||||
|
if (ui->radioButtonSizeGrowth->isChecked())
|
||||||
|
{
|
||||||
|
if (item->text()==data->HeightName())
|
||||||
|
{
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->height()).arg(tr("Height"));
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
}
|
||||||
|
if (item->text()==data->SizeName())
|
||||||
|
{
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->size()).arg(tr("Size"));
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ui->radioButtonStandardTable->isChecked())
|
||||||
|
{
|
||||||
|
QString name = qApp->VarFromUser(item->text());
|
||||||
|
QSharedPointer<VMeasurement> stable = data->GetVariable<VMeasurement>(name);
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(name))
|
||||||
|
.arg(stable->GetGuiText());
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ui->radioButtonIncrements->isChecked())
|
||||||
|
{
|
||||||
|
QSharedPointer<VIncrement> incr = data->GetVariable<VIncrement>(item->text());
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(item->text()))
|
||||||
|
.arg(incr->GetDescription());
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ui->radioButtonLengthLine->isChecked())
|
||||||
|
{
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
|
.arg(*data->GetVariable<VLengthLine>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
|
.arg(tr("Line length"));
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ui->radioButtonLengthArc->isChecked())
|
||||||
|
{
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
|
.arg(*data->GetVariable<VArcLength>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
|
.arg(tr("Arc length"));
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ui->radioButtonLengthSpline->isChecked())
|
||||||
|
{
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
|
.arg(*data->GetVariable<VSplineLength>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
|
.arg(tr("Curve length"));
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ui->radioButtonAngleLine->isChecked())
|
||||||
|
{
|
||||||
|
QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
|
.arg(*data->GetVariable<VLineAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
|
.arg(tr("Line Angle"));
|
||||||
|
ui->labelDescription->setText(desc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief SizeHeight show in list base variables
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::SizeHeight()
|
||||||
|
{
|
||||||
|
ui->checkBoxHideEmpty->setEnabled(false);
|
||||||
|
|
||||||
|
ui->listWidget->blockSignals(true);
|
||||||
|
ui->listWidget->clear();
|
||||||
|
|
||||||
|
{
|
||||||
|
QListWidgetItem *item = new QListWidgetItem(data->HeightName());
|
||||||
|
item->setFont(QFont("Times", 12, QFont::Bold));
|
||||||
|
ui->listWidget->addItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
QListWidgetItem *item = new QListWidgetItem(data->SizeName());
|
||||||
|
item->setFont(QFont("Times", 12, QFont::Bold));
|
||||||
|
ui->listWidget->addItem(item);
|
||||||
|
|
||||||
|
ui->listWidget->blockSignals(false);
|
||||||
|
ui->listWidget->setCurrentRow (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief PutHere put variable into edit
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::PutHere()
|
||||||
|
{
|
||||||
|
const QListWidgetItem *item = ui->listWidget->currentItem();
|
||||||
|
if (item != nullptr)
|
||||||
|
{
|
||||||
|
QTextCursor cursor = ui->plainTextEditFormula->textCursor();
|
||||||
|
cursor.insertText(item->text());
|
||||||
|
ui->plainTextEditFormula->setTextCursor(cursor);
|
||||||
|
ui->plainTextEditFormula->setFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief PutVal put variable into edit
|
||||||
|
* @param item chosen item of list widget
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::PutVal(QListWidgetItem *item)
|
||||||
|
{
|
||||||
|
SCASSERT(item != nullptr);
|
||||||
|
QTextCursor cursor = ui->plainTextEditFormula->textCursor();
|
||||||
|
cursor.insertText(item->text());
|
||||||
|
ui->plainTextEditFormula->setTextCursor(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief Measurements show in list measurements
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::Measurements()
|
||||||
|
{
|
||||||
|
ui->checkBoxHideEmpty->setEnabled(true);
|
||||||
|
ShowVariable(data->DataMeasurements());
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief LengthLines show in list lengths of lines variables
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::LengthLines()
|
||||||
|
{
|
||||||
|
ui->checkBoxHideEmpty->setEnabled(false);
|
||||||
|
ShowVariable(data->DataLengthLines());
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief LengthArcs show in list lengths of arcs variables
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::LengthArcs()
|
||||||
|
{
|
||||||
|
ui->checkBoxHideEmpty->setEnabled(false);
|
||||||
|
ShowVariable(data->DataLengthArcs());
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief LengthCurves show in list lengths of curves variables
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::LengthCurves()
|
||||||
|
{
|
||||||
|
ui->checkBoxHideEmpty->setEnabled(false);
|
||||||
|
ShowVariable(data->DataLengthSplines());
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogEditWrongFormula::AngleLines()
|
||||||
|
{
|
||||||
|
ui->checkBoxHideEmpty->setEnabled(false);
|
||||||
|
ShowVariable(data->DataAngleLines());
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief Increments show in list increment variables
|
||||||
|
*/
|
||||||
|
void DialogEditWrongFormula::Increments()
|
||||||
|
{
|
||||||
|
ui->checkBoxHideEmpty->setEnabled(false);
|
||||||
|
ShowVariable(data->DataIncrements());
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogEditWrongFormula::CheckState()
|
void DialogEditWrongFormula::CheckState()
|
||||||
{
|
{
|
||||||
|
@ -150,3 +340,59 @@ QString DialogEditWrongFormula::GetFormula() const
|
||||||
{
|
{
|
||||||
return qApp->FormulaFromUser(formula);
|
return qApp->FormulaFromUser(formula);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogEditWrongFormula::InitVariables()
|
||||||
|
{
|
||||||
|
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &DialogEditWrongFormula::ValChenged);
|
||||||
|
|
||||||
|
if (qApp->patternType() == MeasurementsType::Standard)
|
||||||
|
{
|
||||||
|
SizeHeight();
|
||||||
|
connect(ui->radioButtonSizeGrowth, &QRadioButton::clicked, this, &DialogEditWrongFormula::SizeHeight);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->radioButtonSizeGrowth->setEnabled(false);
|
||||||
|
ui->radioButtonStandardTable->setChecked(true);
|
||||||
|
Measurements();
|
||||||
|
}
|
||||||
|
connect(ui->radioButtonStandardTable, &QRadioButton::clicked, this, &DialogEditWrongFormula::Measurements);
|
||||||
|
connect(ui->radioButtonIncrements, &QRadioButton::clicked, this, &DialogEditWrongFormula::Increments);
|
||||||
|
connect(ui->radioButtonLengthLine, &QRadioButton::clicked, this, &DialogEditWrongFormula::LengthLines);
|
||||||
|
connect(ui->radioButtonLengthArc, &QRadioButton::clicked, this, &DialogEditWrongFormula::LengthArcs);
|
||||||
|
connect(ui->radioButtonLengthSpline, &QRadioButton::clicked, this, &DialogEditWrongFormula::LengthCurves);
|
||||||
|
connect(ui->radioButtonAngleLine, &QRadioButton::clicked, this, &DialogEditWrongFormula::AngleLines);
|
||||||
|
connect(ui->checkBoxHideEmpty, &QCheckBox::stateChanged, this, &DialogEditWrongFormula::Measurements);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief ShowVariable show variables in list
|
||||||
|
* @param var container with variables
|
||||||
|
*/
|
||||||
|
template <class key, class val>
|
||||||
|
void DialogEditWrongFormula::ShowVariable(const QMap<key, val> var)
|
||||||
|
{
|
||||||
|
ui->listWidget->blockSignals(true);
|
||||||
|
ui->listWidget->clear();
|
||||||
|
ui->labelDescription->setText("");
|
||||||
|
|
||||||
|
QMapIterator<key, val> iMap(var);
|
||||||
|
while (iMap.hasNext())
|
||||||
|
{
|
||||||
|
iMap.next();
|
||||||
|
if (ui->checkBoxHideEmpty->isEnabled() && ui->checkBoxHideEmpty->isChecked() && iMap.value()->IsNotUsed())
|
||||||
|
{
|
||||||
|
continue; //skip this measurement
|
||||||
|
}
|
||||||
|
if (iMap.value()->Filter(toolId) == false)
|
||||||
|
{// If we create this variable don't show
|
||||||
|
QListWidgetItem *item = new QListWidgetItem(iMap.key());
|
||||||
|
item->setFont(QFont("Times", 12, QFont::Bold));
|
||||||
|
ui->listWidget->addItem(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ui->listWidget->blockSignals(false);
|
||||||
|
ui->listWidget->setCurrentRow (0);
|
||||||
|
}
|
||||||
|
|
|
@ -63,6 +63,17 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void DeployFormulaTextEdit();
|
void DeployFormulaTextEdit();
|
||||||
virtual void EvalFormula();
|
virtual void EvalFormula();
|
||||||
|
void ValChenged(int row);
|
||||||
|
void SizeHeight();
|
||||||
|
void PutHere();
|
||||||
|
void PutVal(QListWidgetItem * item);
|
||||||
|
|
||||||
|
void Measurements();
|
||||||
|
void LengthLines();
|
||||||
|
void LengthArcs();
|
||||||
|
void LengthCurves();
|
||||||
|
void AngleLines();
|
||||||
|
void Increments();
|
||||||
protected:
|
protected:
|
||||||
virtual void CheckState();
|
virtual void CheckState();
|
||||||
virtual void closeEvent(QCloseEvent *event);
|
virtual void closeEvent(QCloseEvent *event);
|
||||||
|
@ -79,6 +90,11 @@ private:
|
||||||
bool checkZero;
|
bool checkZero;
|
||||||
QString postfix;
|
QString postfix;
|
||||||
bool restoreCursor;
|
bool restoreCursor;
|
||||||
|
|
||||||
|
void InitVariables();
|
||||||
|
|
||||||
|
template <class key, class val>
|
||||||
|
void ShowVariable(const QMap<key, val> var);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -349,7 +349,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="listWidget">
|
<widget class="QListWidget" name="listWidget">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Variables</string>
|
<string>Double click for add to formula</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "../../visualization/vistoolendline.h"
|
#include "../../visualization/vistoolendline.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../tools/vabstracttool.h"
|
#include "../../tools/vabstracttool.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -47,7 +48,6 @@ DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWid
|
||||||
formulaLength(QString()), formulaAngle(QString()), formulaBaseHeight(0), formulaBaseHeightAngle(0), line(nullptr)
|
formulaLength(QString()), formulaAngle(QString()), formulaBaseHeight(0), formulaBaseHeightAngle(0), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -65,8 +65,8 @@ DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWid
|
||||||
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
||||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHereLength, &QPushButton::clicked, this, &DialogEndLine::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogEndLine::FXLength);
|
||||||
connect(ui->toolButtonPutHereAngle, &QPushButton::clicked, this, &DialogEndLine::PutAngle);
|
connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogEndLine::FXAngle);
|
||||||
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogEndLine::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogEndLine::NamePointChanged);
|
||||||
|
|
||||||
|
@ -81,15 +81,6 @@ DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWid
|
||||||
line = new VisToolEndLine(data);
|
line = new VisToolEndLine(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief PutAngle put variable into formula of angle
|
|
||||||
*/
|
|
||||||
void DialogEndLine::PutAngle()
|
|
||||||
{
|
|
||||||
PutValHere(ui->plainTextEditAngle, ui->listWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief EvalAngle calculate value of angle
|
* @brief EvalAngle calculate value of angle
|
||||||
|
@ -127,6 +118,32 @@ void DialogEndLine::DeployAngleTextEdit()
|
||||||
DeployFormula(ui->plainTextEditAngle, ui->pushButtonGrowLengthAngle, formulaBaseHeightAngle);
|
DeployFormula(ui->plainTextEditAngle, ui->pushButtonGrowLengthAngle, formulaBaseHeightAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogEndLine::FXAngle()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit angle"));
|
||||||
|
dialog->SetFormula(GetAngle());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetAngle(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogEndLine::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
* @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
|
||||||
|
|
|
@ -76,10 +76,13 @@ public slots:
|
||||||
* @brief FormulaTextChanged when formula text changes for validation and calc
|
* @brief FormulaTextChanged when formula text changes for validation and calc
|
||||||
*/
|
*/
|
||||||
void FormulaTextChanged();
|
void FormulaTextChanged();
|
||||||
void PutAngle();
|
|
||||||
void EvalAngle();
|
void EvalAngle();
|
||||||
void AngleTextChanged();
|
void AngleTextChanged();
|
||||||
void DeployAngleTextEdit();
|
void DeployAngleTextEdit();
|
||||||
|
|
||||||
|
void FXAngle();
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>417</width>
|
<width>358</width>
|
||||||
<height>571</height>
|
<height>323</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelEditFormula">
|
<widget class="QLabel" name="labelEditFormula">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -84,6 +84,9 @@
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
|
@ -93,13 +96,19 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHereLength">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -111,6 +120,12 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -122,14 +137,14 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelResultCalculation">
|
<widget class="QLabel" name="labelResultCalculation">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>87</width>
|
<width>60</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -210,7 +225,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelEditAngle">
|
<widget class="QLabel" name="labelEditAngle">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -271,13 +286,19 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHereAngle">
|
<widget class="QToolButton" name="toolButtonExprAngle">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -289,6 +310,12 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -300,14 +327,14 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelResultCalculationAngle">
|
<widget class="QLabel" name="labelResultCalculationAngle">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>87</width>
|
<width>60</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
@ -384,252 +411,102 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<property name="fieldGrowthPolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
<item>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<item row="0" column="0">
|
||||||
<property name="fieldGrowthPolicy">
|
<widget class="QLabel" name="label_3">
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
<property name="sizePolicy">
|
||||||
</property>
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<item row="0" column="0">
|
<horstretch>0</horstretch>
|
||||||
<widget class="QLabel" name="label_3">
|
<verstretch>0</verstretch>
|
||||||
<property name="sizePolicy">
|
</sizepolicy>
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
</property>
|
||||||
<horstretch>0</horstretch>
|
<property name="text">
|
||||||
<verstretch>0</verstretch>
|
<string>Base point</string>
|
||||||
</sizepolicy>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="text">
|
|
||||||
<string>Base point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxBasePoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>First point of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Type of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineType">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Show line from first point to this point</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Line color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QComboBox" name="comboBoxBasePoint">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>First point of line</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="0">
|
||||||
<bool>true</bool>
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
</item>
|
<horstretch>0</horstretch>
|
||||||
<item>
|
<verstretch>0</verstretch>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</sizepolicy>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Variables</string>
|
<property name="text">
|
||||||
</property>
|
<string>Point label</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Type of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineType">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show line from first point to this point</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Line color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -644,23 +521,12 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHereLength</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>plainTextEditAngle</tabstop>
|
<tabstop>plainTextEditAngle</tabstop>
|
||||||
<tabstop>toolButtonPutHereAngle</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
||||||
<tabstop>comboBoxBasePoint</tabstop>
|
<tabstop>comboBoxBasePoint</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxLineType</tabstop>
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -249,15 +249,6 @@ void DialogHeight::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogHeight::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogHeight::ShowVisualization()
|
void DialogHeight::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -140,15 +140,6 @@ void DialogLine::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogLine::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variables.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLine::ShowVisualization()
|
void DialogLine::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -224,15 +224,6 @@ void DialogLineIntersect::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogLineIntersect::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLineIntersect::ShowVisualization()
|
void DialogLineIntersect::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,6 @@ public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
void PointChanged();
|
void PointChanged();
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
#include "../../visualization/vistoollineintersectaxis.h"
|
#include "../../visualization/vistoollineintersectaxis.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../tools/vabstracttool.h"
|
#include "../../tools/vabstracttool.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -42,7 +44,6 @@ DialogLineIntersectAxis::DialogLineIntersectAxis(const VContainer *data, const q
|
||||||
formulaBaseHeightAngle(0), line(nullptr)
|
formulaBaseHeightAngle(0), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -59,8 +60,7 @@ DialogLineIntersectAxis::DialogLineIntersectAxis(const VContainer *data, const q
|
||||||
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
||||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHereAngle, &QPushButton::clicked, this, &DialogLineIntersectAxis::PutAngle);
|
connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogLineIntersectAxis::FXAngle);
|
||||||
connect(listWidget, &QListWidget::itemDoubleClicked, this, &DialogLineIntersectAxis::PutVal);
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogLineIntersectAxis::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogLineIntersectAxis::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogLineIntersectAxis::AngleTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogLineIntersectAxis::AngleTextChanged);
|
||||||
connect(ui->pushButtonGrowLengthAngle, &QPushButton::clicked, this, &DialogLineIntersectAxis::DeployAngleTextEdit);
|
connect(ui->pushButtonGrowLengthAngle, &QPushButton::clicked, this, &DialogLineIntersectAxis::DeployAngleTextEdit);
|
||||||
|
@ -260,12 +260,6 @@ void DialogLineIntersectAxis::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogLineIntersectAxis::PutAngle()
|
|
||||||
{
|
|
||||||
PutValHere(ui->plainTextEditFormula, ui->listWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLineIntersectAxis::EvalAngle()
|
void DialogLineIntersectAxis::EvalAngle()
|
||||||
{
|
{
|
||||||
|
@ -309,6 +303,19 @@ void DialogLineIntersectAxis::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogLineIntersectAxis::FXAngle()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit angle"));
|
||||||
|
dialog->SetFormula(GetAngle());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetAngle(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLineIntersectAxis::ShowVisualization()
|
void DialogLineIntersectAxis::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,11 +69,11 @@ public:
|
||||||
virtual void ShowDialog(bool click);
|
virtual void ShowDialog(bool click);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
void PutAngle();
|
|
||||||
void EvalAngle();
|
void EvalAngle();
|
||||||
void AngleTextChanged();
|
void AngleTextChanged();
|
||||||
void DeployAngleTextEdit();
|
void DeployAngleTextEdit();
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
|
void FXAngle();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>457</width>
|
<width>457</width>
|
||||||
<height>565</height>
|
<height>317</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -84,13 +84,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHereAngle">
|
<widget class="QToolButton" name="toolButtonExprAngle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -197,296 +197,134 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="labelAxisPoint">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="labelAxisPoint">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<string>Axis point</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Axis point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxAxisPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Axis Point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelFirstLinePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>First line point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxFirstLinePoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>First point of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelSecondLinePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Second line point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSecondLinePoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Second point of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Type of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineType">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Show line from first point to this point</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Line color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QComboBox" name="comboBoxAxisPoint">
|
||||||
<item>
|
<property name="toolTip">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<string>Axis Point</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hide empty measurements</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="checked">
|
<item row="1" column="0">
|
||||||
<bool>true</bool>
|
<widget class="QLabel" name="labelFirstLinePoint">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
</item>
|
<horstretch>0</horstretch>
|
||||||
<item>
|
<verstretch>0</verstretch>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</sizepolicy>
|
||||||
<property name="toolTip">
|
</property>
|
||||||
<string>Variables</string>
|
<property name="text">
|
||||||
</property>
|
<string>First line point</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxFirstLinePoint">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>First point of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="labelSecondLinePoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Second line point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxSecondLinePoint">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Second point of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Point label</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineType">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show line from first point to this point</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Line color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -501,22 +339,12 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHereAngle</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
||||||
<tabstop>comboBoxAxisPoint</tabstop>
|
<tabstop>comboBoxAxisPoint</tabstop>
|
||||||
<tabstop>comboBoxFirstLinePoint</tabstop>
|
<tabstop>comboBoxFirstLinePoint</tabstop>
|
||||||
<tabstop>comboBoxSecondLinePoint</tabstop>
|
<tabstop>comboBoxSecondLinePoint</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxLineType</tabstop>
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "../visualization/vistoolnormal.h"
|
#include "../visualization/vistoolnormal.h"
|
||||||
#include "../widgets/vmaingraphicsscene.h"
|
#include "../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../tools/vabstracttool.h"
|
#include "../../tools/vabstracttool.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +44,6 @@ DialogNormal::DialogNormal(const VContainer *data, const quint32 &toolId, QWidge
|
||||||
line(nullptr)
|
line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -61,8 +61,7 @@ DialogNormal::DialogNormal(const VContainer *data, const quint32 &toolId, QWidge
|
||||||
|
|
||||||
InitArrow(ui);
|
InitArrow(ui);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogNormal::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogNormal::FXLength);
|
||||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogNormal::PutVal);
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogNormal::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogNormal::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogNormal::FormulaTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogNormal::FormulaTextChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogNormal::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogNormal::DeployFormulaTextEdit);
|
||||||
|
@ -99,6 +98,19 @@ void DialogNormal::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogNormal::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogNormal::ShowVisualization()
|
void DialogNormal::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,6 +78,7 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void FormulaTextChanged();
|
void FormulaTextChanged();
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>517</width>
|
<width>517</width>
|
||||||
<height>678</height>
|
<height>428</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -87,16 +87,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert variable into formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -200,457 +197,261 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Point label</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="labelFirstPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>First point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxFirstPoint">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>First point of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="labelSecondPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Second point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxSecondPoint">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Second point of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="label_5">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<item row="0" column="0">
|
<horstretch>0</horstretch>
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
<verstretch>0</verstretch>
|
||||||
<property name="sizePolicy">
|
</sizepolicy>
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
</property>
|
||||||
<horstretch>0</horstretch>
|
<property name="minimumSize">
|
||||||
<verstretch>0</verstretch>
|
<size>
|
||||||
</sizepolicy>
|
<width>0</width>
|
||||||
</property>
|
<height>0</height>
|
||||||
<property name="text">
|
</size>
|
||||||
<string>Point label</string>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Additional angle degrees</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="0" column="1">
|
<property name="wordWrap">
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
<bool>true</bool>
|
||||||
</item>
|
</property>
|
||||||
<item row="1" column="0">
|
</widget>
|
||||||
<widget class="QLabel" name="labelFirstPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>First point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxFirstPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>First point of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelSecondPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Second point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSecondPoint">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Second point of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Additional angle degrees</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetMinimumSize</enum>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>29</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowRightUp">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowRightUp.png</normaloff>:/icon/32x32/arrowRightUp.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowLeftUp">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowLeftUp.png</normaloff>:/icon/32x32/arrowLeftUp.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowLeft">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowLeft.png</normaloff>:/icon/32x32/arrowLeft.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowRight">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowRight.png</normaloff>:/icon/32x32/arrowRight.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowUp">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowUp.png</normaloff>:/icon/32x32/arrowUp.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowDown">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowDown.png</normaloff>:/icon/32x32/arrowDown.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowLeftDown">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowLeftDown.png</normaloff>:/icon/32x32/arrowLeftDown.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QToolButton" name="toolButtonArrowRightDown">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">...</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
|
||||||
<normaloff>:/icon/32x32/arrowRightDown.png</normaloff>:/icon/32x32/arrowRightDown.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxAngle">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>56</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>-360.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>360.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>Type of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineType">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Show line from first point to this point</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineColor"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Line color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item>
|
<property name="sizeConstraint">
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<enum>QLayout::SetMinimumSize</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>29</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowRight">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Hide empty measurements</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="icon">
|
||||||
<bool>true</bool>
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowRight.png</normaloff>:/icon/32x32/arrowRight.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="1">
|
||||||
<widget class="QListWidget" name="listWidget">
|
<widget class="QDoubleSpinBox" name="doubleSpinBoxAngle">
|
||||||
<property name="toolTip">
|
<property name="sizePolicy">
|
||||||
<string>Variables - Click twice to insert into formula</string>
|
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>56</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>360.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowLeftUp">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowLeftUp.png</normaloff>:/icon/32x32/arrowLeftUp.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowRightUp">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowRightUp.png</normaloff>:/icon/32x32/arrowRightUp.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowUp">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowUp.png</normaloff>:/icon/32x32/arrowUp.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowLeft">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowLeft.png</normaloff>:/icon/32x32/arrowLeft.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowLeftDown">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowLeftDown.png</normaloff>:/icon/32x32/arrowLeftDown.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowDown">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowDown.png</normaloff>:/icon/32x32/arrowDown.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QToolButton" name="toolButtonArrowRightDown">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
|
<normaloff>:/icon/32x32/arrowRightDown.png</normaloff>:/icon/32x32/arrowRightDown.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -659,14 +460,50 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelDescription">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
<property name="text">
|
<item row="0" column="0">
|
||||||
<string/>
|
<widget class="QLabel" name="label_7">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="wordWrap">
|
<string>Type of line</string>
|
||||||
<bool>true</bool>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineType">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show line from first point to this point</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineColor"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Line color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
@ -682,7 +519,6 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxFirstPoint</tabstop>
|
<tabstop>comboBoxFirstPoint</tabstop>
|
||||||
|
@ -696,15 +532,6 @@
|
||||||
<tabstop>toolButtonArrowLeftDown</tabstop>
|
<tabstop>toolButtonArrowLeftDown</tabstop>
|
||||||
<tabstop>toolButtonArrowLeft</tabstop>
|
<tabstop>toolButtonArrowLeft</tabstop>
|
||||||
<tabstop>toolButtonArrowLeftUp</tabstop>
|
<tabstop>toolButtonArrowLeftUp</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "../../visualization/vistoolpointofcontact.h"
|
#include "../../visualization/vistoolpointofcontact.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../xml/vpattern.h"
|
#include "../../xml/vpattern.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -45,7 +46,6 @@ DialogPointOfContact::DialogPointOfContact(const VContainer *data, const quint32
|
||||||
radius(QString()), formulaBaseHeight(0), line(nullptr)
|
radius(QString()), formulaBaseHeight(0), line(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -60,24 +60,7 @@ DialogPointOfContact::DialogPointOfContact(const VContainer *data, const quint32
|
||||||
FillComboBoxPoints(ui->comboBoxSecondPoint);
|
FillComboBoxPoints(ui->comboBoxSecondPoint);
|
||||||
FillComboBoxPoints(ui->comboBoxCenter);
|
FillComboBoxPoints(ui->comboBoxCenter);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogPointOfContact::PutHere);
|
connect(ui->toolButtonExprRadius, &QPushButton::clicked, this, &DialogPointOfContact::FXRadius);
|
||||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogPointOfContact::PutVal);
|
|
||||||
|
|
||||||
if (qApp->patternType() == MeasurementsType::Standard)
|
|
||||||
{
|
|
||||||
SizeHeight();
|
|
||||||
connect(ui->radioButtonSizeGrowth, &QRadioButton::clicked, this, &DialogTool::SizeHeight);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
radioButtonSizeGrowth->setVisible(false);
|
|
||||||
Measurements();
|
|
||||||
}
|
|
||||||
connect(ui->radioButtonStandardTable, &QRadioButton::clicked, this, &DialogPointOfContact::Measurements);
|
|
||||||
connect(ui->radioButtonIncrements, &QRadioButton::clicked, this, &DialogPointOfContact::Increments);
|
|
||||||
connect(ui->radioButtonLengthLine, &QRadioButton::clicked, this, &DialogPointOfContact::LengthLines);
|
|
||||||
connect(ui->radioButtonLengthArc, &QRadioButton::clicked, this, &DialogPointOfContact::LengthArcs);
|
|
||||||
connect(ui->radioButtonLengthSpline, &QRadioButton::clicked, this, &DialogPointOfContact::LengthCurves);
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfContact::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfContact::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogPointOfContact::FormulaTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogPointOfContact::FormulaTextChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogPointOfContact::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogPointOfContact::DeployFormulaTextEdit);
|
||||||
|
@ -132,6 +115,19 @@ void DialogPointOfContact::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogPointOfContact::FXRadius()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit radius"));
|
||||||
|
dialog->SetFormula(getRadius());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
setRadius(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogPointOfContact::ShowVisualization()
|
void DialogPointOfContact::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,6 +73,7 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void FormulaTextChanged();
|
void FormulaTextChanged();
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
|
void FXRadius();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>498</width>
|
<width>498</width>
|
||||||
<height>499</height>
|
<height>251</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -87,16 +87,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprRadius">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert variable into formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -200,283 +197,127 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<string>Point label</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelArcCenter">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Center of arc</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxCenter">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>145</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Select point of center of arc</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelFirstPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Top of the line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxFirstPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>143</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="labelSecondPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>End of the line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSecondPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<item row="1" column="0">
|
||||||
<property name="text">
|
<widget class="QLabel" name="labelArcCenter">
|
||||||
<string>Hide empty measurements</string>
|
<property name="sizePolicy">
|
||||||
</property>
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<property name="checked">
|
<horstretch>0</horstretch>
|
||||||
<bool>true</bool>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>Center of arc</string>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</property>
|
||||||
<property name="toolTip">
|
</widget>
|
||||||
<string>Variables - Click twice to insert into formula.</string>
|
</item>
|
||||||
</property>
|
<item row="1" column="1">
|
||||||
</widget>
|
<widget class="QComboBox" name="comboBoxCenter">
|
||||||
</item>
|
<property name="sizePolicy">
|
||||||
</layout>
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>145</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select point of center of arc</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="labelFirstPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Top of the line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxFirstPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>143</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="labelSecondPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>End of the line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxSecondPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -491,21 +332,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxCenter</tabstop>
|
<tabstop>comboBoxCenter</tabstop>
|
||||||
<tabstop>comboBoxFirstPoint</tabstop>
|
<tabstop>comboBoxFirstPoint</tabstop>
|
||||||
<tabstop>comboBoxSecondPoint</tabstop>
|
<tabstop>comboBoxSecondPoint</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -156,15 +156,6 @@ void DialogPointOfIntersection::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogPointOfIntersection::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogPointOfIntersection::ShowVisualization()
|
void DialogPointOfIntersection::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "../../visualization/vistoolshoulderpoint.h"
|
#include "../../visualization/vistoolshoulderpoint.h"
|
||||||
#include "../../widgets/vmaingraphicsscene.h"
|
#include "../../widgets/vmaingraphicsscene.h"
|
||||||
#include "../../tools/vabstracttool.h"
|
#include "../../tools/vabstracttool.h"
|
||||||
|
#include "dialogeditwrongformula.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +47,6 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &
|
||||||
formulaBaseHeight(0), line (nullptr)
|
formulaBaseHeight(0), line (nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
InitVariables(ui);
|
|
||||||
InitFormulaUI(ui);
|
InitFormulaUI(ui);
|
||||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||||
labelEditNamePoint = ui->labelEditNamePoint;
|
labelEditNamePoint = ui->labelEditNamePoint;
|
||||||
|
@ -63,8 +63,7 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &
|
||||||
FillComboBoxPoints(ui->comboBoxP3);
|
FillComboBoxPoints(ui->comboBoxP3);
|
||||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogShoulderPoint::PutHere);
|
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogShoulderPoint::FXLength);
|
||||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogShoulderPoint::PutVal);
|
|
||||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogShoulderPoint::NamePointChanged);
|
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogShoulderPoint::NamePointChanged);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogShoulderPoint::FormulaTextChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogShoulderPoint::FormulaTextChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogShoulderPoint::DeployFormulaTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogShoulderPoint::DeployFormulaTextEdit);
|
||||||
|
@ -109,6 +108,19 @@ void DialogShoulderPoint::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogShoulderPoint::FXLength()
|
||||||
|
{
|
||||||
|
DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this);
|
||||||
|
dialog->setWindowTitle(tr("Edit length"));
|
||||||
|
dialog->SetFormula(GetFormula());
|
||||||
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
SetFormula(dialog->GetFormula());
|
||||||
|
}
|
||||||
|
delete dialog;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogShoulderPoint::ShowVisualization()
|
void DialogShoulderPoint::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,6 +78,7 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void FormulaTextChanged();
|
void FormulaTextChanged();
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
|
void FXLength();
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>488</width>
|
<width>488</width>
|
||||||
<height>565</height>
|
<height>317</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -87,16 +87,13 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="toolButtonPutHere">
|
<widget class="QToolButton" name="toolButtonExprLength">
|
||||||
<property name="toolTip">
|
|
||||||
<string>Insert variable into formula</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true">...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../share/resources/icon.qrc">
|
<iconset resource="../../share/resources/icon.qrc">
|
||||||
<normaloff>:/icon/24x24/putHere.png</normaloff>:/icon/24x24/putHere.png</iconset>
|
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -200,322 +197,166 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<widget class="QLabel" name="labelEditNamePoint">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<verstretch>0</verstretch>
|
||||||
<item row="0" column="0">
|
</sizepolicy>
|
||||||
<widget class="QLabel" name="labelEditNamePoint">
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<string>Point label</string>
|
||||||
<horstretch>0</horstretch>
|
</property>
|
||||||
<verstretch>0</verstretch>
|
</widget>
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Point label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelFirstPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>First point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxP1Line">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>145</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelSecondPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Second point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxP2Line">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>143</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="labelThirdPoint">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Third point</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxP3">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>145</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Type of line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineType">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Show line from first point to our point</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>14</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Line color</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxLineColor"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Input data</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonSizeGrowth">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size and height</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonStandardTable">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Measurements</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonIncrements">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Increments</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthArc">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of arcs</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonLengthSpline">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Length of curves</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioButtonAngleLine">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angle of lines</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QLineEdit" name="lineEditNamePoint"/>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
<item row="1" column="0">
|
||||||
<property name="text">
|
<widget class="QLabel" name="labelFirstPoint">
|
||||||
<string>Hide empty measurements</string>
|
<property name="sizePolicy">
|
||||||
</property>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<property name="checked">
|
<horstretch>0</horstretch>
|
||||||
<bool>true</bool>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>First point</string>
|
||||||
<widget class="QListWidget" name="listWidget">
|
</property>
|
||||||
<property name="toolTip">
|
</widget>
|
||||||
<string>Variables - Click twice to insert into formula</string>
|
</item>
|
||||||
</property>
|
<item row="1" column="1">
|
||||||
</widget>
|
<widget class="QComboBox" name="comboBoxP1Line">
|
||||||
</item>
|
<property name="sizePolicy">
|
||||||
</layout>
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>145</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="labelSecondPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Second point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxP2Line">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>143</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="labelThirdPoint">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Third point</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxP3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>145</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Type of line</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>110</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show line from first point to our point</string>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Line color</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBoxLineColor"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -530,22 +371,12 @@
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>plainTextEditFormula</tabstop>
|
<tabstop>plainTextEditFormula</tabstop>
|
||||||
<tabstop>toolButtonPutHere</tabstop>
|
|
||||||
<tabstop>pushButtonGrowLength</tabstop>
|
<tabstop>pushButtonGrowLength</tabstop>
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxP1Line</tabstop>
|
<tabstop>comboBoxP1Line</tabstop>
|
||||||
<tabstop>comboBoxP2Line</tabstop>
|
<tabstop>comboBoxP2Line</tabstop>
|
||||||
<tabstop>comboBoxP3</tabstop>
|
<tabstop>comboBoxP3</tabstop>
|
||||||
<tabstop>comboBoxLineType</tabstop>
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
|
||||||
<tabstop>radioButtonIncrements</tabstop>
|
|
||||||
<tabstop>radioButtonLengthLine</tabstop>
|
|
||||||
<tabstop>radioButtonLengthArc</tabstop>
|
|
||||||
<tabstop>radioButtonLengthSpline</tabstop>
|
|
||||||
<tabstop>radioButtonAngleLine</tabstop>
|
|
||||||
<tabstop>checkBoxHideEmpty</tabstop>
|
|
||||||
<tabstop>listWidget</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -77,15 +77,6 @@ void DialogSinglePoint::SaveData()
|
||||||
pointName = ui->lineEditName->text();
|
pointName = ui->lineEditName->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogSinglePoint::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief setData set name and point
|
* @brief setData set name and point
|
||||||
|
|
|
@ -51,7 +51,6 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void mousePress(const QPointF &scenePos);
|
void mousePress(const QPointF &scenePos);
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief SaveData Put dialog data in local variables
|
* @brief SaveData Put dialog data in local variables
|
||||||
|
|
|
@ -180,15 +180,6 @@ void DialogSpline::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogSpline::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSpline::ShowVisualization()
|
void DialogSpline::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -243,15 +243,6 @@ void DialogSplinePath::KAsm2Changed(qreal d)
|
||||||
item->setData(Qt::UserRole, QVariant::fromValue(p));
|
item->setData(Qt::UserRole, QVariant::fromValue(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogSplinePath::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSplinePath::ShowDialog(bool click)
|
void DialogSplinePath::ShowDialog(bool click)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,6 @@ public slots:
|
||||||
void Angle2Changed( qreal index );
|
void Angle2Changed( qreal index );
|
||||||
void KAsm1Changed(qreal d);
|
void KAsm1Changed(qreal d);
|
||||||
void KAsm2Changed(qreal d);
|
void KAsm2Changed(qreal d);
|
||||||
virtual void UpdateList();
|
|
||||||
virtual void ShowDialog(bool click);
|
virtual void ShowDialog(bool click);
|
||||||
void PathUpdated(const VSplinePath &path);
|
void PathUpdated(const VSplinePath &path);
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -60,10 +60,7 @@ Q_LOGGING_CATEGORY(vDialog, "v.dialog")
|
||||||
DialogTool::DialogTool(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
DialogTool::DialogTool(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||||
:QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), flagError(true),
|
:QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), flagError(true),
|
||||||
timerFormula(nullptr), bOk(nullptr), bApply(nullptr), spinBoxAngle(nullptr), plainTextEditFormula(nullptr),
|
timerFormula(nullptr), bOk(nullptr), bApply(nullptr), spinBoxAngle(nullptr), plainTextEditFormula(nullptr),
|
||||||
listWidget(nullptr), labelResultCalculation(nullptr), labelDescription(nullptr), labelEditNamePoint(nullptr),
|
labelResultCalculation(nullptr), labelEditNamePoint(nullptr), labelEditFormula(nullptr),
|
||||||
labelEditFormula(nullptr), radioButtonSizeGrowth(nullptr), radioButtonStandardTable(nullptr),
|
|
||||||
radioButtonIncrements(nullptr), radioButtonLengthLine(nullptr), radioButtonLengthArc(nullptr),
|
|
||||||
radioButtonLengthCurve(nullptr), radioButtonAngleLine(nullptr), checkBoxHideEmpty(nullptr),
|
|
||||||
okColor(QColor(76, 76, 76)), errorColor(Qt::red), associatedTool(nullptr),
|
okColor(QColor(76, 76, 76)), errorColor(Qt::red), associatedTool(nullptr),
|
||||||
toolId(toolId), prepare(false), pointName(QString()), number(0)
|
toolId(toolId), prepare(false), pointName(QString()), number(0)
|
||||||
{
|
{
|
||||||
|
@ -348,41 +345,6 @@ void DialogTool::ChangeCurrentData(QComboBox *box, const QVariant &value) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief PutValHere put variable into line edit from list
|
|
||||||
* @param lineEdit lineEdit
|
|
||||||
* @param listWidget listWidget
|
|
||||||
*/
|
|
||||||
void DialogTool::PutValHere(QLineEdit *lineEdit, QListWidget *listWidget)
|
|
||||||
{
|
|
||||||
SCASSERT(lineEdit != nullptr);
|
|
||||||
SCASSERT(listWidget != nullptr);
|
|
||||||
QListWidgetItem *item = listWidget->currentItem();
|
|
||||||
if (item != nullptr)
|
|
||||||
{
|
|
||||||
int pos = lineEdit->cursorPosition();
|
|
||||||
lineEdit->setText(lineEdit->text().insert(lineEdit->cursorPosition(), item->text()));
|
|
||||||
lineEdit->setFocus();
|
|
||||||
lineEdit->setCursorPosition(pos + item->text().size());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogTool::PutValHere(QPlainTextEdit *plainTextEdit, QListWidget *listWidget)
|
|
||||||
{
|
|
||||||
SCASSERT(plainTextEdit != nullptr);
|
|
||||||
SCASSERT(listWidget != nullptr);
|
|
||||||
QListWidgetItem *item = listWidget->currentItem();
|
|
||||||
if (item != nullptr)
|
|
||||||
{
|
|
||||||
QTextCursor cursor = plainTextEdit->textCursor();
|
|
||||||
cursor.insertText(item->text());
|
|
||||||
plainTextEdit->setTextCursor(cursor);
|
|
||||||
plainTextEdit->setFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogTool::MoveCursorToEnd(QPlainTextEdit *plainTextEdit)
|
void DialogTool::MoveCursorToEnd(QPlainTextEdit *plainTextEdit)
|
||||||
{
|
{
|
||||||
|
@ -884,244 +846,6 @@ void DialogTool::EvalFormula()
|
||||||
Eval(plainTextEditFormula->toPlainText(), flagFormula, labelResultCalculation, postfix, false);
|
Eval(plainTextEditFormula->toPlainText(), flagFormula, labelResultCalculation, postfix, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief SizeHeight show in list base variables
|
|
||||||
*/
|
|
||||||
void DialogTool::SizeHeight()
|
|
||||||
{
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
checkBoxHideEmpty->setEnabled(false);
|
|
||||||
|
|
||||||
SCASSERT(listWidget != nullptr);
|
|
||||||
listWidget->blockSignals(true);
|
|
||||||
listWidget->clear();
|
|
||||||
|
|
||||||
{
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(data->HeightName());
|
|
||||||
item->setFont(QFont("Times", 12, QFont::Bold));
|
|
||||||
listWidget->addItem(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(data->SizeName());
|
|
||||||
item->setFont(QFont("Times", 12, QFont::Bold));
|
|
||||||
listWidget->addItem(item);
|
|
||||||
|
|
||||||
listWidget->blockSignals(false);
|
|
||||||
listWidget->setCurrentRow (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief Measurements show in list measurements
|
|
||||||
*/
|
|
||||||
void DialogTool::Measurements()
|
|
||||||
{
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
checkBoxHideEmpty->setEnabled(true);
|
|
||||||
ShowVariable(data->DataMeasurements());
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief LengthLines show in list lengths of lines variables
|
|
||||||
*/
|
|
||||||
void DialogTool::LengthLines()
|
|
||||||
{
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
checkBoxHideEmpty->setEnabled(false);
|
|
||||||
ShowVariable(data->DataLengthLines());
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief LengthArcs show in list lengths of arcs variables
|
|
||||||
*/
|
|
||||||
void DialogTool::LengthArcs()
|
|
||||||
{
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
checkBoxHideEmpty->setEnabled(false);
|
|
||||||
ShowVariable(data->DataLengthArcs());
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief LengthCurves show in list lengths of curves variables
|
|
||||||
*/
|
|
||||||
void DialogTool::LengthCurves()
|
|
||||||
{
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
checkBoxHideEmpty->setEnabled(false);
|
|
||||||
ShowVariable(data->DataLengthSplines());
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogTool::AngleLines()
|
|
||||||
{
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
checkBoxHideEmpty->setEnabled(false);
|
|
||||||
ShowVariable(data->DataAngleLines());
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief Increments show in list increment variables
|
|
||||||
*/
|
|
||||||
void DialogTool::Increments()
|
|
||||||
{
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
checkBoxHideEmpty->setEnabled(false);
|
|
||||||
ShowVariable(data->DataIncrements());
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief PutHere put variable into edit
|
|
||||||
*/
|
|
||||||
void DialogTool::PutHere()
|
|
||||||
{
|
|
||||||
PutValHere(plainTextEditFormula, listWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief PutVal put variable into edit
|
|
||||||
* @param item chosen item of list widget
|
|
||||||
*/
|
|
||||||
void DialogTool::PutVal(QListWidgetItem *item)
|
|
||||||
{
|
|
||||||
SCASSERT(plainTextEditFormula != nullptr);
|
|
||||||
SCASSERT(item != nullptr);
|
|
||||||
QTextCursor cursor = plainTextEditFormula->textCursor();
|
|
||||||
cursor.insertText(item->text());
|
|
||||||
plainTextEditFormula->setTextCursor(cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief ValChenged show description when current variable changed
|
|
||||||
* @param row number of row
|
|
||||||
*/
|
|
||||||
void DialogTool::ValChenged(int row)
|
|
||||||
{
|
|
||||||
SCASSERT(listWidget != nullptr);
|
|
||||||
SCASSERT(labelDescription != nullptr);
|
|
||||||
SCASSERT(radioButtonSizeGrowth != nullptr);
|
|
||||||
SCASSERT(radioButtonStandardTable != nullptr);
|
|
||||||
SCASSERT(radioButtonIncrements != nullptr);
|
|
||||||
SCASSERT(radioButtonLengthLine != nullptr);
|
|
||||||
SCASSERT(radioButtonLengthArc != nullptr);
|
|
||||||
SCASSERT(radioButtonLengthCurve != nullptr);
|
|
||||||
if (listWidget->count() == 0)
|
|
||||||
{
|
|
||||||
labelDescription->setText("");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QListWidgetItem *item = listWidget->item( row );
|
|
||||||
if (radioButtonSizeGrowth->isChecked())
|
|
||||||
{
|
|
||||||
if (item->text()==data->HeightName())
|
|
||||||
{
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->height()).arg(tr("Height"));
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
}
|
|
||||||
if (item->text()==data->SizeName())
|
|
||||||
{
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->size()).arg(tr("Size"));
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (radioButtonStandardTable->isChecked())
|
|
||||||
{
|
|
||||||
QString name = qApp->VarFromUser(item->text());
|
|
||||||
QSharedPointer<VMeasurement> stable = data->GetVariable<VMeasurement>(name);
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(name))
|
|
||||||
.arg(stable->GetGuiText());
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (radioButtonIncrements->isChecked())
|
|
||||||
{
|
|
||||||
QSharedPointer<VIncrement> incr = data->GetVariable<VIncrement>(item->text());
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(item->text()))
|
|
||||||
.arg(incr->GetDescription());
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (radioButtonLengthLine->isChecked())
|
|
||||||
{
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
|
||||||
.arg(*data->GetVariable<VLengthLine>(qApp->VarFromUser(item->text()))->GetValue())
|
|
||||||
.arg(tr("Line length"));
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (radioButtonLengthArc->isChecked())
|
|
||||||
{
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
|
||||||
.arg(*data->GetVariable<VArcLength>(qApp->VarFromUser(item->text()))->GetValue())
|
|
||||||
.arg(tr("Arc length"));
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (radioButtonLengthCurve->isChecked())
|
|
||||||
{
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
|
||||||
.arg(*data->GetVariable<VSplineLength>(qApp->VarFromUser(item->text()))->GetValue())
|
|
||||||
.arg(tr("Curve length"));
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (radioButtonAngleLine->isChecked())
|
|
||||||
{
|
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
|
||||||
.arg(*data->GetVariable<VLineAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
|
||||||
.arg(tr("Line Angle"));
|
|
||||||
labelDescription->setText(desc);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief UpdateList update lists of variables
|
|
||||||
*/
|
|
||||||
void DialogTool::UpdateList()
|
|
||||||
{
|
|
||||||
SCASSERT(radioButtonSizeGrowth != nullptr);
|
|
||||||
SCASSERT(radioButtonStandardTable != nullptr);
|
|
||||||
SCASSERT(radioButtonIncrements != nullptr);
|
|
||||||
SCASSERT(radioButtonLengthLine != nullptr);
|
|
||||||
SCASSERT(radioButtonLengthArc != nullptr);
|
|
||||||
SCASSERT(radioButtonLengthCurve != nullptr);
|
|
||||||
|
|
||||||
if (radioButtonSizeGrowth->isChecked())
|
|
||||||
{
|
|
||||||
SizeHeight();
|
|
||||||
}
|
|
||||||
if (radioButtonStandardTable->isChecked())
|
|
||||||
{
|
|
||||||
ShowVariable(data->DataMeasurements());
|
|
||||||
}
|
|
||||||
if (radioButtonIncrements->isChecked())
|
|
||||||
{
|
|
||||||
ShowVariable(data->DataIncrements());
|
|
||||||
}
|
|
||||||
if (radioButtonLengthLine->isChecked())
|
|
||||||
{
|
|
||||||
ShowVariable(data->DataLengthLines());
|
|
||||||
}
|
|
||||||
if (radioButtonLengthArc->isChecked())
|
|
||||||
{
|
|
||||||
ShowVariable(data->DataLengthArcs());
|
|
||||||
}
|
|
||||||
if (radioButtonLengthCurve->isChecked())
|
|
||||||
{
|
|
||||||
ShowVariable(data->DataLengthSplines());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
quint32 DialogTool::GetToolId() const
|
quint32 DialogTool::GetToolId() const
|
||||||
|
@ -1141,39 +865,6 @@ QString DialogTool::getPointName() const
|
||||||
return pointName;
|
return pointName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* @brief ShowVariable show variables in list
|
|
||||||
* @param var container with variables
|
|
||||||
*/
|
|
||||||
template <class key, class val>
|
|
||||||
void DialogTool::ShowVariable(const QMap<key, val> var)
|
|
||||||
{
|
|
||||||
SCASSERT(listWidget != nullptr);
|
|
||||||
SCASSERT(checkBoxHideEmpty != nullptr);
|
|
||||||
listWidget->blockSignals(true);
|
|
||||||
listWidget->clear();
|
|
||||||
labelDescription->setText("");
|
|
||||||
|
|
||||||
QMapIterator<key, val> iMap(var);
|
|
||||||
while (iMap.hasNext())
|
|
||||||
{
|
|
||||||
iMap.next();
|
|
||||||
if (checkBoxHideEmpty->isEnabled() && checkBoxHideEmpty->isChecked() && iMap.value()->IsNotUsed())
|
|
||||||
{
|
|
||||||
continue; //skip this measurement
|
|
||||||
}
|
|
||||||
if (iMap.value()->Filter(toolId) == false)
|
|
||||||
{// If we create this variable don't show
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(iMap.key());
|
|
||||||
item->setFont(QFont("Times", 12, QFont::Bold));
|
|
||||||
listWidget->addItem(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
listWidget->blockSignals(false);
|
|
||||||
listWidget->setCurrentRow (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogTool::ShowVisToolTip(const QString &toolTip)
|
void DialogTool::ShowVisToolTip(const QString &toolTip)
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,17 +111,7 @@ public slots:
|
||||||
void ArrowRightUp();
|
void ArrowRightUp();
|
||||||
void ArrowRightDown();
|
void ArrowRightDown();
|
||||||
virtual void EvalFormula();
|
virtual void EvalFormula();
|
||||||
void SizeHeight();
|
|
||||||
void Measurements();
|
|
||||||
void LengthLines();
|
|
||||||
void LengthArcs();
|
|
||||||
void LengthCurves();
|
|
||||||
void AngleLines();
|
|
||||||
void Increments();
|
|
||||||
void PutHere();
|
|
||||||
void PutVal(QListWidgetItem * item);
|
|
||||||
virtual void ValChenged(int row);
|
|
||||||
virtual void UpdateList();
|
|
||||||
virtual void PointNameChanged(){}
|
virtual void PointNameChanged(){}
|
||||||
protected:
|
protected:
|
||||||
Q_DISABLE_COPY(DialogTool)
|
Q_DISABLE_COPY(DialogTool)
|
||||||
|
@ -160,43 +150,16 @@ protected:
|
||||||
|
|
||||||
/** @brief plainTextEditFormula formula */
|
/** @brief plainTextEditFormula formula */
|
||||||
QPlainTextEdit *plainTextEditFormula;
|
QPlainTextEdit *plainTextEditFormula;
|
||||||
/** @brief listWidget listWidget with variables */
|
|
||||||
QListWidget *listWidget;
|
|
||||||
|
|
||||||
/** @brief labelResultCalculation label with result of calculation */
|
/** @brief labelResultCalculation label with result of calculation */
|
||||||
QLabel *labelResultCalculation;
|
QLabel *labelResultCalculation;
|
||||||
|
|
||||||
/** @brief labelDescription description of variable */
|
|
||||||
QLabel *labelDescription;
|
|
||||||
|
|
||||||
/** @brief labelEditNamePoint label used when need show wrong name of point */
|
/** @brief labelEditNamePoint label used when need show wrong name of point */
|
||||||
QLabel *labelEditNamePoint;
|
QLabel *labelEditNamePoint;
|
||||||
|
|
||||||
/** @brief labelEditFormula label used when need show wrong formula */
|
/** @brief labelEditFormula label used when need show wrong formula */
|
||||||
QLabel *labelEditFormula;
|
QLabel *labelEditFormula;
|
||||||
|
|
||||||
/** @brief radioButtonSizeGrowth radio button for base variables */
|
|
||||||
QRadioButton *radioButtonSizeGrowth;
|
|
||||||
|
|
||||||
/** @brief radioButtonStandardTable radio button for standard table variables */
|
|
||||||
QRadioButton *radioButtonStandardTable;
|
|
||||||
|
|
||||||
/** @brief radioButtonIncrements radio button for increments variables */
|
|
||||||
QRadioButton *radioButtonIncrements;
|
|
||||||
|
|
||||||
/** @brief radioButtonLengthLine radio button for lengths od lines variables */
|
|
||||||
QRadioButton *radioButtonLengthLine;
|
|
||||||
|
|
||||||
/** @brief radioButtonLengthArc radio button for lengths of arcs variables */
|
|
||||||
QRadioButton *radioButtonLengthArc;
|
|
||||||
|
|
||||||
/** @brief radioButtonLengthCurve radio button for lengths of curves variables */
|
|
||||||
QRadioButton *radioButtonLengthCurve;
|
|
||||||
|
|
||||||
QRadioButton *radioButtonAngleLine;
|
|
||||||
|
|
||||||
QCheckBox *checkBoxHideEmpty;
|
|
||||||
|
|
||||||
const QColor okColor;
|
const QColor okColor;
|
||||||
const QColor errorColor;
|
const QColor errorColor;
|
||||||
/**
|
/**
|
||||||
|
@ -228,11 +191,7 @@ protected:
|
||||||
|
|
||||||
virtual void CheckState();
|
virtual void CheckState();
|
||||||
QString GetComboBoxCurrentData(const QComboBox *box)const;
|
QString GetComboBoxCurrentData(const QComboBox *box)const;
|
||||||
template <class key, class val>
|
|
||||||
void ShowVariable(const QMap<key, val> var);
|
|
||||||
void ChangeCurrentData(QComboBox *box, const QVariant &value) const;
|
void ChangeCurrentData(QComboBox *box, const QVariant &value) const;
|
||||||
void PutValHere(QLineEdit *lineEdit, QListWidget *listWidget);
|
|
||||||
void PutValHere(QPlainTextEdit *plainTextEdit, QListWidget *listWidget);
|
|
||||||
void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer * timer);
|
void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer * timer);
|
||||||
void ValFormulaChanged(bool &flag, QPlainTextEdit *edit, QTimer * timer);
|
void ValFormulaChanged(bool &flag, QPlainTextEdit *edit, QTimer * timer);
|
||||||
qreal Eval(const QString &text, bool &flag, QLabel *label, const QString &postfix,
|
qreal Eval(const QString &text, bool &flag, QLabel *label, const QString &postfix,
|
||||||
|
@ -263,41 +222,6 @@ protected:
|
||||||
connect(ui->toolButtonArrowRightDown, &QPushButton::clicked, this, &DialogTool::ArrowRightDown);
|
connect(ui->toolButtonArrowRightDown, &QPushButton::clicked, this, &DialogTool::ArrowRightDown);
|
||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void InitVariables(T *ui)
|
|
||||||
{
|
|
||||||
listWidget = ui->listWidget;
|
|
||||||
labelDescription = ui->labelDescription;
|
|
||||||
radioButtonSizeGrowth = ui->radioButtonSizeGrowth;
|
|
||||||
radioButtonStandardTable = ui->radioButtonStandardTable;
|
|
||||||
radioButtonIncrements = ui->radioButtonIncrements;
|
|
||||||
radioButtonLengthLine = ui->radioButtonLengthLine;
|
|
||||||
radioButtonLengthArc = ui->radioButtonLengthArc;
|
|
||||||
radioButtonLengthCurve = ui->radioButtonLengthSpline;
|
|
||||||
radioButtonAngleLine = ui->radioButtonAngleLine;
|
|
||||||
checkBoxHideEmpty = ui->checkBoxHideEmpty;
|
|
||||||
|
|
||||||
connect(listWidget, &QListWidget::currentRowChanged, this, &DialogTool::ValChenged);
|
|
||||||
|
|
||||||
if (qApp->patternType() == MeasurementsType::Standard)
|
|
||||||
{
|
|
||||||
SizeHeight();
|
|
||||||
connect(radioButtonSizeGrowth, &QRadioButton::clicked, this, &DialogTool::SizeHeight);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
radioButtonSizeGrowth->setEnabled(false);
|
|
||||||
radioButtonStandardTable->setChecked(true);
|
|
||||||
Measurements();
|
|
||||||
}
|
|
||||||
connect(radioButtonStandardTable, &QRadioButton::clicked, this, &DialogTool::Measurements);
|
|
||||||
connect(radioButtonIncrements, &QRadioButton::clicked, this, &DialogTool::Increments);
|
|
||||||
connect(radioButtonLengthLine, &QRadioButton::clicked, this, &DialogTool::LengthLines);
|
|
||||||
connect(radioButtonLengthArc, &QRadioButton::clicked, this, &DialogTool::LengthArcs);
|
|
||||||
connect(radioButtonLengthCurve, &QRadioButton::clicked, this, &DialogTool::LengthCurves);
|
|
||||||
connect(radioButtonAngleLine, &QRadioButton::clicked, this, &DialogTool::AngleLines);
|
|
||||||
connect(checkBoxHideEmpty, &QCheckBox::stateChanged, this, &DialogTool::Measurements);
|
|
||||||
}
|
|
||||||
template <typename T>
|
|
||||||
/**
|
/**
|
||||||
* @brief InitOkCancelApply initialise OK / Cancel and Apply buttons
|
* @brief InitOkCancelApply initialise OK / Cancel and Apply buttons
|
||||||
* @param ui Dialog container
|
* @param ui Dialog container
|
||||||
|
|
|
@ -195,15 +195,6 @@ void DialogTriangle::PointNameChanged()
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogTriangle::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogTriangle::ShowVisualization()
|
void DialogTriangle::ShowVisualization()
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
virtual void PointNameChanged();
|
virtual void PointNameChanged();
|
||||||
virtual void UpdateList();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -69,15 +69,6 @@ void DialogUnionDetails::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void DialogUnionDetails::UpdateList()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Does nothing. We redefine this slot because it is only one now way block update list of variable.
|
|
||||||
* This dialog doesn't work with formula. Don't delete. Help avoid crash.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief CheckObject check if detail contain this id
|
* @brief CheckObject check if detail contain this id
|
||||||
|
|
|
@ -52,7 +52,6 @@ public:
|
||||||
int getIndexD2() const;
|
int getIndexD2() const;
|
||||||
public slots:
|
public slots:
|
||||||
void ChosenObject(quint32 id, const SceneObject &type);
|
void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
virtual void UpdateList();
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(DialogUnionDetails)
|
Q_DISABLE_COPY(DialogUnionDetails)
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,6 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons
|
||||||
connect(currentScene, &VMainGraphicsScene::ChoosedObject, dialogTool, &DialogTool::ChosenObject);
|
connect(currentScene, &VMainGraphicsScene::ChoosedObject, dialogTool, &DialogTool::ChosenObject);
|
||||||
connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||||
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||||
connect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList);
|
|
||||||
ui->view->itemClicked(nullptr);
|
ui->view->itemClicked(nullptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -360,7 +359,6 @@ void MainWindow::SetToolButtonWithApply(bool checked, Tool t, const QString &cur
|
||||||
connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||||
connect(dialogTool, &DialogTool::DialogApplied, this, applyDialogSlot);
|
connect(dialogTool, &DialogTool::DialogApplied, this, applyDialogSlot);
|
||||||
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||||
connect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList);
|
|
||||||
connect(ui->view, &VMainGraphicsView::MouseRelease, this, &MainWindow::ClickEndVisualization);
|
connect(ui->view, &VMainGraphicsView::MouseRelease, this, &MainWindow::ClickEndVisualization);
|
||||||
ui->view->itemClicked(nullptr);
|
ui->view->itemClicked(nullptr);
|
||||||
}
|
}
|
||||||
|
@ -685,8 +683,6 @@ void MainWindow::ToolUnionDetails(bool checked)
|
||||||
{
|
{
|
||||||
SetToolButton<DialogUnionDetails>(checked, Tool::UnionDetails, ":/cursor/union_cursor.png",
|
SetToolButton<DialogUnionDetails>(checked, Tool::UnionDetails, ":/cursor/union_cursor.png",
|
||||||
tr("Select detail"), &MainWindow::ClosedDialogUnionDetails);
|
tr("Select detail"), &MainWindow::ClosedDialogUnionDetails);
|
||||||
//Must disconnect this signal here.
|
|
||||||
disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -56,5 +56,7 @@
|
||||||
<file>icon/16x16/portrait.png</file>
|
<file>icon/16x16/portrait.png</file>
|
||||||
<file>icon/16x16/template.png</file>
|
<file>icon/16x16/template.png</file>
|
||||||
<file>icon/32x32/pdf.png</file>
|
<file>icon/32x32/pdf.png</file>
|
||||||
|
<file>icon/24x24/fx.png</file>
|
||||||
|
<file>icon/16x16/fx.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
BIN
src/app/share/resources/icon/16x16/fx.png
Normal file
BIN
src/app/share/resources/icon/16x16/fx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 B |
BIN
src/app/share/resources/icon/24x24/fx.png
Normal file
BIN
src/app/share/resources/icon/24x24/fx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 742 B |
|
@ -35,9 +35,7 @@ const QString VAbstractSpline::TagName = QStringLiteral("spline");
|
||||||
VAbstractSpline::VAbstractSpline(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent)
|
VAbstractSpline::VAbstractSpline(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent)
|
||||||
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), controlPoints(QVector<VControlPointSpline *>()),
|
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), controlPoints(QVector<VControlPointSpline *>()),
|
||||||
sceneType(SceneObject::Unknown), isHovered(false), detailsMode(false)
|
sceneType(SceneObject::Unknown), isHovered(false), detailsMode(false)
|
||||||
{
|
{}
|
||||||
ignoreFullUpdate = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VAbstractSpline::~VAbstractSpline()
|
VAbstractSpline::~VAbstractSpline()
|
||||||
|
|
|
@ -46,7 +46,7 @@ qreal VDrawTool::factor = 1;
|
||||||
* @param id object id in container.
|
* @param id object id in container.
|
||||||
*/
|
*/
|
||||||
VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent)
|
VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent)
|
||||||
:VAbstractTool(doc, data, id, parent), ignoreFullUpdate(false), nameActivDraw(doc->GetNameActivPP()),
|
:VAbstractTool(doc, data, id, parent), nameActivDraw(doc->GetNameActivPP()),
|
||||||
dialog(nullptr), typeLine(TypeLineLine), lineColor(ColorBlack), enabled(true)
|
dialog(nullptr), typeLine(TypeLineLine), lineColor(ColorBlack), enabled(true)
|
||||||
{
|
{
|
||||||
connect(this->doc, &VPattern::ChangedActivPP, this, &VDrawTool::ChangedActivDraw);
|
connect(this->doc, &VPattern::ChangedActivPP, this, &VDrawTool::ChangedActivDraw);
|
||||||
|
|
|
@ -72,9 +72,6 @@ public slots:
|
||||||
virtual void EnableToolMove(bool move);
|
virtual void EnableToolMove(bool move);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/** @brief ignoreFullUpdate ignore or not full updates. */
|
|
||||||
bool ignoreFullUpdate;
|
|
||||||
|
|
||||||
/** @brief nameActivDraw name of tool's pattern peace. */
|
/** @brief nameActivDraw name of tool's pattern peace. */
|
||||||
QString nameActivDraw;
|
QString nameActivDraw;
|
||||||
|
|
||||||
|
@ -142,10 +139,6 @@ protected:
|
||||||
|
|
||||||
connect(dialog, &DialogTool::DialogClosed, tool, &Tool::FullUpdateFromGuiOk);
|
connect(dialog, &DialogTool::DialogClosed, tool, &Tool::FullUpdateFromGuiOk);
|
||||||
connect(dialog, &DialogTool::DialogApplied, tool, &Tool::FullUpdateFromGuiApply);
|
connect(dialog, &DialogTool::DialogApplied, tool, &Tool::FullUpdateFromGuiApply);
|
||||||
if (ignoreFullUpdate == false)
|
|
||||||
{
|
|
||||||
connect(doc, &VPattern::FullUpdateFromFile, dialog, &DialogTool::UpdateList);
|
|
||||||
}
|
|
||||||
|
|
||||||
tool->setDialog();
|
tool->setDialog();
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ VToolHeight::VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, con
|
||||||
:VToolLinePoint(doc, data, id, typeLine, lineColor, QString(), basePointId, 0, parent), p1LineId(p1LineId),
|
:VToolLinePoint(doc, data, id, typeLine, lineColor, QString(), basePointId, 0, parent), p1LineId(p1LineId),
|
||||||
p2LineId(p2LineId)
|
p2LineId(p2LineId)
|
||||||
{
|
{
|
||||||
ignoreFullUpdate = true;
|
|
||||||
if (typeCreation == Source::FromGui)
|
if (typeCreation == Source::FromGui)
|
||||||
{
|
{
|
||||||
AddToFile();
|
AddToFile();
|
||||||
|
@ -95,7 +94,6 @@ VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene,
|
||||||
SCASSERT(dialog != nullptr);
|
SCASSERT(dialog != nullptr);
|
||||||
DialogHeight *dialogTool = qobject_cast<DialogHeight*>(dialog);
|
DialogHeight *dialogTool = qobject_cast<DialogHeight*>(dialog);
|
||||||
SCASSERT(dialogTool != nullptr);
|
SCASSERT(dialogTool != nullptr);
|
||||||
disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogHeight::UpdateList);
|
|
||||||
const QString pointName = dialogTool->getPointName();
|
const QString pointName = dialogTool->getPointName();
|
||||||
const QString typeLine = dialogTool->GetTypeLine();
|
const QString typeLine = dialogTool->GetTypeLine();
|
||||||
const QString lineColor = dialogTool->GetLineColor();
|
const QString lineColor = dialogTool->GetLineColor();
|
||||||
|
|
|
@ -54,7 +54,6 @@ VToolLine::VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstP
|
||||||
{
|
{
|
||||||
this->typeLine = typeLine;
|
this->typeLine = typeLine;
|
||||||
this->lineColor = lineColor;
|
this->lineColor = lineColor;
|
||||||
ignoreFullUpdate = true;
|
|
||||||
//Line
|
//Line
|
||||||
const QSharedPointer<VPointF> first = data->GeometricObject<VPointF>(firstPoint);
|
const QSharedPointer<VPointF> first = data->GeometricObject<VPointF>(firstPoint);
|
||||||
const QSharedPointer<VPointF> second = data->GeometricObject<VPointF>(secondPoint);
|
const QSharedPointer<VPointF> second = data->GeometricObject<VPointF>(secondPoint);
|
||||||
|
|
|
@ -53,7 +53,6 @@ VToolLineIntersect::VToolLineIntersect(VPattern *doc, VContainer *data, const qu
|
||||||
:VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
|
:VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
|
||||||
p2Line2(p2Line2)
|
p2Line2(p2Line2)
|
||||||
{
|
{
|
||||||
ignoreFullUpdate = true;
|
|
||||||
if (typeCreation == Source::FromGui)
|
if (typeCreation == Source::FromGui)
|
||||||
{
|
{
|
||||||
AddToFile();
|
AddToFile();
|
||||||
|
|
|
@ -49,7 +49,6 @@ VToolPointOfIntersection::VToolPointOfIntersection(VPattern *doc, VContainer *da
|
||||||
const Source &typeCreation, QGraphicsItem *parent)
|
const Source &typeCreation, QGraphicsItem *parent)
|
||||||
:VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId)
|
:VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId)
|
||||||
{
|
{
|
||||||
ignoreFullUpdate = true;
|
|
||||||
if (typeCreation == Source::FromGui)
|
if (typeCreation == Source::FromGui)
|
||||||
{
|
{
|
||||||
AddToFile();
|
AddToFile();
|
||||||
|
|
|
@ -54,7 +54,6 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id,
|
||||||
{
|
{
|
||||||
baseColor = Qt::red;
|
baseColor = Qt::red;
|
||||||
this->setPen(QPen(baseColor, qApp->toPixel(qApp->widthHairLine())/factor));
|
this->setPen(QPen(baseColor, qApp->toPixel(qApp->widthHairLine())/factor));
|
||||||
ignoreFullUpdate = true;
|
|
||||||
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
||||||
this->setFlag(QGraphicsItem::ItemIsFocusable, false);
|
this->setFlag(QGraphicsItem::ItemIsFocusable, false);
|
||||||
|
@ -69,6 +68,13 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VToolSinglePoint::~VToolSinglePoint()
|
||||||
|
{
|
||||||
|
//Disable cursor-arrow-openhand
|
||||||
|
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief setDialog set dialog when user want change tool option.
|
* @brief setDialog set dialog when user want change tool option.
|
||||||
|
|
|
@ -41,6 +41,7 @@ class VToolSinglePoint : public VToolPoint
|
||||||
public:
|
public:
|
||||||
VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Source &typeCreation,
|
VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Source &typeCreation,
|
||||||
const QString &namePP, const QString &mPath, QGraphicsItem * parent = nullptr );
|
const QString &namePP, const QString &mPath, QGraphicsItem * parent = nullptr );
|
||||||
|
virtual ~VToolSinglePoint();
|
||||||
virtual void setDialog();
|
virtual void setDialog();
|
||||||
static const QString ToolType;
|
static const QString ToolType;
|
||||||
virtual int type() const {return Type;}
|
virtual int type() const {return Type;}
|
||||||
|
|
|
@ -97,7 +97,10 @@ VToolSpline::VToolSpline(VPattern *doc, VContainer *data, quint32 id, const QStr
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VToolSpline::~VToolSpline()
|
VToolSpline::~VToolSpline()
|
||||||
{}
|
{
|
||||||
|
//Disable cursor-arrow-openhand
|
||||||
|
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -97,6 +97,13 @@ VToolSplinePath::VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VToolSplinePath::~VToolSplinePath()
|
||||||
|
{
|
||||||
|
//Disable cursor-arrow-openhand
|
||||||
|
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief setDialog set dialog when user want change tool option.
|
* @brief setDialog set dialog when user want change tool option.
|
||||||
|
|
|
@ -40,20 +40,21 @@ class VToolSplinePath:public VAbstractSpline
|
||||||
public:
|
public:
|
||||||
VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation,
|
VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation,
|
||||||
QGraphicsItem * parent = nullptr);
|
QGraphicsItem * parent = nullptr);
|
||||||
virtual void setDialog();
|
virtual ~VToolSplinePath();
|
||||||
static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data);
|
virtual void setDialog();
|
||||||
static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color,
|
static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data);
|
||||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse,
|
static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color,
|
||||||
const Source &typeCreation);
|
VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse,
|
||||||
static const QString ToolType;
|
const Source &typeCreation);
|
||||||
static void UpdatePathPoint(VPattern *doc, QDomNode& node, const VSplinePath &path);
|
static const QString ToolType;
|
||||||
virtual int type() const {return Type;}
|
static void UpdatePathPoint(VPattern *doc, QDomNode& node, const VSplinePath &path);
|
||||||
enum { Type = UserType + static_cast<int>(Tool::SplinePath)};
|
virtual int type() const {return Type;}
|
||||||
|
enum { Type = UserType + static_cast<int>(Tool::SplinePath)};
|
||||||
|
|
||||||
VSplinePath getSplinePath()const;
|
VSplinePath getSplinePath()const;
|
||||||
void setSplinePath(const VSplinePath &splPath);
|
void setSplinePath(const VSplinePath &splPath);
|
||||||
|
|
||||||
virtual void ShowVisualization(bool show);
|
virtual void ShowVisualization(bool show);
|
||||||
signals:
|
signals:
|
||||||
/**
|
/**
|
||||||
* @brief RefreshLine refresh control line.
|
* @brief RefreshLine refresh control line.
|
||||||
|
|
|
@ -53,7 +53,6 @@ VToolTriangle::VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id,
|
||||||
:VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId),
|
:VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId),
|
||||||
secondPointId(secondPointId)
|
secondPointId(secondPointId)
|
||||||
{
|
{
|
||||||
ignoreFullUpdate = true;
|
|
||||||
if (typeCreation == Source::FromGui)
|
if (typeCreation == Source::FromGui)
|
||||||
{
|
{
|
||||||
AddToFile();
|
AddToFile();
|
||||||
|
|
|
@ -69,6 +69,13 @@ VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePointP
|
||||||
controlLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
|
controlLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VControlPointSpline::~VControlPointSpline()
|
||||||
|
{
|
||||||
|
//Disable cursor-arrow-openhand
|
||||||
|
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VControlPointSpline::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void VControlPointSpline::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,7 @@ class VControlPointSpline : public QObject, public QGraphicsEllipseItem
|
||||||
public:
|
public:
|
||||||
VControlPointSpline(const qint32 &indexSpline, SplinePointPosition position, const QPointF &controlPoint,
|
VControlPointSpline(const qint32 &indexSpline, SplinePointPosition position, const QPointF &controlPoint,
|
||||||
const QPointF &splinePoint, QGraphicsItem * parent = nullptr);
|
const QPointF &splinePoint, QGraphicsItem * parent = nullptr);
|
||||||
|
virtual ~VControlPointSpline();
|
||||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
|
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
|
||||||
virtual int type() const {return Type;}
|
virtual int type() const {return Type;}
|
||||||
enum { Type = UserType + static_cast<int>(Vis::ControlPointSpline)};
|
enum { Type = UserType + static_cast<int>(Vis::ControlPointSpline)};
|
||||||
|
|
|
@ -70,6 +70,13 @@ VGraphicsSimpleTextItem::VGraphicsSimpleTextItem( const QString & text, QGraphic
|
||||||
this->setAcceptHoverEvents(true);
|
this->setAcceptHoverEvents(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VGraphicsSimpleTextItem::~VGraphicsSimpleTextItem()
|
||||||
|
{
|
||||||
|
//Disable cursor-arrow-openhand
|
||||||
|
VApplication::restoreOverrideCursor(cursorArrowOpenHand);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void VGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,7 @@ class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem
|
||||||
public:
|
public:
|
||||||
VGraphicsSimpleTextItem(QGraphicsItem *parent = nullptr);
|
VGraphicsSimpleTextItem(QGraphicsItem *parent = nullptr);
|
||||||
VGraphicsSimpleTextItem( const QString & text, QGraphicsItem *parent = nullptr );
|
VGraphicsSimpleTextItem( const QString & text, QGraphicsItem *parent = nullptr );
|
||||||
|
virtual ~VGraphicsSimpleTextItem();
|
||||||
|
|
||||||
qint32 FontSize()const;
|
qint32 FontSize()const;
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||||
|
|
|
@ -50,6 +50,7 @@ VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent)
|
||||||
ToolButton = new QToolButton(this);
|
ToolButton = new QToolButton(this);
|
||||||
ToolButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
ToolButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
||||||
ToolButton->setText("...");
|
ToolButton->setText("...");
|
||||||
|
ToolButton->setIcon(QIcon("://icon/16x16/fx.png"));
|
||||||
ToolButton->setFixedWidth(20);
|
ToolButton->setFixedWidth(20);
|
||||||
ToolButton->installEventFilter(this);
|
ToolButton->installEventFilter(this);
|
||||||
setFocusProxy(ToolButton); // Make the ToolButton the focus proxy
|
setFocusProxy(ToolButton); // Make the ToolButton the focus proxy
|
||||||
|
|
Loading…
Reference in New Issue
Block a user