diff --git a/src/warchron/view/ui/ui_main_window.py b/src/warchron/view/ui/ui_main_window.py index 04374bf..8e1cd65 100644 --- a/src/warchron/view/ui/ui_main_window.py +++ b/src/warchron/view/ui/ui_main_window.py @@ -70,12 +70,12 @@ class Ui_MainWindow(object): spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.verticalLayout_3.addLayout(self.horizontalLayout_2) - self.horizontalLayout_6 = QtWidgets.QHBoxLayout() - self.horizontalLayout_6.setObjectName("horizontalLayout_6") - self.warsTree = QtWidgets.QTreeWidget(parent=self.warsTab) + self.splitter = QtWidgets.QSplitter(parent=self.warsTab) + self.splitter.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.splitter.setObjectName("splitter") + self.warsTree = QtWidgets.QTreeWidget(parent=self.splitter) self.warsTree.setObjectName("warsTree") - self.horizontalLayout_6.addWidget(self.warsTree) - self.selectedDetailsStack = QtWidgets.QStackedWidget(parent=self.warsTab) + self.selectedDetailsStack = QtWidgets.QStackedWidget(parent=self.splitter) self.selectedDetailsStack.setObjectName("selectedDetailsStack") self.pageEmpty = QtWidgets.QWidget() self.pageEmpty.setObjectName("pageEmpty") @@ -137,8 +137,6 @@ class Ui_MainWindow(object): self.addObjectiveBtn.setObjectName("addObjectiveBtn") self.horizontalLayout_9.addWidget(self.addObjectiveBtn) self.gridLayout_3.addLayout(self.horizontalLayout_9, 2, 0, 1, 4) - spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.gridLayout_3.addItem(spacerItem4, 5, 3, 1, 1) self.endWarBtn = QtWidgets.QPushButton(parent=self.pageWar) self.endWarBtn.setEnabled(True) self.endWarBtn.setObjectName("endWarBtn") @@ -179,8 +177,8 @@ class Ui_MainWindow(object): self.endCampaignBtn.setEnabled(True) self.endCampaignBtn.setObjectName("endCampaignBtn") self.gridLayout_4.addWidget(self.endCampaignBtn, 5, 1, 1, 1) - spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.gridLayout_4.addItem(spacerItem5, 5, 2, 1, 1) + spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.gridLayout_4.addItem(spacerItem4, 5, 2, 1, 1) self.horizontalLayout_12 = QtWidgets.QHBoxLayout() self.horizontalLayout_12.setObjectName("horizontalLayout_12") self.campaignParticipantsTable = QtWidgets.QTableWidget(parent=self.pageCampaign) @@ -256,8 +254,8 @@ class Ui_MainWindow(object): self.endRoundBtn.setEnabled(True) self.endRoundBtn.setObjectName("endRoundBtn") self.gridLayout_5.addWidget(self.endRoundBtn, 5, 1, 1, 1) - spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.gridLayout_5.addItem(spacerItem6, 5, 2, 1, 1) + spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.gridLayout_5.addItem(spacerItem5, 5, 2, 1, 1) self.horizontalLayout_15 = QtWidgets.QHBoxLayout() self.horizontalLayout_15.setObjectName("horizontalLayout_15") self.battlesTable = QtWidgets.QTableWidget(parent=self.pageRound) @@ -304,15 +302,14 @@ class Ui_MainWindow(object): self.horizontalLayout_14.addWidget(self.roundNb) self.gridLayout_5.addLayout(self.horizontalLayout_14, 0, 0, 1, 3) self.selectedDetailsStack.addWidget(self.pageRound) - self.horizontalLayout_6.addWidget(self.selectedDetailsStack) - self.verticalLayout_3.addLayout(self.horizontalLayout_6) + self.verticalLayout_3.addWidget(self.splitter) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/swords-small.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) self.tabWidget.addTab(self.warsTab, icon2, "") self.verticalLayout.addWidget(self.tabWidget) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(parent=MainWindow) - self.menubar.setGeometry(QtCore.QRect(0, 0, 1288, 31)) + self.menubar.setGeometry(QtCore.QRect(0, 0, 1288, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(parent=self.menubar) self.menuFile.setObjectName("menuFile") @@ -387,7 +384,7 @@ class Ui_MainWindow(object): self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(1) - self.selectedDetailsStack.setCurrentIndex(3) + self.selectedDetailsStack.setCurrentIndex(1) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): diff --git a/src/warchron/view/ui/ui_main_window.ui b/src/warchron/view/ui/ui_main_window.ui index 49cde9f..0be2351 100644 --- a/src/warchron/view/ui/ui_main_window.ui +++ b/src/warchron/view/ui/ui_main_window.ui @@ -137,490 +137,476 @@ - - - - - - - - - - - - - - 3 + + + Qt::Horizontal + + + + + - - - - - - QLayout::SetDefaultConstraint - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Select an element within the tree to show/edit details. - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - Name - - - - - Faction - - - - - Campaigns - - - - - Victory pts. - - - - - Theme pts - - - - - - - - Add participant - - - - - - - - - - - - Name - - - - - Description - - - - - - - - true - - - - 10 - - - - Add objective - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - true - - - End war - - - - - - - Participants - - - - - - - Objectives - - - - - - - - - - 12 - - - - warName - - - - - - - - 12 - - - - warYear - - - - - - - - - - - - - Sectors - - - - - - - Participants - - - - - - - true - - - End campaign - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Name - - - - - Leader - - - - - Theme - - - - - Victory pts. - - - - - Theme pts. - - - - - - - - Add participant - - - - - - - - - - - - Name - - - - - Round - - - - - Major obj. - - - - - Minor opp. - - - - - Influence imp. - - - - - Description - - - - - - - - true - - - Add Sector - - - - - - - - - - - - 12 - - - - campaignName - - - - - - - - 12 - - - - campaignMonth - - - - - - - - - - - - - Choices - - - - - - - Battles - - - - - - - true - - - End round - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Sector - - - - - Player 1 - - - - - Player 2 - - - - - - - - false - - - Count results - - - - - - - - - - - - Player - - - - - Priority - - - - - Secondary - - - - - - - - true - - - Resolve pairing - - - - - - - - - - - - 12 - - - - Round Nb - - - - - - - + + + + + 1 + + + + + + + QLayout::SetDefaultConstraint + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Select an element within the tree to show/edit details. + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + - - + + + + + + + + + Name + + + + + Faction + + + + + Campaigns + + + + + Victory pts. + + + + + Theme pts + + + + + + + + Add participant + + + + + + + + + + + + Name + + + + + Description + + + + + + + + true + + + + 10 + + + + Add objective + + + + + + + + + true + + + End war + + + + + + + Participants + + + + + + + Objectives + + + + + + + + + + 12 + + + + warName + + + + + + + + 12 + + + + warYear + + + + + + + + + + + + + Sectors + + + + + + + Participants + + + + + + + true + + + End campaign + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Name + + + + + Leader + + + + + Theme + + + + + Victory pts. + + + + + Theme pts. + + + + + + + + Add participant + + + + + + + + + + + + Name + + + + + Round + + + + + Major obj. + + + + + Minor opp. + + + + + Influence imp. + + + + + Description + + + + + + + + true + + + Add Sector + + + + + + + + + + + + 12 + + + + campaignName + + + + + + + + 12 + + + + campaignMonth + + + + + + + + + + + + + Choices + + + + + + + Battles + + + + + + + true + + + End round + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Sector + + + + + Player 1 + + + + + Player 2 + + + + + + + + false + + + Count results + + + + + + + + + + + + Player + + + + + Priority + + + + + Secondary + + + + + + + + true + + + Resolve pairing + + + + + + + + + + + + 12 + + + + Round Nb + + + + + + + + + @@ -634,7 +620,7 @@ 0 0 1288 - 31 + 21 diff --git a/src/warchron/view/view.py b/src/warchron/view/view.py index a1aebbe..7656060 100644 --- a/src/warchron/view/view.py +++ b/src/warchron/view/view.py @@ -54,6 +54,7 @@ class View(QtWidgets.QMainWindow, Ui_MainWindow): self.on_add_round = None self.on_edit_item = None self.on_delete_item = None + self.splitter.setSizes([200, 800]) self.show_details(None) self.playersTable.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) self.playersTable.customContextMenuRequested.connect(