• R/O
  • SSH

gpxviewer: Commit

GPX Viewer repository


Commit MetaInfo

Revision6775ba2bd6ae5f742c1aeee6df8a27288ffb6405 (tree)
Time2020-05-21 22:49:49
AuthorSergey Salnikov
CommiterSergey Salnikov

Log Message

Code cleanup.

Change Summary

Incremental Difference

diff -r c064aa2b2b7b -r 6775ba2bd6ae gpxviewer/plotcanvas.py
--- a/gpxviewer/plotcanvas.py Thu May 21 18:54:06 2020 +0700
+++ b/gpxviewer/plotcanvas.py Thu May 21 20:49:49 2020 +0700
@@ -1,6 +1,6 @@
11 # gpxviewer
22 #
3-# Copyright (C) 2016-2019 Sergey Salnikov <salsergey@gmail.com>
3+# Copyright (C) 2016-2020 Sergey Salnikov <salsergey@gmail.com>
44 #
55 # This program is free software: you can redistribute it and/or modify
66 # it under the terms of the GNU General Public License version 3
@@ -16,11 +16,9 @@
1616
1717 import webbrowser
1818 from datetime import timedelta
19-from math import ceil
20-from PyQt5.QtCore import (Qt, QCoreApplication, QDate, QDateTime, QEvent, QFileSelector,
21- QMargins, QSortFilterProxyModel, pyqtSignal, pyqtSlot)
22-from PyQt5.QtGui import qAlpha, QColor, QCursor, QFont, QGuiApplication, QIcon, QPalette, QPen
23-from PyQt5.QtWidgets import QAction, QDialog, QMenu, QMessageBox, QSizePolicy
19+from PyQt5.QtCore import Qt, QCoreApplication, QDate, QDateTime, QFileSelector, QMargins, pyqtSignal, pyqtSlot
20+from PyQt5.QtGui import QColor, QCursor, QFont, QGuiApplication, QIcon, QPen
21+from PyQt5.QtWidgets import QAction, QDialog, QMenu, QMessageBox
2422 from QCustomPlot2 import (QCP, QCustomPlot, QCPAxisTickerDateTime, QCPAxisTickerFixed, QCPDataRange, QCPDataSelection,
2523 QCPGraph, QCPItemPosition, QCPItemText, QCPScatterStyle)
2624 import gpxviewer.gpxmodel as gpx
@@ -87,8 +85,7 @@
8785 self.splitLines = []
8886 self.neglectPoints = []
8987
90- @pyqtSlot()
91- def onFitWidth(self):
88+ def fitWidth(self):
9289 self.xAxis.setRange(self.xx[0], self.xx[-1])
9390 self.replot()
9491
diff -r c064aa2b2b7b -r 6775ba2bd6ae gpxviewer/plotviewer.py
--- a/gpxviewer/plotviewer.py Thu May 21 18:54:06 2020 +0700
+++ b/gpxviewer/plotviewer.py Thu May 21 20:49:49 2020 +0700
@@ -1,6 +1,6 @@
11 # gpxviewer
22 #
3-# Copyright (C) 2016-2019 Sergey Salnikov <salsergey@gmail.com>
3+# Copyright (C) 2016-2020 Sergey Salnikov <salsergey@gmail.com>
44 #
55 # This program is free software: you can redistribute it and/or modify
66 # it under the terms of the GNU General Public License version 3
@@ -104,7 +104,7 @@
104104
105105 @pyqtSlot()
106106 def onFitWidth(self):
107- self.ui.canvasWidget.onFitWidth()
107+ self.ui.canvasWidget.fitWidth()
108108
109109 @pyqtSlot()
110110 def setExportWidth(self):
Show on old repository browser