mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 19:55:53 +01:00
Code cleanup
This commit is contained in:
parent
ca7016176f
commit
815cb6cb91
@ -13,11 +13,6 @@ FileBrowser::FileBrowser(QObject *parent) : QObject(parent)
|
|||||||
_index = -1;
|
_index = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileBrowser::~FileBrowser()
|
|
||||||
{
|
|
||||||
delete _watcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileBrowser::setCurrent(const QString &path)
|
void FileBrowser::setCurrent(const QString &path)
|
||||||
{
|
{
|
||||||
QFileInfo file(path);
|
QFileInfo file(path);
|
||||||
|
@ -13,7 +13,6 @@ class FileBrowser : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
FileBrowser(QObject *parent = 0);
|
FileBrowser(QObject *parent = 0);
|
||||||
~FileBrowser();
|
|
||||||
|
|
||||||
void setFilter(const QStringList &filter);
|
void setFilter(const QStringList &filter);
|
||||||
void setCurrent(const QString &path);
|
void setCurrent(const QString &path);
|
||||||
|
@ -63,19 +63,13 @@ GraphView::GraphView(QWidget *parent)
|
|||||||
|
|
||||||
GraphView::~GraphView()
|
GraphView::~GraphView()
|
||||||
{
|
{
|
||||||
if (_xAxis->scene() != _scene)
|
|
||||||
delete _xAxis;
|
delete _xAxis;
|
||||||
if (_yAxis->scene() != _scene)
|
|
||||||
delete _yAxis;
|
delete _yAxis;
|
||||||
if (_slider->scene() != _scene)
|
|
||||||
delete _slider;
|
delete _slider;
|
||||||
if (_info->scene() != _scene)
|
|
||||||
delete _info;
|
delete _info;
|
||||||
if (_grid->scene() != _scene)
|
|
||||||
delete _grid;
|
delete _grid;
|
||||||
|
|
||||||
for (int i = 0; i < _graphs.count(); i++)
|
for (int i = 0; i < _graphs.count(); i++)
|
||||||
if (_graphs.at(i)->scene() != _scene)
|
|
||||||
delete _graphs[i];
|
delete _graphs[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,14 +96,6 @@ GUI::GUI()
|
|||||||
updateStatusBarInfo();
|
updateStatusBarInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI::~GUI()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < _tabs.size(); i++) {
|
|
||||||
if (_graphTabWidget->indexOf(_tabs.at(i)) < 0)
|
|
||||||
delete _tabs.at(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GUI::loadMaps()
|
void GUI::loadMaps()
|
||||||
{
|
{
|
||||||
_ml = new MapList(this);
|
_ml = new MapList(this);
|
||||||
@ -557,12 +549,12 @@ void GUI::createGraphTabs()
|
|||||||
_graphTabWidget->setDocumentMode(true);
|
_graphTabWidget->setDocumentMode(true);
|
||||||
#endif // Q_OS_WIN32
|
#endif // Q_OS_WIN32
|
||||||
|
|
||||||
_tabs.append(new ElevationGraph);
|
_tabs.append(new ElevationGraph(_graphTabWidget));
|
||||||
_tabs.append(new SpeedGraph);
|
_tabs.append(new SpeedGraph(_graphTabWidget));
|
||||||
_tabs.append(new HeartRateGraph);
|
_tabs.append(new HeartRateGraph(_graphTabWidget));
|
||||||
_tabs.append(new CadenceGraph);
|
_tabs.append(new CadenceGraph(_graphTabWidget));
|
||||||
_tabs.append(new PowerGraph);
|
_tabs.append(new PowerGraph(_graphTabWidget));
|
||||||
_tabs.append(new TemperatureGraph);
|
_tabs.append(new TemperatureGraph(_graphTabWidget));
|
||||||
|
|
||||||
for (int i = 0; i < _tabs.count(); i++)
|
for (int i = 0; i < _tabs.count(); i++)
|
||||||
connect(_tabs.at(i), SIGNAL(sliderPositionChanged(qreal)), this,
|
connect(_tabs.at(i), SIGNAL(sliderPositionChanged(qreal)), this,
|
||||||
|
@ -35,7 +35,6 @@ class GUI : public QMainWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
GUI();
|
GUI();
|
||||||
~GUI();
|
|
||||||
|
|
||||||
bool openFile(const QString &fileName);
|
bool openFile(const QString &fileName);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user