F(x) button for tool Point intersect curve and axis.
--HG-- branch : feature
This commit is contained in:
parent
4221eb75ff
commit
d4403c1714
|
@ -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>
|
||||||
|
@ -196,12 +196,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
|
@ -314,162 +308,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBoxHideEmpty">
|
|
||||||
<property name="text">
|
|
||||||
<string>Hide empty measurements</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="listWidget">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Variables</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</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>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user