[TD]const-ness for dump function parameter

This commit is contained in:
wandererfan
2019-11-08 22:37:01 -05:00
committed by WandererFan
parent b0c9325432
commit a7ad04ba4a
19 changed files with 94 additions and 94 deletions

View File

@@ -249,7 +249,7 @@ void QGEPath::startPathEdit()
inEdit(true);
m_saveDeltas = m_deltas;
showMarkers(m_deltas);
}
}
void QGEPath::restoreState()
{
@@ -262,7 +262,7 @@ void QGEPath::restoreState()
}
m_deltas = m_saveDeltas;
updatePath();
}
}
void QGEPath::showMarkers(std::vector<QPointF> deltas)
@@ -278,7 +278,7 @@ void QGEPath::showMarkers(std::vector<QPointF> deltas)
}
clearMarkers();
int pointDx = 0;
for (auto& p: deltas) {
QGMarker* v = new QGMarker(pointDx);
@@ -308,10 +308,10 @@ void QGEPath::showMarkers(std::vector<QPointF> deltas)
v->setZValue(ZVALUE::VERTEX);
v->setPos(p * m_scale);
v->show();
m_markers.push_back(v);
pointDx++;
}
}
}
void QGEPath::clearMarkers()
@@ -373,7 +373,7 @@ void QGEPath::onEndEdit(void)
inEdit(false);
updatePath();
updateFeature(); //Q_EMIT pointsUpdated(m_deltas) ==> onLineEditComplete <<<1
clearMarkers();
clearMarkers();
}
//updates the painterpath using our deltas
@@ -504,7 +504,7 @@ void QGEPath::paint ( QPainter * painter, const QStyleOptionGraphicsItem * optio
QGIPrimPath::paint (painter, &myOption, widget);
}
void QGEPath::addPoint(unsigned int before, unsigned int after)
void QGEPath::addPoint(unsigned int before, unsigned int after)
{
std::vector<QPointF> deltaCopy = getDeltas();
unsigned int iMax = deltaCopy.size() - 1;
@@ -533,34 +533,34 @@ void QGEPath::deletePoint(unsigned int atX)
setDeltas(deltaCopy);
}
void QGEPath::dumpDeltas(char* text)
void QGEPath::dumpDeltas(const char* text)
{
int idb = 0;
for (auto& d: m_deltas) {
Base::Console().Message("QGEP - %s - delta: %d %s\n", text,
idb,TechDraw::DrawUtil::formatVector(d).c_str());
idb++;
}
}
}
void QGEPath::dumpPoints(char* text)
void QGEPath::dumpPoints(const char* text)
{
int idb = 0;
for (auto& d: m_points) {
Base::Console().Message("QGEP - %s - point: %d %s\n", text,
idb,TechDraw::DrawUtil::formatVector(d).c_str());
idb++;
}
}
}
void QGEPath::dumpMarkerPos(char* text)
void QGEPath::dumpMarkerPos(const char* text)
{
int idb = 0;
for (auto& m: m_markers) {
Base::Console().Message("QGEP - %s - markerPos: %d %s\n", text,
idb,TechDraw::DrawUtil::formatVector(m->pos()).c_str());
idb++;
}
}
}
#include <Mod/TechDraw/Gui/moc_QGEPath.cpp>

View File

@@ -118,9 +118,9 @@ public:
void updateFeature();
void drawGhost(void);
void dumpDeltas(char* text);
void dumpPoints(char* text);
void dumpMarkerPos(char* text);
void dumpDeltas(const char* text);
void dumpPoints(const char* text);
void dumpMarkerPos(const char* text);
void restoreState(void);
void setStartAdjust(double adjust);
void setEndAdjust(double adjust);

View File

@@ -709,7 +709,7 @@ int QGIView::calculateFontPixelWidth(const QFont &font)
const double QGIView::DefaultFontSizeInMM = 5.0;
void QGIView::dumpRect(char* text, QRectF r) {
void QGIView::dumpRect(const char* text, QRectF r) {
Base::Console().Message("DUMP - %s - rect: (%.3f,%.3f) x (%.3f,%.3f)\n",text,
r.left(),r.top(),r.right(),r.bottom());
}

View File

@@ -137,7 +137,7 @@ protected:
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
virtual QRectF customChildrenBoundingRect(void) const;
void dumpRect(char* text, QRectF r);
void dumpRect(const char* text, QRectF r);
QString getPrefFont(void);
double getPrefFontSize(void);