F(x) button for tool Point along bisector.
--HG-- branch : feature
This commit is contained in:
parent
1f3fce60de
commit
4221eb75ff
|
@ -34,6 +34,7 @@
|
|||
#include "../../visualization/vistoolbisector.h"
|
||||
#include "../../widgets/vmaingraphicsscene.h"
|
||||
#include "../../tools/vabstracttool.h"
|
||||
#include "dialogeditwrongformula.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
|
@ -46,7 +47,6 @@ DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QW
|
|||
line(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
InitVariables(ui);
|
||||
InitFormulaUI(ui);
|
||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||
labelEditNamePoint = ui->labelEditNamePoint;
|
||||
|
@ -63,9 +63,7 @@ DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QW
|
|||
FillComboBoxPoints(ui->comboBoxThirdPoint);
|
||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||
|
||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogBisector::PutHere);
|
||||
connect(listWidget, &QListWidget::itemDoubleClicked, this, &DialogBisector::PutVal);
|
||||
|
||||
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogBisector::FXLength);
|
||||
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogBisector::NamePointChanged);
|
||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogBisector::FormulaTextChanged);
|
||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogBisector::DeployFormulaTextEdit);
|
||||
|
@ -110,6 +108,19 @@ void DialogBisector::PointNameChanged()
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -79,6 +79,7 @@ public slots:
|
|||
*/
|
||||
void FormulaTextChanged();
|
||||
virtual void PointNameChanged();
|
||||
void FXLength();
|
||||
protected:
|
||||
virtual void ShowVisualization();
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>428</width>
|
||||
<height>565</height>
|
||||
<height>317</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -84,16 +84,13 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButtonPutHere">
|
||||
<property name="toolTip">
|
||||
<string>Insert marked variable into the formula</string>
|
||||
</property>
|
||||
<widget class="QToolButton" name="toolButtonExprLength">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<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 name="iconSize">
|
||||
<size>
|
||||
|
@ -199,12 +196,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
|
@ -327,156 +318,6 @@
|
|||
</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>
|
||||
<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 - Click twice to insert into formula</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelDescription">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="locale">
|
||||
|
@ -494,22 +335,12 @@
|
|||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>plainTextEditFormula</tabstop>
|
||||
<tabstop>toolButtonPutHere</tabstop>
|
||||
<tabstop>pushButtonGrowLength</tabstop>
|
||||
<tabstop>lineEditNamePoint</tabstop>
|
||||
<tabstop>comboBoxFirstPoint</tabstop>
|
||||
<tabstop>comboBoxSecondPoint</tabstop>
|
||||
<tabstop>comboBoxThirdPoint</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>
|
||||
</tabstops>
|
||||
<resources>
|
||||
|
|
Loading…
Reference in New Issue
Block a user