-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
36 lines (33 loc) · 1.08 KB
/
app.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
from PyQt5 import QtWidgets, QtCore, uic
from PyQt5.QtWidgets import QApplication, QMainWindow
import sys, os
# custom modules
import GwConfig, GwText, GwData, GwParse
# setup main window ui from designer file
uifile = "test.ui"
Ui_MainWindow, QtBaseClass = uic.loadUiType(uifile)
class Wiki(QMainWindow, Ui_MainWindow):
def __init__(self):
QMainWindow.__init__(self)
Ui_MainWindow.__init__(self)
self.setupUi(self)
self.setWindowTitle('GAMEWIKI')
# set up configuration
self.config = GwConfig.GwConfig(self)
self.config.Load()
self.data = GwData.GwData(self)
# connect buttons to functions
self.actionOpen_Project.triggered.connect(self.data.OpenProjectDialog)
# initialize tree
self.data.SetProjectPath(self.config.LastProject)
self.treeView_2.clicked.connect(self.data.OpenClickedFile)
# set up a var for our last open path
self.openFilePath = ''
# set up text processing
self.parser = GwParse.GwParse(self)
self.text = GwText.GwText(self)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = Wiki()
window.show()
sys.exit(app.exec_())