Improve Formula Wizard.

Improve support for multi line expressions.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-01-24 22:09:45 +02:00
parent 54d3ae7561
commit 615decb625
3 changed files with 204 additions and 251 deletions

View File

@ -94,7 +94,6 @@ DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const qui
connect(ui->tableWidget, &QTableWidget::itemDoubleClicked, this, &DialogEditWrongFormula::PutVal);
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogEditWrongFormula::FormulaChanged);
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogEditWrongFormula::DeployFormulaTextEdit);
//Disable Qt::WaitCursor
#ifndef QT_NO_CURSOR
@ -140,12 +139,6 @@ void DialogEditWrongFormula::DialogRejected()
rejected();
}
//---------------------------------------------------------------------------------------------------------------------
void DialogEditWrongFormula::DeployFormulaTextEdit()
{
DeployFormula(ui->plainTextEditFormula, ui->pushButtonGrowLength, formulaBaseHeight);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogEditWrongFormula::EvalFormula()
{

View File

@ -73,10 +73,6 @@ public:
public slots:
virtual void DialogAccepted() Q_DECL_OVERRIDE;
virtual void DialogRejected() Q_DECL_OVERRIDE;
/**
* @brief DeployFormulaTextEdit grow or shrink formula input
*/
void DeployFormulaTextEdit();
virtual void EvalFormula() Q_DECL_OVERRIDE;
void ValChanged(int row);
void PutHere();

View File

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>448</width>
<height>526</height>
<height>478</height>
</rect>
</property>
<property name="windowTitle">
@ -147,8 +147,10 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="VPlainTextEdit" name="plainTextEditFormula">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@ -156,10 +158,10 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<property name="baseSize">
<size>
<width>16777215</width>
<height>28</height>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
@ -169,45 +171,7 @@
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonGrowLength">
<property name="maximumSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Show full calculation in message box&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="icon">
<iconset theme="go-down">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QWidget" name="">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
@ -405,6 +369,8 @@
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QLabel" name="labelDescription">
@ -436,9 +402,7 @@
</customwidget>
</customwidgets>
<tabstops>
<tabstop>plainTextEditFormula</tabstop>
<tabstop>toolButtonPutHere</tabstop>
<tabstop>pushButtonGrowLength</tabstop>
<tabstop>radioButtonStandardTable</tabstop>
<tabstop>radioButtonIncrements</tabstop>
<tabstop>radioButtonLengthLine</tabstop>