Skip to content
Snippets Groups Projects
Commit e51f71bb authored by benjamin.jakimow@geo.hu-berlin.de's avatar benjamin.jakimow@geo.hu-berlin.de
Browse files

refactoring, cleanup

parent b2fb46b3
No related branches found
No related tags found
No related merge requests found
...@@ -9,38 +9,6 @@ from PyQt4.QtGui import * ...@@ -9,38 +9,6 @@ from PyQt4.QtGui import *
from PyQt4.QtCore import * from PyQt4.QtCore import *
class PictureTest(QMainWindow):
def __init__(self, parent=None, qImage=None):
super(PictureTest,self).__init__(parent)
self.setWindowTitle("Show Image with pyqt")
self.imageLabel=QLabel()
self.imageLabel.setSizePolicy(QSizePolicy.Ignored,QSizePolicy.Ignored)
self.setCentralWidget(self.imageLabel)
self.cv_img = None
if qImage:
self.addImage(qImage)
def addImage(self, qImage):
pxmap = QPixmap.fromImage(qImage)
self.addPixmap(pxmap)
def addPixmap(self, pixmap):
pxmap = pixmap.scaled(self.imageLabel.size(), Qt.KeepAspectRatio)
self.imageLabel.setPixmap(pxmap)
self.imageLabel.adjustSize()
self.imageLabel.update()
def addNumpy(self, data):
img = Array2Image(data)
self.addImage(img)
#self.resize(img.width(), img.height())
def test_gui(): def test_gui():
from timeseriesviewer.main import TimeSeriesViewer from timeseriesviewer.main import TimeSeriesViewer
...@@ -48,7 +16,7 @@ def test_gui(): ...@@ -48,7 +16,7 @@ def test_gui():
S = TimeSeriesViewer(None) S = TimeSeriesViewer(None)
S.run() S.run()
S.ua_loadTSFile(path=PATH_EXAMPLE_TIMESERIES, n_max=10) S.loadTimeSeries(path=PATH_EXAMPLE_TIMESERIES, n_max=10)
pass pass
def test_component(): def test_component():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment