1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2016-03-19 17:24:53 +01:00
parent 17ab241a6d
commit a80de92691
8 changed files with 10 additions and 9 deletions

View File

@ -147,7 +147,7 @@ void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
*/
}
QSizeF AxisItem::margin()
QSizeF AxisItem::margin() const
{
QFont font;
font.setPixelSize(FONT_SIZE);

View File

@ -18,7 +18,7 @@ public:
void setSize(qreal size);
void setLabel(const QString& label);
QSizeF margin();
QSizeF margin() const;
private:
void updateBoundingRect();

View File

@ -41,12 +41,12 @@ void FileBrowser::setFilter(const QStringList &filter)
reloadDirectory(_files.last().canonicalPath());
}
bool FileBrowser::isLast()
bool FileBrowser::isLast() const
{
return (_files.size() > 0 && _index == _files.size() - 1);
}
bool FileBrowser::isFirst()
bool FileBrowser::isFirst() const
{
return (_files.size() > 0 && _index == 0);
}

View File

@ -23,8 +23,8 @@ public:
QString last();
QString first();
bool isLast();
bool isFirst();
bool isLast() const;
bool isFirst() const;
private slots:
void reloadDirectory(const QString &path);

View File

@ -9,7 +9,7 @@ public:
Tile(const QPoint &xy, int zoom)
{_xy = xy; _zoom = zoom;}
int zoom() {return _zoom;}
int zoom() const {return _zoom;}
QPoint& xy() {return _xy;}
QPixmap& pixmap() {return _pixmap;}

View File

@ -14,7 +14,7 @@ class POI
public:
POI() : _errorLine(0) {}
bool loadFile(const QString &fileName);
QString errorString() const {return _error;}
const QString &errorString() const {return _error;}
int errorLine() const {return _errorLine;}
QVector<Waypoint> points(const QVector<QPointF> &path,

View File

@ -14,7 +14,7 @@ public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
QRectF area() {return _area;}
const QRectF &area() const {return _area;}
void setArea(const QRectF &area) {_area = area;}
void clear();

View File

@ -1,3 +1,4 @@
#include <cmath>
#include "ll.h"
#include "track.h"