F(x) button for tool "Point at distance and angle".
--HG-- branch : feature
This commit is contained in:
parent
75dd335cca
commit
7baefba769
|
@ -423,13 +423,3 @@ void DialogDetail::DeleteItem()
|
|||
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 ObjectChanged(int row);
|
||||
void DeleteItem();
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
/**
|
||||
* @brief SaveData Put dialog data in local variables
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "../../visualization/vistoolendline.h"
|
||||
#include "../../widgets/vmaingraphicsscene.h"
|
||||
#include "../../tools/vabstracttool.h"
|
||||
#include "dialogeditwrongformula.h"
|
||||
#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)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
InitVariables(ui);
|
||||
InitFormulaUI(ui);
|
||||
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
|
||||
labelEditNamePoint = ui->labelEditNamePoint;
|
||||
|
@ -65,8 +65,8 @@ DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWid
|
|||
FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics());
|
||||
FillComboBoxLineColors(ui->comboBoxLineColor);
|
||||
|
||||
connect(ui->toolButtonPutHereLength, &QPushButton::clicked, this, &DialogEndLine::PutHere);
|
||||
connect(ui->toolButtonPutHereAngle, &QPushButton::clicked, this, &DialogEndLine::PutAngle);
|
||||
connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogEndLine::FXLength);
|
||||
connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogEndLine::FXAngle);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PutAngle put variable into formula of angle
|
||||
*/
|
||||
void DialogEndLine::PutAngle()
|
||||
{
|
||||
PutValHere(ui->plainTextEditAngle, ui->listWidget);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief EvalAngle calculate value of angle
|
||||
|
@ -127,6 +118,32 @@ void DialogEndLine::DeployAngleTextEdit()
|
|||
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.
|
||||
|
|
|
@ -76,10 +76,13 @@ public slots:
|
|||
* @brief FormulaTextChanged when formula text changes for validation and calc
|
||||
*/
|
||||
void FormulaTextChanged();
|
||||
void PutAngle();
|
||||
|
||||
void EvalAngle();
|
||||
void AngleTextChanged();
|
||||
void DeployAngleTextEdit();
|
||||
|
||||
void FXAngle();
|
||||
void FXLength();
|
||||
protected:
|
||||
virtual void ShowVisualization();
|
||||
/**
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>417</width>
|
||||
<height>571</height>
|
||||
<width>358</width>
|
||||
<height>323</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="labelEditFormula">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -84,6 +84,9 @@
|
|||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
@ -93,13 +96,19 @@
|
|||
</spacer>
|
||||
</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">
|
||||
<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>
|
||||
|
@ -111,6 +120,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<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">
|
||||
<string/>
|
||||
</property>
|
||||
|
@ -122,14 +137,14 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="labelResultCalculation">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>87</width>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -210,7 +225,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="labelEditAngle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -271,13 +286,19 @@
|
|||
</spacer>
|
||||
</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">
|
||||
<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>
|
||||
|
@ -289,6 +310,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<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">
|
||||
<string/>
|
||||
</property>
|
||||
|
@ -300,14 +327,14 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="labelResultCalculationAngle">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>87</width>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -384,252 +411,102 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<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>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Base point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</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 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="Expanding" 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_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>
|
||||
</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>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
|
@ -644,23 +521,12 @@
|
|||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>plainTextEditFormula</tabstop>
|
||||
<tabstop>toolButtonPutHereLength</tabstop>
|
||||
<tabstop>pushButtonGrowLength</tabstop>
|
||||
<tabstop>plainTextEditAngle</tabstop>
|
||||
<tabstop>toolButtonPutHereAngle</tabstop>
|
||||
<tabstop>pushButtonGrowLengthAngle</tabstop>
|
||||
<tabstop>comboBoxBasePoint</tabstop>
|
||||
<tabstop>lineEditNamePoint</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>
|
||||
|
|
|
@ -249,15 +249,6 @@ void DialogHeight::PointNameChanged()
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -67,7 +67,6 @@ public:
|
|||
public slots:
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void PointNameChanged();
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
virtual void ShowVisualization();
|
||||
/**
|
||||
|
|
|
@ -140,15 +140,6 @@ void DialogLine::PointNameChanged()
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -62,7 +62,6 @@ public:
|
|||
public slots:
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void PointNameChanged();
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
virtual void ShowVisualization();
|
||||
/**
|
||||
|
|
|
@ -224,15 +224,6 @@ void DialogLineIntersect::PointNameChanged()
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -65,7 +65,6 @@ public slots:
|
|||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
void PointChanged();
|
||||
virtual void PointNameChanged();
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
virtual void ShowVisualization();
|
||||
/**
|
||||
|
|
|
@ -156,15 +156,6 @@ void DialogPointOfIntersection::PointNameChanged()
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -58,7 +58,6 @@ public:
|
|||
public slots:
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void PointNameChanged();
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
virtual void ShowVisualization();
|
||||
/**
|
||||
|
|
|
@ -77,15 +77,6 @@ void DialogSinglePoint::SaveData()
|
|||
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
|
||||
|
|
|
@ -51,7 +51,6 @@ public:
|
|||
|
||||
public slots:
|
||||
void mousePress(const QPointF &scenePos);
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
/**
|
||||
* @brief SaveData Put dialog data in local variables
|
||||
|
|
|
@ -180,15 +180,6 @@ void DialogSpline::PointNameChanged()
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -74,7 +74,6 @@ public:
|
|||
public slots:
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void PointNameChanged();
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
virtual void ShowVisualization();
|
||||
/**
|
||||
|
|
|
@ -243,15 +243,6 @@ void DialogSplinePath::KAsm2Changed(qreal d)
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,6 @@ public slots:
|
|||
void Angle2Changed( qreal index );
|
||||
void KAsm1Changed(qreal d);
|
||||
void KAsm2Changed(qreal d);
|
||||
virtual void UpdateList();
|
||||
virtual void ShowDialog(bool click);
|
||||
void PathUpdated(const VSplinePath &path);
|
||||
protected:
|
||||
|
|
|
@ -1083,45 +1083,6 @@ void DialogTool::ValChenged(int row)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @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
|
||||
quint32 DialogTool::GetToolId() const
|
||||
|
|
|
@ -121,7 +121,6 @@ public slots:
|
|||
void PutHere();
|
||||
void PutVal(QListWidgetItem * item);
|
||||
virtual void ValChenged(int row);
|
||||
virtual void UpdateList();
|
||||
virtual void PointNameChanged(){}
|
||||
protected:
|
||||
Q_DISABLE_COPY(DialogTool)
|
||||
|
|
|
@ -195,15 +195,6 @@ void DialogTriangle::PointNameChanged()
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -64,7 +64,6 @@ public:
|
|||
public slots:
|
||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void PointNameChanged();
|
||||
virtual void UpdateList();
|
||||
protected:
|
||||
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
|
||||
|
|
|
@ -52,7 +52,6 @@ public:
|
|||
int getIndexD2() const;
|
||||
public slots:
|
||||
void ChosenObject(quint32 id, const SceneObject &type);
|
||||
virtual void UpdateList();
|
||||
private:
|
||||
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(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||
connect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList);
|
||||
ui->view->itemClicked(nullptr);
|
||||
}
|
||||
else
|
||||
|
@ -360,7 +359,6 @@ void MainWindow::SetToolButtonWithApply(bool checked, Tool t, const QString &cur
|
|||
connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||
connect(dialogTool, &DialogTool::DialogApplied, this, applyDialogSlot);
|
||||
connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||
connect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList);
|
||||
connect(ui->view, &VMainGraphicsView::MouseRelease, this, &MainWindow::ClickEndVisualization);
|
||||
ui->view->itemClicked(nullptr);
|
||||
}
|
||||
|
@ -685,8 +683,6 @@ void MainWindow::ToolUnionDetails(bool checked)
|
|||
{
|
||||
SetToolButton<DialogUnionDetails>(checked, Tool::UnionDetails, ":/cursor/union_cursor.png",
|
||||
tr("Select detail"), &MainWindow::ClosedDialogUnionDetails);
|
||||
//Must disconnect this signal here.
|
||||
disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -56,5 +56,6 @@
|
|||
<file>icon/16x16/portrait.png</file>
|
||||
<file>icon/16x16/template.png</file>
|
||||
<file>icon/32x32/pdf.png</file>
|
||||
<file>icon/24x24/fx.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
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)
|
||||
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), controlPoints(QVector<VControlPointSpline *>()),
|
||||
sceneType(SceneObject::Unknown), isHovered(false), detailsMode(false)
|
||||
{
|
||||
ignoreFullUpdate = true;
|
||||
}
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VAbstractSpline::~VAbstractSpline()
|
||||
|
|
|
@ -46,7 +46,7 @@ qreal VDrawTool::factor = 1;
|
|||
* @param id object id in container.
|
||||
*/
|
||||
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)
|
||||
{
|
||||
connect(this->doc, &VPattern::ChangedActivPP, this, &VDrawTool::ChangedActivDraw);
|
||||
|
|
|
@ -72,9 +72,6 @@ public slots:
|
|||
virtual void EnableToolMove(bool move);
|
||||
protected:
|
||||
|
||||
/** @brief ignoreFullUpdate ignore or not full updates. */
|
||||
bool ignoreFullUpdate;
|
||||
|
||||
/** @brief nameActivDraw name of tool's pattern peace. */
|
||||
QString nameActivDraw;
|
||||
|
||||
|
@ -142,10 +139,6 @@ protected:
|
|||
|
||||
connect(dialog, &DialogTool::DialogClosed, tool, &Tool::FullUpdateFromGuiOk);
|
||||
connect(dialog, &DialogTool::DialogApplied, tool, &Tool::FullUpdateFromGuiApply);
|
||||
if (ignoreFullUpdate == false)
|
||||
{
|
||||
connect(doc, &VPattern::FullUpdateFromFile, dialog, &DialogTool::UpdateList);
|
||||
}
|
||||
|
||||
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),
|
||||
p2LineId(p2LineId)
|
||||
{
|
||||
ignoreFullUpdate = true;
|
||||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
AddToFile();
|
||||
|
@ -95,7 +94,6 @@ VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene,
|
|||
SCASSERT(dialog != nullptr);
|
||||
DialogHeight *dialogTool = qobject_cast<DialogHeight*>(dialog);
|
||||
SCASSERT(dialogTool != nullptr);
|
||||
disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogHeight::UpdateList);
|
||||
const QString pointName = dialogTool->getPointName();
|
||||
const QString typeLine = dialogTool->GetTypeLine();
|
||||
const QString lineColor = dialogTool->GetLineColor();
|
||||
|
|
|
@ -54,7 +54,6 @@ VToolLine::VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstP
|
|||
{
|
||||
this->typeLine = typeLine;
|
||||
this->lineColor = lineColor;
|
||||
ignoreFullUpdate = true;
|
||||
//Line
|
||||
const QSharedPointer<VPointF> first = data->GeometricObject<VPointF>(firstPoint);
|
||||
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),
|
||||
p2Line2(p2Line2)
|
||||
{
|
||||
ignoreFullUpdate = true;
|
||||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
AddToFile();
|
||||
|
|
|
@ -49,7 +49,6 @@ VToolPointOfIntersection::VToolPointOfIntersection(VPattern *doc, VContainer *da
|
|||
const Source &typeCreation, QGraphicsItem *parent)
|
||||
:VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId)
|
||||
{
|
||||
ignoreFullUpdate = true;
|
||||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
AddToFile();
|
||||
|
|
|
@ -54,7 +54,6 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id,
|
|||
{
|
||||
baseColor = Qt::red;
|
||||
this->setPen(QPen(baseColor, qApp->toPixel(qApp->widthHairLine())/factor));
|
||||
ignoreFullUpdate = true;
|
||||
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
||||
this->setFlag(QGraphicsItem::ItemIsFocusable, false);
|
||||
|
|
|
@ -53,7 +53,6 @@ VToolTriangle::VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id,
|
|||
:VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId),
|
||||
secondPointId(secondPointId)
|
||||
{
|
||||
ignoreFullUpdate = true;
|
||||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
AddToFile();
|
||||
|
|
Loading…
Reference in New Issue
Block a user