diff --git a/GlowstoneBlock.py b/GlowstoneBlock.py index cf39414..bb78c34 100644 --- a/GlowstoneBlock.py +++ b/GlowstoneBlock.py @@ -1,15 +1,20 @@ import sys -from PyQt5.QtWidgets import QApplication, QWidget +from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QPushButton +from PyQt5.Qt import QStandardItemModel, QStandardItem from PyQt5.QtGui import QIcon +from PyQt5.QtCore import pyqtSlot +import json + +import GlowstoneDust -class App(QWidget): +class App(QMainWindow): def __init__(self): super().__init__() self.title = 'Project Glowstone: Block Edition' - self.left = 10 - self.top = 10 + self.left = 300 + self.top = 300 self.width = 640 self.height = 480 self.initUI() @@ -17,8 +22,26 @@ class App(QWidget): def initUI(self): self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height) + + button = QPushButton('Button Label Go Here', self) + button.setToolTip('Example Button') + button.setGeometry(100, 70, 200, 80) + # button.move(100, 70) + button.clicked.connect(self.make_tree) + + self.statusBar().showMessage('Message') self.show() + @pyqtSlot() + def on_click(self): + print('PyQt5 button click') + + @pyqtSlot() + def make_tree(self): + print("Making mod tree...") + modpack_info = GlowstoneDust.get_modpack_info('.') + print(json.dumps(modpack_info)) + if __name__ == '__main__': app = QApplication(sys.argv)