feat(router): Add dialog to display computed route

This commit is contained in:
Daniel S. 2019-09-28 15:35:30 +02:00
parent fe3534e9d6
commit d498746a5c
2 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\devel\rust\ed_lrr_gui\ed_lrr_gui\gui\widget_route.ui'
#
# Created by: PyQt5 UI code generator 5.13.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.setWindowModality(QtCore.Qt.WindowModal)
Dialog.resize(430, 300)
self.layout_main = QtWidgets.QGridLayout(Dialog)
self.layout_main.setObjectName("layout_main")
self.layout_top = QtWidgets.QGridLayout()
self.layout_top.setObjectName("layout_top")
self.lst_route = QtWidgets.QTreeWidget(Dialog)
self.lst_route.setProperty("showDropIndicator", False)
self.lst_route.setDefaultDropAction(QtCore.Qt.IgnoreAction)
self.lst_route.setAlternatingRowColors(True)
self.lst_route.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
self.lst_route.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerItem)
self.lst_route.setHorizontalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
self.lst_route.setItemsExpandable(False)
self.lst_route.setAllColumnsShowFocus(False)
self.lst_route.setObjectName("lst_route")
self.layout_top.addWidget(self.lst_route, 0, 0, 1, 1)
self.layout_main.addLayout(self.layout_top, 0, 0, 1, 1)
self.layout_bottom = QtWidgets.QGridLayout()
self.layout_bottom.setObjectName("layout_bottom")
self.chk_copy = QtWidgets.QCheckBox(Dialog)
self.chk_copy.setObjectName("chk_copy")
self.layout_bottom.addWidget(self.chk_copy, 1, 0, 1, 1)
self.pushButton = QtWidgets.QPushButton(Dialog)
self.pushButton.setObjectName("pushButton")
self.layout_bottom.addWidget(self.pushButton, 1, 1, 1, 1)
self.layout_main.addLayout(self.layout_bottom, 1, 0, 1, 1)
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Route"))
self.lst_route.headerItem().setText(0, _translate("Dialog", "Num"))
self.lst_route.headerItem().setText(1, _translate("Dialog", "System"))
self.lst_route.headerItem().setText(2, _translate("Dialog", "Body"))
self.lst_route.headerItem().setText(3, _translate("Dialog", "Distance (Ls)"))
self.chk_copy.setText(_translate("Dialog", "Auto-copy next hop to clipboard"))
self.pushButton.setText(_translate("Dialog", "Close"))

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>430</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Route</string>
</property>
<layout class="QGridLayout" name="layout_main">
<item row="0" column="0">
<layout class="QGridLayout" name="layout_top">
<item row="0" column="0">
<widget class="QTreeWidget" name="lst_route">
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="defaultDropAction">
<enum>Qt::IgnoreAction</enum>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerItem</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="allColumnsShowFocus">
<bool>false</bool>
</property>
<column>
<property name="text">
<string>Num</string>
</property>
</column>
<column>
<property name="text">
<string>System</string>
</property>
</column>
<column>
<property name="text">
<string>Body</string>
</property>
</column>
<column>
<property name="text">
<string>Distance (Ls)</string>
</property>
</column>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="layout_bottom">
<item row="1" column="0">
<widget class="QCheckBox" name="chk_copy">
<property name="text">
<string>Auto-copy next hop to clipboard</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>