mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Code cleanup
This commit is contained in:
parent
17ab241a6d
commit
a80de92691
@ -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);
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
void setSize(qreal size);
|
||||
void setLabel(const QString& label);
|
||||
|
||||
QSizeF margin();
|
||||
QSizeF margin() const;
|
||||
|
||||
private:
|
||||
void updateBoundingRect();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <cmath>
|
||||
#include "ll.h"
|
||||
#include "track.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user