summaryrefslogtreecommitdiff
path: root/src/main/python/main.py
diff options
context:
space:
mode:
authorBlaine2020-04-25 08:09:13 +0530
committerBlaine2020-04-25 08:09:13 +0530
commitf7ff2e807ff15b1a29093203f7e744810de94435 (patch)
tree35427fbd6bc4cd7e3bdd97ab6b27b10c1f8cb0d8 /src/main/python/main.py
parent9879d34bb984c7d4ef466c79472b3193275365b1 (diff)
downloadChemical-PFD-f7ff2e807ff15b1a29093203f7e744810de94435.tar.gz
Chemical-PFD-f7ff2e807ff15b1a29093203f7e744810de94435.tar.bz2
Chemical-PFD-f7ff2e807ff15b1a29093203f7e744810de94435.zip
implement new tab button, and context menu.
Diffstat (limited to 'src/main/python/main.py')
-rw-r--r--src/main/python/main.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py
index 8f11944..52a8a33 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -16,7 +16,6 @@ from utils.sizes import ppiList, sheetDimensionList
class appWindow(QMainWindow):
def __init__(self, parent=None):
super(appWindow, self).__init__(parent)
- # self.setWindowState(Qt.WindowMaximized)
self._defaultPPI = '72'
self._defaultCanvasSize = "A4"
@@ -46,30 +45,16 @@ class appWindow(QMainWindow):
#declare main window layout
self.mainWidget.setLayout(mainLayout)
self.setCentralWidget(self.mainWidget)
- self.resize(1280, 720)
+ self.resize(1280, 720)
+ self.setWindowState(Qt.WindowMaximized)
def createToolbar(self):
self.toolbar = QWidget(self.mainWidget)
self.toolbar.setObjectName("Toolbar")
self.toolbar.setFixedWidth(200)
toolbarLayout = QFormLayout(self.toolbar)
- self.sizeComboBox = QComboBox()
- self.sizeComboBox.addItems(sheetDimensionList)
- self.sizeComboBox.setCurrentIndex(4)
- self.sizeComboBox.activated[str].connect(self.setCanvasSize)
- sizeLabel = QLabel("Canvas Size")
- sizeLabel.setBuddy(self.sizeComboBox)
- toolbarLayout.setWidget(0, QFormLayout.LabelRole, sizeLabel)
- toolbarLayout.setWidget(0, QFormLayout.FieldRole, self.sizeComboBox)
-
- self.ppiComboBox = QComboBox()
- self.ppiComboBox.addItems(ppiList)
- self.ppiComboBox.activated[str].connect(self.setCanvasPPI)
- ppiLabel = QLabel("Canvas ppi")
- ppiLabel.setBuddy(self.ppiComboBox)
- toolbarLayout.setWidget(1, QFormLayout.LabelRole, ppiLabel)
- toolbarLayout.setWidget(1, QFormLayout.FieldRole, self.ppiComboBox)
self.toolbar.setLayout(toolbarLayout)
+
def setCanvasSize(self, size):
self._defaultCanvasSize = size