diff options
author | Blaine | 2020-04-22 13:28:05 +0530 |
---|---|---|
committer | Blaine | 2020-04-22 13:28:05 +0530 |
commit | a5043df3e40ca56823ed6bbfe5085331b80dde47 (patch) | |
tree | 2b613c4fb09a0a35e323799e8a0e89d8288384f6 /src/main/python/main.py | |
parent | 89eeec65b7307df11c59d9dca8089f0ae62b3a47 (diff) | |
download | Chemical-PFD-a5043df3e40ca56823ed6bbfe5085331b80dde47.tar.gz Chemical-PFD-a5043df3e40ca56823ed6bbfe5085331b80dde47.tar.bz2 Chemical-PFD-a5043df3e40ca56823ed6bbfe5085331b80dde47.zip |
imports sorted
Diffstat (limited to 'src/main/python/main.py')
-rw-r--r-- | src/main/python/main.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py index ebc80a2..41eafb0 100644 --- a/src/main/python/main.py +++ b/src/main/python/main.py @@ -1,14 +1,17 @@ +import pickle +import sys + from fbs_runtime.application_context.PyQt5 import ApplicationContext -from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot, QObject -from PyQt5.QtGui import (QBrush, QColor, QImage, QPainter, - QPalette) -from PyQt5.QtWidgets import (QWidget, QComboBox, QMainWindow, QGraphicsScene, - QGraphicsView, QGridLayout, QHBoxLayout, QLabel, - QPushButton, QMenuBar, QMenu, QFormLayout, QTabWidget) +from PyQt5.QtCore import QObject, Qt, pyqtSignal, pyqtSlot +from PyQt5.QtGui import QBrush, QColor, QImage, QPainter, QPalette +from PyQt5.QtWidgets import (QComboBox, QFileDialog, QFormLayout, + QGraphicsScene, QGraphicsView, QGridLayout, + QHBoxLayout, QLabel, QMainWindow, QMenu, QMenuBar, + QPushButton, QTabWidget, QWidget) from utils.canvas import canvas -from utils.sizes import sheetDimensionList, ppiList -import sys +from utils.sizes import ppiList, sheetDimensionList + class appWindow(QMainWindow): def __init__(self, parent=None): @@ -97,7 +100,10 @@ class appWindow(QMainWindow): pass def saveDiagram(self): - pass + name = QFileDialog.getSaveFileName(self, 'Save File', 'New Diagram', 'Process Flow Diagram (*.pfd)') + with open(name[0],'w') as file: + for i in range(self.tabber.count()): + file.write(self.tabber.widget(i)) def saveImage(self): # activeDiagram = QGraphicsScene() @@ -112,4 +118,4 @@ if __name__ == '__main__': test = appWindow() test.show() exit_code = app.app.exec_() # 2. Invoke appctxt.app.exec_() - sys.exit(exit_code)
\ No newline at end of file + sys.exit(exit_code) |