-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMapModule.py
45 lines (37 loc) · 1.18 KB
/
MapModule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import matplotlib.pyplot as plt
from PySide import QtWebKit
from PySide import QtCore
from PySide import QtGui
import numpy as np
import sys
import os
class Map(QtGui.QMainWindow):
def __init__(self, parent):
super(Map, self).__init__(parent)
self.initUI()
self.create_main_frame()
self.state = True
def initUI(self):
QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))
self.setGeometry(300, 300, 250, 150)
self.showMaximized()
self.setWindowTitle('ATLAS Map Widget')
self.setWindowIcon(QtGui.QIcon('ATLAS LOGO.png'))
self.exitAction = QtGui.QAction('Exit', self)
self.exitAction.triggered.connect(self.closeEvent)
self.exitAction.setShortcut("Esc")
def create_main_frame(self):
self.main_frame = QtWebKit.QWebView()
self.main_frame.load(QtCore.QUrl('file:///C:\ATLAS\_map.html'))
self.setCentralWidget(self.main_frame)
def reload(self):
self.main_frame.load(QtCore.QUrl('file:///C:\ATLAS\_map.html'))
def closeEvent(self, event):
self.close()
self.state = False
event.accept()
def get_state(self):
return self.state
#app = QtGui.QApplication(sys.argv)
#M = Map(None)
#sys.exit(app.exec_())