Use in dialog tool's container with data after creation tool with Apply button.
--HG-- branch : develop
This commit is contained in:
parent
1cb1166824
commit
ccbdff7fb5
|
@ -272,7 +272,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="labelFirstPoint">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -338,7 +338,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="labelPointShoulder">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -383,6 +383,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBoxLineType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show line from first point to our point</string>
|
||||
</property>
|
||||
|
@ -469,7 +475,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Length of lines</string>
|
||||
<string>Length of arcs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -1075,12 +1075,6 @@ void DialogTool::ShowVariable(const QHash<key, val> *var)
|
|||
listWidget->setCurrentRow (0);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogTool::DialogApply()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogTool::ShowVisToolTip(const QString &toolTip)
|
||||
{
|
||||
|
@ -1092,3 +1086,10 @@ void DialogTool::ShowDialog(bool click)
|
|||
{
|
||||
Q_UNUSED(click);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogTool::SetAssociatedTool(VAbstractTool *tool)
|
||||
{
|
||||
this->associatedTool=tool;
|
||||
this->data = tool->getData();
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ public slots:
|
|||
/**
|
||||
* @brief DialogApply save data and emit signal DialogApplied.
|
||||
*/
|
||||
virtual void DialogApply();
|
||||
virtual void DialogApply(){}
|
||||
virtual void DialogRejected();
|
||||
void FormulaChanged();
|
||||
/**
|
||||
|
@ -110,7 +110,6 @@ public slots:
|
|||
virtual void ValChenged(int row);
|
||||
virtual void UpdateList();
|
||||
virtual void PointNameChanged(){}
|
||||
|
||||
protected:
|
||||
Q_DISABLE_COPY(DialogTool)
|
||||
|
||||
|
@ -318,10 +317,4 @@ inline VAbstractTool *DialogTool::GetAssociatedTool()
|
|||
return this->associatedTool;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline void DialogTool::SetAssociatedTool(VAbstractTool *tool)
|
||||
{
|
||||
this->associatedTool=tool;
|
||||
}
|
||||
|
||||
#endif // DIALOGTOOL_H
|
||||
|
|
|
@ -41,8 +41,8 @@ const QString VToolPoint::TagName = QStringLiteral("point");
|
|||
* @param id object id in container.
|
||||
* @param parent parent object.
|
||||
*/
|
||||
VToolPoint::VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent):VDrawTool(doc, data, id),
|
||||
QGraphicsEllipseItem(parent), radius(DefPointRadius), namePoint(0), lineName(0)
|
||||
VToolPoint::VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent)
|
||||
:VDrawTool(doc, data, id), QGraphicsEllipseItem(parent), radius(DefPointRadius), namePoint(0), lineName(0)
|
||||
{
|
||||
radius = qApp->toPixel(DefPointRadius/*mm*/, Unit::Mm);
|
||||
namePoint = new VGraphicsSimpleTextItem(this);
|
||||
|
|
|
@ -99,6 +99,7 @@ public:
|
|||
static const QStringList Styles();
|
||||
static void AddRecord(const quint32 id, const Tool &toolType, VPattern *doc);
|
||||
static Qt::PenStyle LineStyle(const QString &typeLine);
|
||||
const VContainer *getData() const;
|
||||
public slots:
|
||||
/**
|
||||
* @brief FullUpdateFromFile update tool data form file.
|
||||
|
@ -142,7 +143,6 @@ protected:
|
|||
* @brief RefreshDataInFile refresh attributes in file. If attributes don't exist create them.
|
||||
*/
|
||||
virtual void RefreshDataInFile()=0;
|
||||
const VContainer *getData() const;
|
||||
/**
|
||||
* @brief RemoveReferens decrement value of reference.
|
||||
*/
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
* @param data container with variables
|
||||
* @param parent parent object
|
||||
*/
|
||||
VDataTool::VDataTool(VContainer *data, QObject *parent): QObject(parent), data(*data), _referens(1)
|
||||
VDataTool::VDataTool(VContainer *data, QObject *parent)
|
||||
: QObject(parent), data(*data), _referens(1)
|
||||
{
|
||||
SCASSERT(data != nullptr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user