Add context menu with copy and piCtory actions to revpi search dialog

This commit is contained in:
2023-01-03 13:45:32 +01:00
parent 9ec1f1b622
commit 2400bd6951
4 changed files with 87 additions and 5 deletions

View File

@@ -2,9 +2,10 @@
# Form implementation generated from reading ui file 'avahisearch.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING! All changes made in this file will be lost!
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
@@ -64,9 +65,15 @@ class Ui_diag_search(object):
self.btn_box.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
self.btn_box.setObjectName("btn_box")
self.gridLayout.addWidget(self.btn_box, 3, 0, 1, 2)
self.act_copy_host = QtWidgets.QAction(diag_search)
self.act_copy_host.setObjectName("act_copy_host")
self.act_copy_ip = QtWidgets.QAction(diag_search)
self.act_copy_ip.setObjectName("act_copy_ip")
self.act_open_pictory = QtWidgets.QAction(diag_search)
self.act_open_pictory.setObjectName("act_open_pictory")
self.retranslateUi(diag_search)
self.btn_box.rejected.connect(diag_search.reject)
self.btn_box.rejected.connect(diag_search.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(diag_search)
def retranslateUi(self, diag_search):
@@ -81,6 +88,9 @@ class Ui_diag_search(object):
item.setText(_translate("diag_search", "IP address"))
self.btn_connect.setText(_translate("diag_search", "&Connect to Revolution Pi"))
self.btn_save.setText(_translate("diag_search", "&Save connection"))
self.act_copy_host.setText(_translate("diag_search", "Copy host name"))
self.act_copy_ip.setText(_translate("diag_search", "Copy IP address"))
self.act_open_pictory.setText(_translate("diag_search", "Open piCtory"))
from . import ressources_rc

View File

@@ -120,6 +120,21 @@
</widget>
</item>
</layout>
<action name="act_copy_host">
<property name="text">
<string>Copy host name</string>
</property>
</action>
<action name="act_copy_ip">
<property name="text">
<string>Copy IP address</string>
</property>
</action>
<action name="act_open_pictory">
<property name="text">
<string>Open piCtory</string>
</property>
</action>
</widget>
<resources>
<include location="ressources.qrc"/>