mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-17 16:20:48 +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;
|
QFont font;
|
||||||
font.setPixelSize(FONT_SIZE);
|
font.setPixelSize(FONT_SIZE);
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
void setSize(qreal size);
|
void setSize(qreal size);
|
||||||
void setLabel(const QString& label);
|
void setLabel(const QString& label);
|
||||||
|
|
||||||
QSizeF margin();
|
QSizeF margin() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateBoundingRect();
|
void updateBoundingRect();
|
||||||
|
@ -41,12 +41,12 @@ void FileBrowser::setFilter(const QStringList &filter)
|
|||||||
reloadDirectory(_files.last().canonicalPath());
|
reloadDirectory(_files.last().canonicalPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileBrowser::isLast()
|
bool FileBrowser::isLast() const
|
||||||
{
|
{
|
||||||
return (_files.size() > 0 && _index == _files.size() - 1);
|
return (_files.size() > 0 && _index == _files.size() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileBrowser::isFirst()
|
bool FileBrowser::isFirst() const
|
||||||
{
|
{
|
||||||
return (_files.size() > 0 && _index == 0);
|
return (_files.size() > 0 && _index == 0);
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,8 @@ public:
|
|||||||
QString last();
|
QString last();
|
||||||
QString first();
|
QString first();
|
||||||
|
|
||||||
bool isLast();
|
bool isLast() const;
|
||||||
bool isFirst();
|
bool isFirst() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void reloadDirectory(const QString &path);
|
void reloadDirectory(const QString &path);
|
||||||
|
@ -9,7 +9,7 @@ public:
|
|||||||
Tile(const QPoint &xy, int zoom)
|
Tile(const QPoint &xy, int zoom)
|
||||||
{_xy = xy; _zoom = zoom;}
|
{_xy = xy; _zoom = zoom;}
|
||||||
|
|
||||||
int zoom() {return _zoom;}
|
int zoom() const {return _zoom;}
|
||||||
QPoint& xy() {return _xy;}
|
QPoint& xy() {return _xy;}
|
||||||
QPixmap& pixmap() {return _pixmap;}
|
QPixmap& pixmap() {return _pixmap;}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class POI
|
|||||||
public:
|
public:
|
||||||
POI() : _errorLine(0) {}
|
POI() : _errorLine(0) {}
|
||||||
bool loadFile(const QString &fileName);
|
bool loadFile(const QString &fileName);
|
||||||
QString errorString() const {return _error;}
|
const QString &errorString() const {return _error;}
|
||||||
int errorLine() const {return _errorLine;}
|
int errorLine() const {return _errorLine;}
|
||||||
|
|
||||||
QVector<Waypoint> points(const QVector<QPointF> &path,
|
QVector<Waypoint> points(const QVector<QPointF> &path,
|
||||||
|
@ -14,7 +14,7 @@ public:
|
|||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget);
|
QWidget *widget);
|
||||||
|
|
||||||
QRectF area() {return _area;}
|
const QRectF &area() const {return _area;}
|
||||||
void setArea(const QRectF &area) {_area = area;}
|
void setArea(const QRectF &area) {_area = area;}
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <cmath>
|
||||||
#include "ll.h"
|
#include "ll.h"
|
||||||
#include "track.h"
|
#include "track.h"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user