-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign Commit viewer to scale better with large databases
- Affected items are now listed in tables and the tables are tabbed by item type. The previous tree view could not really handle large number of items usability or performance wise. - Affected items are now fetched in a worker thread to keep the window responsive. - Parameter values are now shown like in the Parameter value table in DB editor proper instead of showing the JSON representation. This seems to give a huge performance boost: apparently Qt is not great when it needs to render large amounts of text in a tiny table cell. Re #26062
- Loading branch information
Showing
14 changed files
with
813 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
spinetoolbox/spine_db_editor/ui/commit_viewer_affected_item_info.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# -*- coding: utf-8 -*- | ||
###################################################################################################################### | ||
# Copyright (C) 2017-2022 Spine project consortium | ||
# Copyright Spine Toolbox contributors | ||
# This file is part of Spine Toolbox. | ||
# Spine Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General | ||
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) | ||
# any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General | ||
# Public License for more details. You should have received a copy of the GNU Lesser General Public License along with | ||
# this program. If not, see <http://www.gnu.org/licenses/>. | ||
###################################################################################################################### | ||
|
||
################################################################################ | ||
## Form generated from reading UI file 'commit_viewer_affected_item_info.ui' | ||
## | ||
## Created by: Qt User Interface Compiler version 6.5.2 | ||
## | ||
## WARNING! All changes made in this file will be lost when recompiling UI file! | ||
################################################################################ | ||
|
||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, | ||
QMetaObject, QObject, QPoint, QRect, | ||
QSize, QTime, QUrl, Qt) | ||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, | ||
QFont, QFontDatabase, QGradient, QIcon, | ||
QImage, QKeySequence, QLinearGradient, QPainter, | ||
QPalette, QPixmap, QRadialGradient, QTransform) | ||
from PySide6.QtWidgets import (QApplication, QHeaderView, QLabel, QSizePolicy, | ||
QTableWidget, QTableWidgetItem, QVBoxLayout, QWidget) | ||
|
||
class Ui_Form(object): | ||
def setupUi(self, Form): | ||
if not Form.objectName(): | ||
Form.setObjectName(u"Form") | ||
Form.resize(400, 300) | ||
self.verticalLayout = QVBoxLayout(Form) | ||
self.verticalLayout.setObjectName(u"verticalLayout") | ||
self.verticalLayout.setContentsMargins(0, 0, 0, 0) | ||
self.affected_items_table = QTableWidget(Form) | ||
self.affected_items_table.setObjectName(u"affected_items_table") | ||
|
||
self.verticalLayout.addWidget(self.affected_items_table) | ||
|
||
self.fetch_status_label = QLabel(Form) | ||
self.fetch_status_label.setObjectName(u"fetch_status_label") | ||
|
||
self.verticalLayout.addWidget(self.fetch_status_label) | ||
|
||
|
||
self.retranslateUi(Form) | ||
|
||
QMetaObject.connectSlotsByName(Form) | ||
# setupUi | ||
|
||
def retranslateUi(self, Form): | ||
Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None)) | ||
self.fetch_status_label.setText(QCoreApplication.translate("Form", u"TextLabel", None)) | ||
# retranslateUi | ||
|
56 changes: 56 additions & 0 deletions
56
spinetoolbox/spine_db_editor/ui/commit_viewer_affected_item_info.ui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
###################################################################################################################### | ||
# Copyright (C) 2017-2022 Spine project consortium | ||
# Copyright Spine Toolbox contributors | ||
# This file is part of Spine Toolbox. | ||
# Spine Toolbox is free software: you can redistribute it and\/or modify it under the terms of the GNU Lesser General | ||
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) | ||
# any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General | ||
# Public License for more details. You should have received a copy of the GNU Lesser General Public License along with | ||
# this program. If not, see <http:\/\/www.gnu.org\/licenses\/>. | ||
###################################################################################################################### | ||
--> | ||
<ui version="4.0"> | ||
<class>Form</class> | ||
<widget class="QWidget" name="Form"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>300</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<property name="leftMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>0</number> | ||
</property> | ||
<item> | ||
<widget class="QTableWidget" name="affected_items_table"/> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="fetch_status_label"> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.