Vera++.
--HG-- branch : feature
This commit is contained in:
parent
25e6df1c1d
commit
79f2ddde2a
|
@ -31,7 +31,8 @@
|
|||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class DialogIndividualMeasurements;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class DialogMeasurements;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
#include <QDialog>
|
||||
#include "../../xml/vpattern.h"
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class DialogPatternProperties;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
namespace Ui
|
||||
{
|
||||
class DialogStandardMeasurements;
|
||||
}
|
||||
|
||||
|
|
|
@ -389,7 +389,8 @@ protected:
|
|||
* @param id don't show this id in list
|
||||
* @param cut if set to ComboMode::CutSpline don't show id+1 and id+2
|
||||
*/
|
||||
void setCurrentSplinePathId(QComboBox *box, quint32 &splinePathId, const quint32 &value, const quint32 &id,
|
||||
void setCurrentSplinePathId(QComboBox *box, quint32 &splinePathId, const quint32 &value,
|
||||
const quint32 &id,
|
||||
ComboMode::ComboBoxCutSpline cut = ComboMode::NoCutSpline) const;
|
||||
/**
|
||||
* @brief getCurrentPointId return current point id in combobox
|
||||
|
|
|
@ -72,7 +72,8 @@ bool DialogUnionDetails::CheckObject(const quint32 &id, const quint32 &idDetail)
|
|||
return det.Containes(id);
|
||||
}
|
||||
|
||||
void DialogUnionDetails::ChoosedDetail(const quint32 &id, const Scene::Scenes &type, quint32 &idDetail, ptrdiff_t &index)
|
||||
void DialogUnionDetails::ChoosedDetail(const quint32 &id, const Scene::Scenes &type, quint32 &idDetail,
|
||||
ptrdiff_t &index)
|
||||
{
|
||||
if (idDetail == 0)
|
||||
{
|
||||
|
|
|
@ -1258,10 +1258,14 @@ bool MainWindow::MaybeSave()
|
|||
"Do you want to save your changes?"),
|
||||
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
||||
if (ret == QMessageBox::Save)
|
||||
{
|
||||
return Save();
|
||||
}
|
||||
else if (ret == QMessageBox::Cancel)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -530,7 +530,7 @@ void TableWindow::PdfToPs(const QString &name, const QStringList ¶ms) const
|
|||
qDebug() << proc.errorString();
|
||||
|
||||
QFile f(name);
|
||||
if (!f.exists())
|
||||
if (f.exists() == false)
|
||||
{
|
||||
QMessageBox msgBox(QMessageBox::Critical, "Critical error!", "Creating file '"+name+"' failed!",
|
||||
QMessageBox::Ok | QMessageBox::Default);
|
||||
|
|
|
@ -32,10 +32,9 @@
|
|||
|
||||
const QString VToolBisector::ToolType = QStringLiteral("bisector");
|
||||
|
||||
VToolBisector::VToolBisector(VPattern *doc, VContainer *data, const quint32 &id,
|
||||
const QString &typeLine, const QString &formula, const quint32 &firstPointId,
|
||||
const quint32 &secondPointId, const quint32 &thirdPointId, const Tool::Sources &typeCreation,
|
||||
QGraphicsItem *parent)
|
||||
VToolBisector::VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
|
||||
const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId,
|
||||
const quint32 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
|
||||
:VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), thirdPointId(0)
|
||||
{
|
||||
this->firstPointId = firstPointId;
|
||||
|
|
|
@ -78,8 +78,8 @@ void VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *
|
|||
Create(0, firstPoint, secondPoint, typeLine, scene, doc, data, Document::FullParse, Tool::FromGui);
|
||||
}
|
||||
|
||||
void VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
void VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint,
|
||||
const QString &typeLine, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Tool::Sources &typeCreation)
|
||||
{
|
||||
Q_CHECK_PTR(scene);
|
||||
|
|
|
@ -78,8 +78,8 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine,
|
||||
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
static void Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint,
|
||||
const QString &typeLine, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
|
||||
const Document::Documents &parse, const Tool::Sources &typeCreation);
|
||||
static const QString TagName;
|
||||
public slots:
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder");
|
||||
|
||||
VToolShoulderPoint::VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id,
|
||||
const QString &typeLine, const QString &formula, const quint32 &p1Line,
|
||||
const quint32 &p2Line, const quint32 &pShoulder, const Tool::Sources &typeCreation,
|
||||
VToolShoulderPoint::VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
|
||||
const QString &formula, const quint32 &p1Line, const quint32 &p2Line,
|
||||
const quint32 &pShoulder, const Tool::Sources &typeCreation,
|
||||
QGraphicsItem * parent)
|
||||
:VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder)
|
||||
{
|
||||
|
|
|
@ -262,22 +262,22 @@ Qt::PenStyle VAbstractTool::LineStyle()
|
|||
QStringList styles = Styles();
|
||||
switch (styles.indexOf(typeLine))
|
||||
{
|
||||
case 0:
|
||||
case 0: // TypeLineNone
|
||||
return Qt::NoPen;
|
||||
break;
|
||||
case 1:
|
||||
case 1: // TypeLineLine
|
||||
return Qt::SolidLine;
|
||||
break;
|
||||
case 2:
|
||||
case 2: // TypeLineDashLine
|
||||
return Qt::DashLine;
|
||||
break;
|
||||
case 3:
|
||||
case 3: // TypeLineDotLine
|
||||
return Qt::DotLine;
|
||||
break;
|
||||
case 4:
|
||||
case 4: // TypeLineDashDotLine
|
||||
return Qt::DashDotLine;
|
||||
break;
|
||||
case 5:
|
||||
case 5: // TypeLineDashDotDotLine
|
||||
return Qt::DashDotDotLine;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -80,9 +80,10 @@ public:
|
|||
* @param parse parser file mode.
|
||||
* @param typeCreation way we create this tool.
|
||||
*/
|
||||
static void Create(const quint32 _id, const VDetail &d1, const VDetail &d2, const quint32 &d1id, const quint32 &d2id,
|
||||
const quint32 &indexD1, const quint32 &indexD2, VMainGraphicsScene *scene, VPattern *doc,
|
||||
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
|
||||
static void Create(const quint32 _id, const VDetail &d1, const VDetail &d2, const quint32 &d1id,
|
||||
const quint32 &d2id, const quint32 &indexD1, const quint32 &indexD2, VMainGraphicsScene *scene,
|
||||
VPattern *doc, VContainer *data, const Document::Documents &parse,
|
||||
const Tool::Sources &typeCreation);
|
||||
/**
|
||||
* @brief GetDetailFromFile parse detail from file.
|
||||
* @param doc dom document container.
|
||||
|
|
|
@ -624,7 +624,8 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
<< VToolLineIntersect::ToolType << VToolPointOfContact::ToolType << VNodePoint::ToolType
|
||||
<< VToolHeight::ToolType << VToolTriangle::ToolType << VToolPointOfIntersection::ToolType
|
||||
<< VToolCutSpline::ToolType << VToolCutSplinePath::ToolType << VToolCutArc::ToolType;
|
||||
switch(points.indexOf(type)) {
|
||||
switch (points.indexOf(type))
|
||||
{
|
||||
case 0: //VToolSinglePoint::ToolType
|
||||
{
|
||||
VToolSinglePoint *spoint = 0;
|
||||
|
@ -747,8 +748,8 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
|
||||
const qreal angle = GetParametrDouble(domElement, VAbstractTool::AttrAngle, "0.0");
|
||||
|
||||
VToolNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name,
|
||||
angle, mx, my, scene, this,data, parse, Tool::FromFile);
|
||||
VToolNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name, angle, mx, my, scene,
|
||||
this, data, parse, Tool::FromFile);
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -815,8 +816,8 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
|
||||
const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
|
||||
|
||||
VToolPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name,
|
||||
mx, my, scene, this,data, parse, Tool::FromFile);
|
||||
VToolPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name, mx, my, scene, this,
|
||||
data, parse, Tool::FromFile);
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -834,8 +835,8 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const VPointF *point = data->GeometricObject<const VPointF *>(idObject );
|
||||
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
|
||||
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
|
||||
data->UpdateGObject(id, new VPointF(point->x(), point->y(), point->name(),
|
||||
mx, my, idObject,Draw::Modeling));
|
||||
data->UpdateGObject(id, new VPointF(point->x(), point->y(), point->name(), mx, my, idObject,
|
||||
Draw::Modeling));
|
||||
VNodePoint::Create(this, data, id, idObject, parse, Tool::FromFile, idTool);
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
|
@ -900,8 +901,8 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
|
||||
const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
|
||||
|
||||
VToolPointOfIntersection::Create(id, name, firstPointId, secondPointId,
|
||||
mx, my, scene, this, data, parse,Tool::FromFile);
|
||||
VToolPointOfIntersection::Create(id, name, firstPointId, secondPointId, mx, my, scene, this, data,
|
||||
parse, Tool::FromFile);
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
{
|
||||
|
@ -1006,7 +1007,8 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
|
|||
|
||||
QStringList splines;
|
||||
splines << VToolSpline::ToolType << VToolSplinePath::ToolType << VNodeSpline::ToolType << VNodeSplinePath::ToolType;
|
||||
switch(splines.indexOf(type)) {
|
||||
switch (splines.indexOf(type))
|
||||
{
|
||||
case 0: //VToolSpline::ToolType
|
||||
try
|
||||
{
|
||||
|
@ -1130,7 +1132,8 @@ void VPattern::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &dom
|
|||
QStringList arcs;
|
||||
arcs << VToolArc::ToolType << VNodeArc::ToolType;
|
||||
|
||||
switch(arcs.indexOf(type)) {
|
||||
switch (arcs.indexOf(type))
|
||||
{
|
||||
case 0: //VToolArc::ToolType
|
||||
try
|
||||
{
|
||||
|
@ -1185,7 +1188,8 @@ void VPattern::ParseToolsElement(VMainGraphicsScene *scene, const QDomElement &d
|
|||
QStringList tools;
|
||||
tools << VToolUnionDetails::ToolType;
|
||||
|
||||
switch(tools.indexOf(type)) {
|
||||
switch (tools.indexOf(type))
|
||||
{
|
||||
case 0: //VToolUnionDetails::ToolType
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user