diff options
author | Blaine | 2020-04-29 13:39:32 +0530 |
---|---|---|
committer | Blaine | 2020-04-29 13:39:32 +0530 |
commit | 2268074e30d34d40a716ede92ef7bf1e1795d958 (patch) | |
tree | cb34fb75affdb9be92eea611a99c6a08979442fb /src/main/python/main.py | |
parent | 6b5859af7ae5097baa2401eb25816cc8a6191a77 (diff) | |
download | Chemical-PFD-2268074e30d34d40a716ede92ef7bf1e1795d958.tar.gz Chemical-PFD-2268074e30d34d40a716ede92ef7bf1e1795d958.tar.bz2 Chemical-PFD-2268074e30d34d40a716ede92ef7bf1e1795d958.zip |
create file tab list
Diffstat (limited to 'src/main/python/main.py')
-rw-r--r-- | src/main/python/main.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/main/python/main.py b/src/main/python/main.py index 6bd23c4..8302b09 100644 --- a/src/main/python/main.py +++ b/src/main/python/main.py @@ -4,10 +4,9 @@ import sys from fbs_runtime.application_context.PyQt5 import ApplicationContext 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, +from PyQt5.QtWidgets import (QComboBox, QFileDialog, QFormLayout, QVBoxLayout, QHBoxLayout, QLabel, QMainWindow, QMenu, QMenuBar, - QPushButton, QTabWidget, QWidget, QMdiArea, QMessageBox) + QPushButton, QWidget, QMdiArea, QListWidget) from utils.canvas import canvas from utils.fileWindow import fileWindow @@ -38,8 +37,10 @@ class appWindow(QMainWindow): self.menuGenerate.addAction("Report", self.generateReport) # create new layout for the main widget - mainLayout = QHBoxLayout(self.mainWidget) + mainLayout = QHBoxLayout() mainLayout.setObjectName("Main Layout") + fileLayout = QVBoxLayout() + fileLayout.setObjectName("file window + tabs space") self.mdi = QMdiArea(self) #create area for files to be displayed self.mdi.setObjectName('mdi area') @@ -47,8 +48,13 @@ class appWindow(QMainWindow): #create toolbar and add the toolbar plus mdi to layout self.createToolbar() mainLayout.addWidget(self.toolbar) - mainLayout.addWidget(self.mdi) + fileLayout.addWidget(self.mdi) + self.createTabSpace() + fileLayout.addWidget(self.tabSpace) + + mainLayout.addLayout(fileLayout) + #declare main window layout self.mainWidget.setLayout(mainLayout) self.setCentralWidget(self.mainWidget) @@ -63,6 +69,11 @@ class appWindow(QMainWindow): toolbarLayout = QFormLayout(self.toolbar) self.toolbar.setLayout(toolbarLayout) + def createTabSpace(self): + self.tabSpace = QListWidget(self.mainWidget) + self.tabSpace.setFlow(QListWidget.LeftToRight) + self.tabSpace.setFixedHeight(25) + def newProject(self): #call to create a new file inside mdi area project = fileWindow(self.mdi) |