Skip to content
Snippets Groups Projects
Commit fb438c62 authored by Lars Bilke's avatar Lars Bilke
Browse files

Added compiler warning -Woverloaded-virtual and fixed occuring warnings.

parent 16bf87f2
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ void QNonScalableGraphicsTextItem::paint(QPainter *painter, const QStyleOptionGr
}
/// Returns the bounding rectangle of the text item.
QRectF QNonScalableGraphicsTextItem::boundingRect()
QRectF QNonScalableGraphicsTextItem::boundingRect() const
{
QRectF rect = QGraphicsTextItem::boundingRect();
return QRectF(rect.x()-rect.width()/2, rect.y()-rect.height()/2,rect.width(), rect.height());
......
......@@ -21,7 +21,7 @@ public:
~QNonScalableGraphicsTextItem();
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect();
virtual QRectF boundingRect() const;
};
#endif //QNONSCALABLETEXTITEM_H
......@@ -41,7 +41,7 @@ void GEOModels::addPointVec( std::vector<GEOLIB::Point*> *points, std::string &n
}
bool GEOModels::appendPointVec(const std::vector<GEOLIB::Point*> &points,
std::string &name, std::vector<size_t>* ids)
const std::string &name, std::vector<size_t>* ids)
{
bool ret (GEOLIB::GEOObjects::appendPointVec (points, name, ids));
// TODO import new points into geo-treeview
......@@ -116,7 +116,7 @@ void GEOModels::addSurfaceVec( std::vector<GEOLIB::Surface*> *surfaces, const st
emit geoDataAdded(_geoModel, name, GEOLIB::SURFACE);
}
bool GEOModels::appendSurfaceVec(std::vector<GEOLIB::Surface*> &surfaces, const std::string &name)
bool GEOModels::appendSurfaceVec(const std::vector<GEOLIB::Surface*> &surfaces, const std::string &name)
{
bool ret (GEOLIB::GEOObjects::appendSurfaceVec (surfaces, name));
......
......@@ -40,23 +40,23 @@ public:
public slots:
/// Removes all parts (points, lines, surfaces) of the geometry with the given name.
void removeGeometry(std::string geo_name, GEOLIB::GEOTYPE type);
virtual void removeGeometry(std::string geo_name, GEOLIB::GEOTYPE type);
void addPointVec(std::vector<GEOLIB::Point*> *points, std::string &name, std::map<std::string, size_t>* name_pnt_id_map = NULL);
bool appendPointVec(const std::vector<GEOLIB::Point*> &points, std::string &name, std::vector<size_t>* ids = NULL);
bool removePointVec(const std::string &name);
virtual void addPointVec(std::vector<GEOLIB::Point*> *points, std::string &name, std::map<std::string, size_t>* name_pnt_id_map = NULL);
virtual bool appendPointVec(const std::vector<GEOLIB::Point*> &points, const std::string &name, std::vector<size_t>* ids = NULL);
virtual bool removePointVec(const std::string &name);
void addStationVec(std::vector<GEOLIB::Point*> *stations, std::string &name, const GEOLIB::Color* const color);
virtual void addStationVec(std::vector<GEOLIB::Point*> *stations, std::string &name, const GEOLIB::Color* const color);
void filterStationVec(const std::string &name, const std::vector<PropertyBounds> &bounds);
bool removeStationVec(const std::string &name);
virtual bool removeStationVec(const std::string &name);
void addPolylineVec(std::vector<GEOLIB::Polyline*> *lines, const std::string &name, std::map<std::string,size_t>* ply_names = NULL);
bool appendPolylineVec(const std::vector<GEOLIB::Polyline*> &polylines, const std::string &name);
bool removePolylineVec(const std::string &name);
virtual void addPolylineVec(std::vector<GEOLIB::Polyline*> *lines, const std::string &name, std::map<std::string,size_t>* ply_names = NULL);
virtual bool appendPolylineVec(const std::vector<GEOLIB::Polyline*> &polylines, const std::string &name);
virtual bool removePolylineVec(const std::string &name);
void addSurfaceVec(std::vector<GEOLIB::Surface*> *surfaces, const std::string &name, std::map<std::string,size_t>* sfc_names = NULL);
bool appendSurfaceVec(std::vector<GEOLIB::Surface*> &surfaces, const std::string &name);
bool removeSurfaceVec(const std::string &name);
virtual void addSurfaceVec(std::vector<GEOLIB::Surface*> *surfaces, const std::string &name, std::map<std::string,size_t>* sfc_names = NULL);
virtual bool appendSurfaceVec(const std::vector<GEOLIB::Surface*> &surfaces, const std::string &name);
virtual bool removeSurfaceVec(const std::string &name);
/// Calls all necessary functions to connect polyline-segments and update all views and windows.
void connectPolylineSegments(const std::string &geoName, std::vector<size_t> indexlist, double proximity, std::string ply_name, bool closePly, bool triangulatePly);
......
......@@ -25,7 +25,7 @@ public:
public slots:
/// @brief Sets the scalar visibility on this mapper.
void SetScalarVisibility(bool on);
virtual void SetScalarVisibility(bool on);
protected:
/// @brief Constructor.
......
......@@ -39,7 +39,8 @@ public:
void SetRaster(QImage &img);
/// Sets the geo-referenced origin of the image (i.e. the lower left corner)
void SetOrigin(double x, double y) { _origin.first = x; _origin.second = y; };
virtual void SetOrigin(double x, double y, double z = 0.0) { _origin.first = x; _origin.second = y; (void)z; };
virtual void SetOrigin(double* pos) { _origin.first = pos[0]; _origin.second = pos[1]; };
virtual void SetUserProperty(QString name, QVariant value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment