Change most button pressed event to clicked and add global shortcuts

Most events of the buttons was on pressed, which should not be used. Now
the debugcontrol buttons has a repeating pressed event, if you hold the
button, it will read the IOs every 200 ms. The shortcuts F4, F5, F6 to
read/write IOs are now application wide.
This commit is contained in:
2023-01-09 19:40:00 +01:00
parent 98b4879b7f
commit 1e8200cc55
13 changed files with 190 additions and 150 deletions

View File

@@ -85,7 +85,7 @@ class AclManager(QtWidgets.QDialog, Ui_diag_aclmanager):
) )
) == QtWidgets.QMessageBox.Yes ) == QtWidgets.QMessageBox.Yes
if ask: if ask:
self.on_btn_add_pressed() self.on_btn_add_clicked()
if self.__check_load_error(): if self.__check_load_error():
return return
@@ -252,11 +252,11 @@ class AclManager(QtWidgets.QDialog, Ui_diag_aclmanager):
self.btn_remove.setEnabled(not self.__read_only and selected_rows > 0) self.btn_remove.setEnabled(not self.__read_only and selected_rows > 0)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_edit_pressed(self): def on_btn_edit_clicked(self):
self.__load_selected_entry() self.__load_selected_entry()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_remove_pressed(self): def on_btn_remove_clicked(self):
lst_selected_row_indexes = [mi.row() for mi in self.tb_acls.selectionModel().selectedRows(0)] lst_selected_row_indexes = [mi.row() for mi in self.tb_acls.selectionModel().selectedRows(0)]
if len(lst_selected_row_indexes) == 0: if len(lst_selected_row_indexes) == 0:
return return
@@ -355,7 +355,7 @@ class AclManager(QtWidgets.QDialog, Ui_diag_aclmanager):
self._check_all_filled() self._check_all_filled()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_add_pressed(self): def on_btn_add_clicked(self):
"""Add a new entry to acl table.""" """Add a new entry to acl table."""
ip_level = "{0}.{1}.{2}.{3},{4}".format( ip_level = "{0}.{1}.{2}.{3},{4}".format(
self.txt_ip_a.text(), self.txt_ip_a.text(),
@@ -366,7 +366,7 @@ class AclManager(QtWidgets.QDialog, Ui_diag_aclmanager):
) )
if self.__re_ipacl.match(ip_level): if self.__re_ipacl.match(ip_level):
self.__table_add_acl(ip_level) self.__table_add_acl(ip_level)
self.on_btn_clear_pressed() self.on_btn_clear_clicked()
else: else:
QtWidgets.QMessageBox.critical( QtWidgets.QMessageBox.critical(
self, self.tr("Error"), self.tr( self, self.tr("Error"), self.tr(
@@ -376,7 +376,7 @@ class AclManager(QtWidgets.QDialog, Ui_diag_aclmanager):
) )
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_clear_pressed(self): def on_btn_clear_clicked(self):
"""Clear entry widgets.""" """Clear entry widgets."""
self.txt_ip_a.clear() self.txt_ip_a.clear()
self.txt_ip_b.clear() self.txt_ip_b.clear()

View File

@@ -45,7 +45,7 @@ class BackgroundWorker(QtCore.QThread):
while counter != 0: while counter != 0:
counter -= 1 counter -= 1
self.msleep(250) self.msleep(250)
if self._check_cancel(): if self.check_cancel():
break break
def run(self) -> None: def run(self) -> None:
@@ -54,7 +54,7 @@ class BackgroundWorker(QtCore.QThread):
self.status_message.emit("Started dummy thread...") self.status_message.emit("Started dummy thread...")
self.wait_interruptable(5) self.wait_interruptable(5)
self.status_message.emit("Completed dummy thread.") self.status_message.emit("Completed dummy thread.")
self._save_wait(3) self.wait_interruptable(2)
class WorkerDialog(QtWidgets.QDialog, Ui_diag_backgroundworker): class WorkerDialog(QtWidgets.QDialog, Ui_diag_backgroundworker):

View File

@@ -7,7 +7,7 @@ __license__ = "GPLv3"
import pickle import pickle
from xmlrpc.client import Binary, Fault, MultiCall, MultiCallIterator from xmlrpc.client import Binary, Fault, MultiCall, MultiCallIterator
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
from . import helper from . import helper
from . import proginit as pi from . import proginit as pi
@@ -76,6 +76,16 @@ class DebugControl(QtWidgets.QWidget, Ui_wid_debugcontrol):
self.cbx_write.setEnabled(False) self.cbx_write.setEnabled(False)
self.cbx_stay_on_top.setChecked(helper.settings.value("debugcontrol/stay_on_top", False, bool)) self.cbx_stay_on_top.setChecked(helper.settings.value("debugcontrol/stay_on_top", False, bool))
self.shc_read_io = QtWidgets.QShortcut(QtGui.QKeySequence("F4"), self)
self.shc_read_io.setContext(QtCore.Qt.ApplicationShortcut)
self.shc_read_io.activated.connect(self.on_btn_read_io_pressed)
self.shc_refresh_io = QtWidgets.QShortcut(QtGui.QKeySequence("F5"), self)
self.shc_refresh_io.setContext(QtCore.Qt.ApplicationShortcut)
self.shc_refresh_io.activated.connect(self.on_btn_refresh_io_pressed)
self.shc_write_o = QtWidgets.QShortcut(QtGui.QKeySequence("F6"), self)
self.shc_write_o.setContext(QtCore.Qt.ApplicationShortcut)
self.shc_write_o.activated.connect(self.on_btn_write_o_clicked)
def __del__(self): def __del__(self):
pi.logger.debug("DebugControl.__del__") pi.logger.debug("DebugControl.__del__")
@@ -323,8 +333,6 @@ class DebugControl(QtWidgets.QWidget, Ui_wid_debugcontrol):
dict_inps[position], dict_outs[position] dict_inps[position], dict_outs[position]
) )
win.device_closed.connect(self.on_device_closed) win.device_closed.connect(self.on_device_closed)
win.do_read.connect(self.btn_refresh_io.pressed)
win.do_write.connect(self.btn_write_o.pressed)
self.dict_windows[position] = win self.dict_windows[position] = win
btn = QtWidgets.QPushButton(self.gb_devices) btn = QtWidgets.QPushButton(self.gb_devices)
@@ -380,9 +388,9 @@ class DebugControl(QtWidgets.QWidget, Ui_wid_debugcontrol):
self._work_values(refresh=True) self._work_values(refresh=True)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_write_o_pressed(self): def on_btn_write_o_clicked(self):
"""Write outputs.""" """Write outputs."""
pi.logger.debug("DebugControl.on_btn_write_o_pressed") pi.logger.debug("DebugControl.on_btn_write_o_clicked")
if not self.cbx_write.isChecked() and (helper.cm.xml_mode >= 3 or helper.cm.simulating): if not self.cbx_write.isChecked() and (helper.cm.xml_mode >= 3 or helper.cm.simulating):
for win in self.dict_windows.values(): # type: DebugIos for win in self.dict_windows.values(): # type: DebugIos
win.reset_label_colors() win.reset_label_colors()

View File

@@ -18,8 +18,7 @@ class DebugIos(QtWidgets.QMainWindow, Ui_win_debugios):
device_closed = QtCore.pyqtSignal(int) device_closed = QtCore.pyqtSignal(int)
"""This window was closed.""" """This window was closed."""
do_read = QtCore.pyqtSignal()
do_write = QtCore.pyqtSignal()
search_class = (QtWidgets.QLineEdit, QtWidgets.QDoubleSpinBox, QtWidgets.QCheckBox) search_class = (QtWidgets.QLineEdit, QtWidgets.QDoubleSpinBox, QtWidgets.QCheckBox)
def __init__(self, position: int, name: str, inputs: list, outputs: list, parent=None): def __init__(self, position: int, name: str, inputs: list, outputs: list, parent=None):
@@ -48,11 +47,6 @@ class DebugIos(QtWidgets.QMainWindow, Ui_win_debugios):
self._create_io(self.outputs, self.saw_out, False) self._create_io(self.outputs, self.saw_out, False)
self.style_sheet = "background-color: red;" self.style_sheet = "background-color: red;"
shc_read = QtWidgets.QShortcut(QtGui.QKeySequence("F5"), self)
shc_read.activated.connect(self.do_read)
shc_write = QtWidgets.QShortcut(QtGui.QKeySequence("F6"), self)
shc_write.activated.connect(self.do_write)
def __del__(self): def __del__(self):
pi.logger.debug("DebugIos.__del__") pi.logger.debug("DebugIos.__del__")

View File

@@ -75,25 +75,25 @@ Nicht gespeicherte Änderunen gehen verloren</translation>
<message> <message>
<location filename="../avahisearch.py" line="191"/> <location filename="../avahisearch.py" line="191"/>
<source>Already in list...</source> <source>Already in list...</source>
<translation>Bereits in Liste...</translation> <translation type="obsolete">Bereits in Liste...</translation>
</message> </message>
<message> <message>
<location filename="../avahisearch.py" line="201"/> <location filename="../avahisearch.py" line="201"/>
<source>Success</source> <source>Success</source>
<translation>Erfolgreich</translation> <translation type="obsolete">Erfolgreich</translation>
</message> </message>
<message> <message>
<location filename="../avahisearch.py" line="201"/> <location filename="../avahisearch.py" line="201"/>
<source>The connection with the name &apos;{0}&apos; was successfully saved to folder &apos;{1}&apos; in your connections.</source> <source>The connection with the name &apos;{0}&apos; was successfully saved to folder &apos;{1}&apos; in your connections.</source>
<translation>Die Verbindung mit dem Namen &apos;{0}&apos; wurde erfolgreich im Ordner &apos;{1}&apos; gespeichert.</translation> <translation type="obsolete">Die Verbindung mit dem Namen &apos;{0}&apos; wurde erfolgreich im Ordner &apos;{1}&apos; gespeichert.</translation>
</message> </message>
<message> <message>
<location filename="../avahisearch.py" line="191"/> <location filename="../avahisearch.py" line="191"/>
<source>The selected Revolution Pi is already saved in your connection list as &apos;{0}&apos;.</source> <source>The selected Revolution Pi is already saved in your connection list as &apos;{0}&apos;.</source>
<translation>Der ausgewählte RevPi ist schon in der Verbindungsliste als &apos;{0}&apos;.</translation> <translation type="obsolete">Der ausgewählte RevPi ist schon in der Verbindungsliste als &apos;{0}&apos;.</translation>
</message> </message>
<message> <message>
<location filename="../avahisearch.py" line="317"/> <location filename="../avahisearch.py" line="283"/>
<source> over SSH</source> <source> over SSH</source>
<translation> über SSH</translation> <translation> über SSH</translation>
</message> </message>
@@ -101,62 +101,62 @@ Nicht gespeicherte Änderunen gehen verloren</translation>
<context> <context>
<name>ConnectionManager</name> <name>ConnectionManager</name>
<message> <message>
<location filename="../helper.py" line="521"/> <location filename="../helper.py" line="504"/>
<source>SIMULATING</source> <source>SIMULATING</source>
<translation>SIMULATION</translation> <translation>SIMULATION</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="524"/> <location filename="../helper.py" line="507"/>
<source>NOT CONNECTED</source> <source>NOT CONNECTED</source>
<translation>NICHT VERBUNDEN</translation> <translation>NICHT VERBUNDEN</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="541"/> <location filename="../helper.py" line="524"/>
<source>SERVER ERROR</source> <source>SERVER ERROR</source>
<translation>SERVER FEHLER</translation> <translation>SERVER FEHLER</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="566"/> <location filename="../helper.py" line="549"/>
<source>RUNNING</source> <source>RUNNING</source>
<translation>LÄUFT</translation> <translation>LÄUFT</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="568"/> <location filename="../helper.py" line="551"/>
<source>PLC FILE NOT FOUND</source> <source>PLC FILE NOT FOUND</source>
<translation>SPS PROGRAMM NICHT GEFUNDEN</translation> <translation>SPS PROGRAMM NICHT GEFUNDEN</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="570"/> <location filename="../helper.py" line="553"/>
<source>NOT RUNNING (NO STATUS)</source> <source>NOT RUNNING (NO STATUS)</source>
<translation>LÄUFT NICHT (KEIN STATUS)</translation> <translation>LÄUFT NICHT (KEIN STATUS)</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="572"/> <location filename="../helper.py" line="555"/>
<source>PROGRAM KILLED</source> <source>PROGRAM KILLED</source>
<translation>PROGRAMM GETÖTET</translation> <translation>PROGRAMM GETÖTET</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="574"/> <location filename="../helper.py" line="557"/>
<source>PROGRAM TERMED</source> <source>PROGRAM TERMED</source>
<translation>PROGRAMM BEENDET</translation> <translation>PROGRAMM BEENDET</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="576"/> <location filename="../helper.py" line="559"/>
<source>NOT RUNNING</source> <source>NOT RUNNING</source>
<translation>LÄUFT NICHT</translation> <translation>LÄUFT NICHT</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="578"/> <location filename="../helper.py" line="561"/>
<source>FINISHED WITH CODE {0}</source> <source>FINISHED WITH CODE {0}</source>
<translation>BEENDET MIT CODE {0}</translation> <translation>BEENDET MIT CODE {0}</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="393"/> <location filename="../helper.py" line="376"/>
<source>Error</source> <source>Error</source>
<translation>Fehler</translation> <translation>Fehler</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="361"/> <location filename="../helper.py" line="344"/>
<source>The combination of username and password was rejected from the SSH server. <source>The combination of username and password was rejected from the SSH server.
Try again.</source> Try again.</source>
@@ -165,7 +165,7 @@ Try again.</source>
Bitte erneut versuchen.</translation> Bitte erneut versuchen.</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="370"/> <location filename="../helper.py" line="353"/>
<source>Could not establish a SSH connection to server: <source>Could not establish a SSH connection to server:
{0}</source> {0}</source>
@@ -174,7 +174,7 @@ Bitte erneut versuchen.</translation>
{0}</translation> {0}</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="393"/> <location filename="../helper.py" line="376"/>
<source>Can not connect to RevPi XML-RPC Service! <source>Can not connect to RevPi XML-RPC Service!
This could have the following reasons: The RevPi is not online, the XML-RPC service is not running / bind to localhost or the ACL permission is not set for your IP!!! This could have the following reasons: The RevPi is not online, the XML-RPC service is not running / bind to localhost or the ACL permission is not set for your IP!!!
@@ -190,34 +190,34 @@ Führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi au
<context> <context>
<name>DebugControl</name> <name>DebugControl</name>
<message> <message>
<location filename="../debugcontrol.py" line="124"/> <location filename="../debugcontrol.py" line="134"/>
<source>Driver reset for piControl detected.</source> <source>Driver reset for piControl detected.</source>
<translation>Treiberneustart in piCtory erkannt.</translation> <translation>Treiberneustart in piCtory erkannt.</translation>
</message> </message>
<message> <message>
<location filename="../debugcontrol.py" line="164"/> <location filename="../debugcontrol.py" line="174"/>
<source>Error while getting values from Revolution Pi.</source> <source>Error while getting values from Revolution Pi.</source>
<translation>Fehler bei Werteempfang von RevPi.</translation> <translation>Fehler bei Werteempfang von RevPi.</translation>
</message> </message>
<message> <message>
<location filename="../debugcontrol.py" line="218"/> <location filename="../debugcontrol.py" line="228"/>
<source>Auto update values...</source> <source>Auto update values...</source>
<translation>Werte automatisch aktualisiert...</translation> <translation>Werte automatisch aktualisiert...</translation>
</message> </message>
<message> <message>
<location filename="../debugcontrol.py" line="220"/> <location filename="../debugcontrol.py" line="230"/>
<source>Values updated...</source> <source>Values updated...</source>
<translation>Werte aktualisiert...</translation> <translation>Werte aktualisiert...</translation>
</message> </message>
<message> <message>
<location filename="../debugcontrol.py" line="257"/> <location filename="../debugcontrol.py" line="267"/>
<source>Error set value of device &apos;{0}&apos; Output &apos;{1}&apos;: {2} <source>Error set value of device &apos;{0}&apos; Output &apos;{1}&apos;: {2}
</source> </source>
<translation>Fehler beim Setzen des Ausgangs &apos;{1}&apos; auf Modul &apos;{0}&apos;: {2} <translation>Fehler beim Setzen des Ausgangs &apos;{1}&apos; auf Modul &apos;{0}&apos;: {2}
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../debugcontrol.py" line="266"/> <location filename="../debugcontrol.py" line="276"/>
<source>Error</source> <source>Error</source>
<translation>Fehler</translation> <translation>Fehler</translation>
</message> </message>
@@ -225,32 +225,32 @@ Führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi au
<context> <context>
<name>DebugIos</name> <name>DebugIos</name>
<message> <message>
<location filename="../debugios.py" line="213"/> <location filename="../debugios.py" line="207"/>
<source>signed</source> <source>signed</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="218"/> <location filename="../debugios.py" line="212"/>
<source>big_endian</source> <source>big_endian</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="207"/> <location filename="../debugios.py" line="201"/>
<source>as text</source> <source>as text</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="209"/> <location filename="../debugios.py" line="203"/>
<source>as number</source> <source>as number</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="352"/> <location filename="../debugios.py" line="346"/>
<source>Can not use format text</source> <source>Can not use format text</source>
<translation>Formatierung nicht möglich</translation> <translation>Formatierung nicht möglich</translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="352"/> <location filename="../debugios.py" line="346"/>
<source>Can not convert bytes {0} to a text for IO &apos;{1}&apos;. Switch to number format instead!</source> <source>Can not convert bytes {0} to a text for IO &apos;{1}&apos;. Switch to number format instead!</source>
<translation>Kann bytes {0} für &apos;{1}&apos; nicht in Text konvertieren. Wechseln Sie auf Nummernformat!</translation> <translation>Kann bytes {0} für &apos;{1}&apos; nicht in Text konvertieren. Wechseln Sie auf Nummernformat!</translation>
</message> </message>
@@ -683,22 +683,22 @@ Ungesicherte Änderungen gehen verloren.</translation>
<context> <context>
<name>RevPiProgram</name> <name>RevPiProgram</name>
<message> <message>
<location filename="../revpiprogram.py" line="680"/> <location filename="../revpiprogram.py" line="679"/>
<source>Error</source> <source>Error</source>
<translation>Fehler</translation> <translation>Fehler</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="111"/> <location filename="../revpiprogram.py" line="110"/>
<source>You have to select a start program, before uploading the settings.</source> <source>You have to select a start program, before uploading the settings.</source>
<translation>Es muss erst ein Startprogramm gewählt werden.</translation> <translation>Es muss erst ein Startprogramm gewählt werden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="154"/> <location filename="../revpiprogram.py" line="153"/>
<source>Question</source> <source>Question</source>
<translation>Frage</translation> <translation>Frage</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="119"/> <location filename="../revpiprogram.py" line="118"/>
<source>The settings will be set on the Revolution Pi now. <source>The settings will be set on the Revolution Pi now.
If you made changes on the &apos;PCL Program&apos; section, your plc program will restart now!</source> If you made changes on the &apos;PCL Program&apos; section, your plc program will restart now!</source>
@@ -707,245 +707,245 @@ If you made changes on the &apos;PCL Program&apos; section, your plc program wil
Sollte es Änderungen in dem SPS Programmabschnitt geben, wird das SPS Programm neu gestartet!</translation> Sollte es Änderungen in dem SPS Programmabschnitt geben, wird das SPS Programm neu gestartet!</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="144"/> <location filename="../revpiprogram.py" line="143"/>
<source>The settings could not be saved on the Revolution Pi! <source>The settings could not be saved on the Revolution Pi!
Try to save the values one mor time and check the log files of RevPiPyLoad if the error rises again.</source> Try to save the values one mor time and check the log files of RevPiPyLoad if the error rises again.</source>
<translation>Die Einstellungen konnten nicht auf dem Revolution Pi gespeichert werden! <translation>Die Einstellungen konnten nicht auf dem Revolution Pi gespeichert werden!
Versuche es erneut und prüfe die Logdateien von RevPiPyLoad, wenn der Fehler erneut auftritt.</translation> Versuche es erneut und prüfe die Logdateien von RevPiPyLoad, wenn der Fehler erneut auftritt.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="154"/> <location filename="../revpiprogram.py" line="153"/>
<source>Do you really want to quit? <source>Do you really want to quit?
Unsaved changes will be lost.</source> Unsaved changes will be lost.</source>
<translation>Soll das Fenster wirklich geschlossen werden? <translation>Soll das Fenster wirklich geschlossen werden?
Ungesicherte Änderungen gehen verloren.</translation> Ungesicherte Änderungen gehen verloren.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="194"/> <location filename="../revpiprogram.py" line="193"/>
<source>Reset driver...</source> <source>Reset driver...</source>
<translation>Treiber zurücksetzen...</translation> <translation>Treiber zurücksetzen...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="194"/> <location filename="../revpiprogram.py" line="193"/>
<source>Reset piControl driver after successful uploading new piCtory configuration? <source>Reset piControl driver after successful uploading new piCtory configuration?
The process image will be interrupted for a short time!</source> The process image will be interrupted for a short time!</source>
<translation>Soll piControl nach dem erfolgreichen Hochladen der neuen piCtory Konfiguration zurückgesetzt werden? <translation>Soll piControl nach dem erfolgreichen Hochladen der neuen piCtory Konfiguration zurückgesetzt werden?
Das Prozessabbild wird kurzzeitig nicht verfügbar sein!</translation> Das Prozessabbild wird kurzzeitig nicht verfügbar sein!</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="209"/> <location filename="../revpiprogram.py" line="208"/>
<source>Got an network error while send data to Revolution Pi. <source>Got an network error while send data to Revolution Pi.
Please try again.</source> Please try again.</source>
<translation>Beim Senden der Daten an den Revolution Pi trat ein Netzwerkfehler auf. <translation>Beim Senden der Daten an den Revolution Pi trat ein Netzwerkfehler auf.
Versuche es erneut.</translation> Versuche es erneut.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="690"/> <location filename="../revpiprogram.py" line="689"/>
<source>Success</source> <source>Success</source>
<translation>Erfolgreich</translation> <translation>Erfolgreich</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="218"/> <location filename="../revpiprogram.py" line="217"/>
<source>The transfer of the piCtory configuration and the reset of piControl have been successfully executed.</source> <source>The transfer of the piCtory configuration and the reset of piControl have been successfully executed.</source>
<translation>Die piCtory Übertragung und der Reset von piControl wurden erfolgreich durchgeführt.</translation> <translation>Die piCtory Übertragung und der Reset von piControl wurden erfolgreich durchgeführt.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="226"/> <location filename="../revpiprogram.py" line="225"/>
<source>The piCtory configuration was successfully transferred.</source> <source>The piCtory configuration was successfully transferred.</source>
<translation>Die piCtory Konfiguration wurde erfolgreich übertragen.</translation> <translation>Die piCtory Konfiguration wurde erfolgreich übertragen.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="233"/> <location filename="../revpiprogram.py" line="232"/>
<source>Can not process the transferred file.</source> <source>Can not process the transferred file.</source>
<translation>Kann die Übertragene Datei nicht verarbeiten.</translation> <translation>Kann die Übertragene Datei nicht verarbeiten.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="239"/> <location filename="../revpiprogram.py" line="238"/>
<source>Can not find main elements in piCtory file.</source> <source>Can not find main elements in piCtory file.</source>
<translation>Konnte piCtory Struktur nicht erkennen.</translation> <translation>Konnte piCtory Struktur nicht erkennen.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="245"/> <location filename="../revpiprogram.py" line="244"/>
<source>Contained devices could not be found on Revolution Pi. The configuration may be from a newer piCtory version!</source> <source>Contained devices could not be found on Revolution Pi. The configuration may be from a newer piCtory version!</source>
<translation>Enthaltene Module können auf dem Revolution Pi nicht gefunden werden. Die Konfiguraiton könnte von einer neueren piCtory Version stammen!</translation> <translation>Enthaltene Module können auf dem Revolution Pi nicht gefunden werden. Die Konfiguraiton könnte von einer neueren piCtory Version stammen!</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="252"/> <location filename="../revpiprogram.py" line="251"/>
<source>Could not load RAP catalog on Revolution Pi.</source> <source>Could not load RAP catalog on Revolution Pi.</source>
<translation>Kann RAP Katalog auf dem Revolution Pi nicht laden.</translation> <translation>Kann RAP Katalog auf dem Revolution Pi nicht laden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="258"/> <location filename="../revpiprogram.py" line="257"/>
<source>The piCtory configuration could not be written on the Revolution Pi.</source> <source>The piCtory configuration could not be written on the Revolution Pi.</source>
<translation>Die piCtory Konfiguration konnte nicht auf dem Revolution Pi geschrieben werden.</translation> <translation>Die piCtory Konfiguration konnte nicht auf dem Revolution Pi geschrieben werden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="265"/> <location filename="../revpiprogram.py" line="264"/>
<source>Warning</source> <source>Warning</source>
<translation>Warnung</translation> <translation>Warnung</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="265"/> <location filename="../revpiprogram.py" line="264"/>
<source>The piCtroy configuration has been saved successfully. <source>The piCtroy configuration has been saved successfully.
An error occurred on piControl reset!</source> An error occurred on piControl reset!</source>
<translation>Die piCtory Konfiguration wurde erfolgreich hochgeladen. <translation>Die piCtory Konfiguration wurde erfolgreich hochgeladen.
Es trat jedoch ein Fehler beim Zurücksetzen von piControl auf!</translation> Es trat jedoch ein Fehler beim Zurücksetzen von piControl auf!</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="329"/> <location filename="../revpiprogram.py" line="328"/>
<source>Save ZIP archive...</source> <source>Save ZIP archive...</source>
<translation>ZIP Archiv speichern...</translation> <translation>ZIP Archiv speichern...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="419"/> <location filename="../revpiprogram.py" line="418"/>
<source>ZIP archive (*.zip);;All files (*.*)</source> <source>ZIP archive (*.zip);;All files (*.*)</source>
<translation>ZIP Archive (*.zip);;Alle Dateien (*.*)</translation> <translation>ZIP Archive (*.zip);;Alle Dateien (*.*)</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="347"/> <location filename="../revpiprogram.py" line="346"/>
<source>Save TGZ archive...</source> <source>Save TGZ archive...</source>
<translation>TGZ Archiv speichern...</translation> <translation>TGZ Archiv speichern...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="347"/> <location filename="../revpiprogram.py" line="346"/>
<source>TGZ archive (*.tgz);;All files (*.*)</source> <source>TGZ archive (*.tgz);;All files (*.*)</source>
<translation>TAR Archive (*.tgz);;Alle Dateien (*.*)</translation> <translation>TAR Archive (*.tgz);;Alle Dateien (*.*)</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="374"/> <location filename="../revpiprogram.py" line="373"/>
<source>Could not load PLC program from Revolution Pi.</source> <source>Could not load PLC program from Revolution Pi.</source>
<translation>Kann SPS Programm nicht vom Revolution Pi laden.</translation> <translation>Kann SPS Programm nicht vom Revolution Pi laden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="387"/> <location filename="../revpiprogram.py" line="386"/>
<source>Coud not save the archive or extract the files! <source>Coud not save the archive or extract the files!
Please retry.</source> Please retry.</source>
<translation>Konnte das Archiv nicht speichern oder extrahieren! <translation>Konnte das Archiv nicht speichern oder extrahieren!
Versuche es erneut.</translation> Versuche es erneut.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="393"/> <location filename="../revpiprogram.py" line="392"/>
<source>Transfer successfully completed.</source> <source>Transfer successfully completed.</source>
<translation>Übertragung erfolgreich abgeschlossen.</translation> <translation>Übertragung erfolgreich abgeschlossen.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="419"/> <location filename="../revpiprogram.py" line="418"/>
<source>Upload content of ZIP archive...</source> <source>Upload content of ZIP archive...</source>
<translation>ZIP Archiv hochladen...</translation> <translation>ZIP Archiv hochladen...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="444"/> <location filename="../revpiprogram.py" line="443"/>
<source>The selected file ist not a ZIP archive.</source> <source>The selected file ist not a ZIP archive.</source>
<translation>Die ausgewählte Datei ist kein ZIP Archiv.</translation> <translation>Die ausgewählte Datei ist kein ZIP Archiv.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="453"/> <location filename="../revpiprogram.py" line="452"/>
<source>Upload content of TAR archive...</source> <source>Upload content of TAR archive...</source>
<translation>TAR Archiv hochladen...</translation> <translation>TAR Archiv hochladen...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="453"/> <location filename="../revpiprogram.py" line="452"/>
<source>TAR archive (*.tgz);;All files (*.*)</source> <source>TAR archive (*.tgz);;All files (*.*)</source>
<translation>TAR Archive (*.tgz);;Alle Dateien (*.*)</translation> <translation>TAR Archive (*.tgz);;Alle Dateien (*.*)</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="478"/> <location filename="../revpiprogram.py" line="477"/>
<source>The selected file ist not a TAR archive.</source> <source>The selected file ist not a TAR archive.</source>
<translation>Die ausgewählte Datei ist kein TAR Archiv.</translation> <translation>Die ausgewählte Datei ist kein TAR Archiv.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="487"/> <location filename="../revpiprogram.py" line="486"/>
<source>No files to upload...</source> <source>No files to upload...</source>
<translation>Keine Dateien zum Hochladen...</translation> <translation>Keine Dateien zum Hochladen...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="487"/> <location filename="../revpiprogram.py" line="486"/>
<source>Found no files to upload in given location or archive.</source> <source>Found no files to upload in given location or archive.</source>
<translation>Konnte keine Dateien in der Quelle zum Hochladen finden.</translation> <translation>Konnte keine Dateien in der Quelle zum Hochladen finden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="498"/> <location filename="../revpiprogram.py" line="497"/>
<source>There was an error deleting the files on the Revolution Pi. <source>There was an error deleting the files on the Revolution Pi.
Upload aborted! Please try again.</source> Upload aborted! Please try again.</source>
<translation>Beim Löschen der Dateien auf dem Revolution Pi ist ein Fehler aufgetreten. <translation>Beim Löschen der Dateien auf dem Revolution Pi ist ein Fehler aufgetreten.
Hochladen abgebrochen! Versuche es erneut.</translation> Hochladen abgebrochen! Versuche es erneut.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="544"/> <location filename="../revpiprogram.py" line="543"/>
<source>The PLC program was transferred successfully.</source> <source>The PLC program was transferred successfully.</source>
<translation>Das SPS Programm wurde erfolgreich übertragen.</translation> <translation>Das SPS Programm wurde erfolgreich übertragen.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="552"/> <location filename="../revpiprogram.py" line="551"/>
<source>Information</source> <source>Information</source>
<translation>Information</translation> <translation>Information</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="552"/> <location filename="../revpiprogram.py" line="551"/>
<source>Could not find the selected PLC start program in uploaded files. <source>Could not find the selected PLC start program in uploaded files.
This is not an error, if the file was already on the Revolution Pi. Check PLC start program field</source> This is not an error, if the file was already on the Revolution Pi. Check PLC start program field</source>
<translation>Konnte eingestelltes SPS Starprogramm in hochgeladenen Dateien nicht finden. <translation>Konnte eingestelltes SPS Starprogramm in hochgeladenen Dateien nicht finden.
Dies ist kein Fehler, wenn das SPS Startprogramm bereits auf dem Rev Pi ist. Prüfe SPS Programm Einstellungen</translation> Dies ist kein Fehler, wenn das SPS Startprogramm bereits auf dem Rev Pi ist. Prüfe SPS Programm Einstellungen</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="565"/> <location filename="../revpiprogram.py" line="564"/>
<source>There is no piCtory configuration in this archive.</source> <source>There is no piCtory configuration in this archive.</source>
<translation>Kann keine piCtory Konfiguration im Archiv finden.</translation> <translation>Kann keine piCtory Konfiguration im Archiv finden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="572"/> <location filename="../revpiprogram.py" line="571"/>
<source>The Revolution Pi could not process some parts of the transmission.</source> <source>The Revolution Pi could not process some parts of the transmission.</source>
<translation>Der Revolution Pi konnte Teile der Übertragung nicht verarbeiten.</translation> <translation>Der Revolution Pi konnte Teile der Übertragung nicht verarbeiten.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="579"/> <location filename="../revpiprogram.py" line="578"/>
<source>Errors occurred during transmission.</source> <source>Errors occurred during transmission.</source>
<translation>Fehler bei Übertragung aufgetreten.</translation> <translation>Fehler bei Übertragung aufgetreten.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="598"/> <location filename="../revpiprogram.py" line="597"/>
<source>Save piCtory file...</source> <source>Save piCtory file...</source>
<translation>piCtory Datei speichern...</translation> <translation>piCtory Datei speichern...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="638"/> <location filename="../revpiprogram.py" line="637"/>
<source>piCtory file (*.rsc);;All files (*.*)</source> <source>piCtory file (*.rsc);;All files (*.*)</source>
<translation>piCtory Datei (*.rsc);;Alle Dateien (*.*)</translation> <translation>piCtory Datei (*.rsc);;Alle Dateien (*.*)</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="617"/> <location filename="../revpiprogram.py" line="616"/>
<source>Could not load piCtory file from Revolution Pi.</source> <source>Could not load piCtory file from Revolution Pi.</source>
<translation>Kann piCtory Konfiguration nicht vom Revolution Pi laden.</translation> <translation>Kann piCtory Konfiguration nicht vom Revolution Pi laden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="627"/> <location filename="../revpiprogram.py" line="626"/>
<source>piCtory configuration successfully loaded and saved to: <source>piCtory configuration successfully loaded and saved to:
{0}.</source> {0}.</source>
<translation>piCtory Konfiguration erfolgreich geladen und gespeichert als: <translation>piCtory Konfiguration erfolgreich geladen und gespeichert als:
{0}.</translation> {0}.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="638"/> <location filename="../revpiprogram.py" line="637"/>
<source>Upload piCtory file...</source> <source>Upload piCtory file...</source>
<translation>piCtory datei hochladen...</translation> <translation>piCtory datei hochladen...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="659"/> <location filename="../revpiprogram.py" line="658"/>
<source>Save piControl file...</source> <source>Save piControl file...</source>
<translation>piCtory Datei speichern...</translation> <translation>piCtory Datei speichern...</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="659"/> <location filename="../revpiprogram.py" line="658"/>
<source>Process image file (*.img);;All files (*.*)</source> <source>Process image file (*.img);;All files (*.*)</source>
<translation>Processabbild (*.img);;Alle Dateien (*.*)</translation> <translation>Processabbild (*.img);;Alle Dateien (*.*)</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="680"/> <location filename="../revpiprogram.py" line="679"/>
<source>Could not load process image from Revolution Pi.</source> <source>Could not load process image from Revolution Pi.</source>
<translation>Kann Prozessabbild von Revolution Pi nicht laden.</translation> <translation>Kann Prozessabbild von Revolution Pi nicht laden.</translation>
</message> </message>
<message> <message>
<location filename="../revpiprogram.py" line="690"/> <location filename="../revpiprogram.py" line="689"/>
<source>Process image successfully loaded and saved to: <source>Process image successfully loaded and saved to:
{0}.</source> {0}.</source>
<translation>Prozessabbild erfolgreich geladen und gespeichert als: <translation>Prozessabbild erfolgreich geladen und gespeichert als:
@@ -1693,43 +1693,61 @@ applicable law.
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="56"/> <location filename="../../../ui_dev/debugcontrol.ui" line="56"/>
<source>Read all IO values and discard local changes (F4)</source> <source>Read all IO values and discard local changes (F4)</source>
<translation>Alle EA Werte lesen und lokale Änderungen überschreiben (F4)</translation> <translation type="obsolete">Alle EA Werte lesen und lokale Änderungen überschreiben (F4)</translation>
</message> </message>
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="59"/> <location filename="../../../ui_dev/debugcontrol.ui" line="61"/>
<source>Read &amp;all IO values</source> <source>Read &amp;all IO values</source>
<translation>&amp;Alle EA Werte lesen</translation> <translation>&amp;Alle EA Werte lesen</translation>
</message> </message>
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="69"/> <location filename="../../../ui_dev/debugcontrol.ui" line="69"/>
<source>Refresh all IO values which are locally not changed (F5)</source> <source>Refresh all IO values which are locally not changed (F5)</source>
<translation>Alle EA Werte aktualisieren, die lokal nicht geändert sind (F5)</translation> <translation type="obsolete">Alle EA Werte aktualisieren, die lokal nicht geändert sind (F5)</translation>
</message> </message>
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="72"/> <location filename="../../../ui_dev/debugcontrol.ui" line="82"/>
<source>&amp;Refresh unchanged IOs</source> <source>&amp;Refresh unchanged IOs</source>
<translation>Unve&amp;ränderte EAs lesen</translation> <translation>Unve&amp;ränderte EAs lesen</translation>
</message> </message>
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="82"/> <location filename="../../../ui_dev/debugcontrol.ui" line="98"/>
<source>Write locally changed output values to process image (F6)</source> <source>Write locally changed output values to process image (F6)</source>
<translation>Schreibe lokal veränderte Ausgangswerte in das Prozessabbild (F6)</translation> <translation>Schreibe lokal veränderte Ausgangswerte in das Prozessabbild (F6)</translation>
</message> </message>
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="85"/> <location filename="../../../ui_dev/debugcontrol.ui" line="101"/>
<source>&amp;Write changed outputs</source> <source>&amp;Write changed outputs</source>
<translation>Ausgänge &amp;schreiben</translation> <translation>Ausgänge &amp;schreiben</translation>
</message> </message>
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="95"/> <location filename="../../../ui_dev/debugcontrol.ui" line="108"/>
<source>&amp;Auto refresh values</source> <source>&amp;Auto refresh values</source>
<translation>&amp;Automatisch aktualisieren</translation> <translation>&amp;Automatisch aktualisieren</translation>
</message> </message>
<message> <message>
<location filename="../../../ui_dev/debugcontrol.ui" line="102"/> <location filename="../../../ui_dev/debugcontrol.ui" line="115"/>
<source>and write outputs</source> <source>and write outputs</source>
<translation>und Ausgänge schreiben</translation> <translation>und Ausgänge schreiben</translation>
</message> </message>
<message>
<location filename="../../../ui_dev/debugcontrol.ui" line="56"/>
<source>Read all IO values and discard local changes (F4)
Hold this button pressed and it will refresh the IOs every 200 ms.</source>
<translation>Alle EA Werte lesen und lokale Änderungen überschreiben (F4)
Wird der Button gehalten, aktualisieren sich die EAs alle 200 ms.</translation>
</message>
<message>
<location filename="../../../ui_dev/debugcontrol.ui" line="77"/>
<source>Refresh all IO values which are locally not changed (F5)
Hold this button pressed and it will refresh the IOs every 200 ms.</source>
<translation>Alle EA Werte aktualisieren, die lokal nicht geändert sind (F5)
Wird der Button gehalten, aktualisieren sich die EAs alle 200 ms.</translation>
</message>
</context> </context>
<context> <context>
<name>win_debugios</name> <name>win_debugios</name>

View File

@@ -54,7 +54,7 @@ class RevPiCommander(QtWidgets.QMainWindow, Ui_win_revpicommander):
self.win_files = RevPiFiles(self) self.win_files = RevPiFiles(self)
self.win_log = revpilogfile.RevPiLogfile(self) self.win_log = revpilogfile.RevPiLogfile(self)
self.btn_plc_logs.pressed.connect(self.on_act_logs_triggered) self.btn_plc_logs.clicked.connect(self.on_act_logs_triggered)
helper.cm.connection_disconnected.connect(self.on_cm_connection_disconnected) helper.cm.connection_disconnected.connect(self.on_cm_connection_disconnected)
helper.cm.connection_disconnecting.connect(self.on_cm_connection_disconnecting) helper.cm.connection_disconnecting.connect(self.on_cm_connection_disconnecting)

View File

@@ -207,7 +207,7 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
elif item.type() == NodeType.FILE: elif item.type() == NodeType.FILE:
item.setSelected(value) item.setSelected(value)
def __item_selection_changed(self, tree_view: QtWidgets.QTreeView): def __item_selection_changed(self, tree_view: QtWidgets.QTreeWidget):
"""Manager vor item selection of three views.""" """Manager vor item selection of three views."""
item = tree_view.currentItem() item = tree_view.currentItem()
if item is None: if item is None:
@@ -434,14 +434,14 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
# endregion # # # # # # endregion # # # # #
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_all_pressed(self): def on_btn_all_clicked(self):
pi.logger.debug("RevPiFiles.on_btn_all_pressed") pi.logger.debug("RevPiFiles.on_btn_all_clicked")
self._do_my_job(True) self._do_my_job(True)
self.file_list_revpi() self.file_list_revpi()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_select_local_pressed(self): def on_btn_select_local_clicked(self):
pi.logger.debug("RevPiFiles.on_btn_select_pressed") pi.logger.debug("RevPiFiles.on_btn_select_clicked")
diag_folder = QtWidgets.QFileDialog( diag_folder = QtWidgets.QFileDialog(
self, self.tr("Select folder..."), self, self.tr("Select folder..."),
@@ -471,26 +471,26 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
self._load_files_local(False) self._load_files_local(False)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_refresh_local_pressed(self): def on_btn_refresh_local_clicked(self):
pi.logger.debug("RevPiFiles.on_btn_refresh_pressed") pi.logger.debug("RevPiFiles.on_btn_refresh_clicked")
self._load_files_local(False) self._load_files_local(False)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_refresh_revpi_pressed(self): def on_btn_refresh_revpi_clicked(self):
pi.logger.debug("RevPiFiles.on_btn_refresh_revpi_pressed") pi.logger.debug("RevPiFiles.on_btn_refresh_revpi_clicked")
self._load_files_revpi(False) self._load_files_revpi(False)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_to_right_pressed(self): def on_btn_to_right_clicked(self):
"""Upload selected files to revolution pi.""" """Upload selected files to revolution pi."""
pi.logger.debug("RevPiFiles.on_btn_to_right_pressed") pi.logger.debug("RevPiFiles.on_btn_to_right_clicked")
self._do_my_job(False) self._do_my_job(False)
self._load_files_revpi(True) self._load_files_revpi(True)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_to_left_pressed(self): def on_btn_to_left_clicked(self):
"""Download selected file.""" """Download selected file."""
pi.logger.debug("RevPiFiles.on_btn_to_left_pressed") pi.logger.debug("RevPiFiles.on_btn_to_left_clicked")
override = None override = None
for item in self.tree_files_revpi.selectedItems(): for item in self.tree_files_revpi.selectedItems():
@@ -535,9 +535,9 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
self._load_files_local() self._load_files_local()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_delete_revpi_pressed(self): def on_btn_delete_revpi_clicked(self):
"""Remove selected files from working directory on revolution pi.""" """Remove selected files from working directory on revolution pi."""
pi.logger.debug("RevPiFiles.btn_delete_revpi_pressed") pi.logger.debug("RevPiFiles.btn_delete_revpi_clicked")
lst_delete = [] lst_delete = []
for item in self.tree_files_revpi.selectedItems(): for item in self.tree_files_revpi.selectedItems():

View File

@@ -166,12 +166,12 @@ class RevPiLogfile(QtWidgets.QMainWindow, Ui_win_revpilogfile):
self.th_data.resume() self.th_data.resume()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_daemon_pressed(self): def on_btn_daemon_clicked(self):
"""Clear the daemon log view.""" """Clear the daemon log view."""
self.txt_daemon.clear() self.txt_daemon.clear()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_app_pressed(self): def on_btn_app_clicked(self):
"""Clear the app log view.""" """Clear the app log view."""
self.txt_app.clear() self.txt_app.clear()

View File

@@ -123,7 +123,7 @@ class RevPiPlcList(QtWidgets.QDialog, Ui_diag_connections):
:return: Dialog status :return: Dialog status
""" """
self._load_settings() self._load_settings()
self.on_btn_add_pressed(presets) self.on_btn_add_clicked(presets)
return super(RevPiPlcList, self).exec() return super(RevPiPlcList, self).exec()
@QtCore.pyqtSlot(QtWidgets.QAbstractButton) @QtCore.pyqtSlot(QtWidgets.QAbstractButton)
@@ -231,15 +231,15 @@ class RevPiPlcList(QtWidgets.QDialog, Ui_diag_connections):
self.cbb_folder.setCurrentText(current.text(0) if current else "") self.cbb_folder.setCurrentText(current.text(0) if current else "")
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_up_pressed(self): def on_btn_up_clicked(self):
self._move_item(-1) self._move_item(-1)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_down_pressed(self): def on_btn_down_clicked(self):
self._move_item(1) self._move_item(1)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_delete_pressed(self): def on_btn_delete_clicked(self):
"""Remove selected entry.""" """Remove selected entry."""
item = self.tre_connections.currentItem() item = self.tre_connections.currentItem()
if item and item.type() == NodeType.CON: if item and item.type() == NodeType.CON:
@@ -253,7 +253,7 @@ class RevPiPlcList(QtWidgets.QDialog, Ui_diag_connections):
self._edit_state() self._edit_state()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_add_pressed(self, settings_preset: RevPiSettings = None): def on_btn_add_clicked(self, settings_preset: RevPiSettings = None):
"""Create new element.""" """Create new element."""
settings = settings_preset or RevPiSettings() settings = settings_preset or RevPiSettings()
new_item = QtWidgets.QTreeWidgetItem(NodeType.CON) new_item = QtWidgets.QTreeWidgetItem(NodeType.CON)

View File

@@ -318,7 +318,7 @@ class RevPiProgram(QtWidgets.QDialog, Ui_diag_program):
self.cbx_pictory.setEnabled(index >= 1) self.cbx_pictory.setEnabled(index >= 1)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_program_download_pressed(self): def on_btn_program_download_clicked(self):
"""Download plc program from Revolution Pi.""" """Download plc program from Revolution Pi."""
if not helper.cm.connected: if not helper.cm.connected:
return return
@@ -396,7 +396,7 @@ class RevPiProgram(QtWidgets.QDialog, Ui_diag_program):
) )
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_program_upload_pressed(self): def on_btn_program_upload_clicked(self):
"""Upload plc program to Revolution Pi.""" """Upload plc program to Revolution Pi."""
if not helper.cm.connected: if not helper.cm.connected:
return return
@@ -589,7 +589,7 @@ class RevPiProgram(QtWidgets.QDialog, Ui_diag_program):
# region # REGION: Control files # region # REGION: Control files
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_pictory_download_pressed(self): def on_btn_pictory_download_clicked(self):
"""Download piCtory configuration.""" """Download piCtory configuration."""
if not helper.cm.connected: if not helper.cm.connected:
return return
@@ -630,7 +630,7 @@ class RevPiProgram(QtWidgets.QDialog, Ui_diag_program):
) )
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_pictory_upload_pressed(self): def on_btn_pictory_upload_clicked(self):
if not helper.cm.connected: if not helper.cm.connected:
return return
@@ -650,7 +650,7 @@ class RevPiProgram(QtWidgets.QDialog, Ui_diag_program):
self._upload_pictory(diag_open.selectedFiles()[0]) self._upload_pictory(diag_open.selectedFiles()[0])
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def on_btn_procimg_download_pressed(self): def on_btn_procimg_download_clicked(self):
"""Download process image.""" """Download process image."""
if not helper.cm.connected: if not helper.cm.connected:
return return

View File

@@ -36,15 +36,18 @@ class Ui_wid_debugcontrol(object):
self.verticalLayout = QtWidgets.QVBoxLayout(self.gb_control) self.verticalLayout = QtWidgets.QVBoxLayout(self.gb_control)
self.verticalLayout.setObjectName("verticalLayout") self.verticalLayout.setObjectName("verticalLayout")
self.btn_read_io = QtWidgets.QPushButton(self.gb_control) self.btn_read_io = QtWidgets.QPushButton(self.gb_control)
self.btn_read_io.setShortcut("F4") self.btn_read_io.setAutoRepeat(True)
self.btn_read_io.setAutoRepeatDelay(100)
self.btn_read_io.setAutoRepeatInterval(200)
self.btn_read_io.setObjectName("btn_read_io") self.btn_read_io.setObjectName("btn_read_io")
self.verticalLayout.addWidget(self.btn_read_io) self.verticalLayout.addWidget(self.btn_read_io)
self.btn_refresh_io = QtWidgets.QPushButton(self.gb_control) self.btn_refresh_io = QtWidgets.QPushButton(self.gb_control)
self.btn_refresh_io.setShortcut("F5") self.btn_refresh_io.setAutoRepeat(True)
self.btn_refresh_io.setAutoRepeatDelay(100)
self.btn_refresh_io.setAutoRepeatInterval(200)
self.btn_refresh_io.setObjectName("btn_refresh_io") self.btn_refresh_io.setObjectName("btn_refresh_io")
self.verticalLayout.addWidget(self.btn_refresh_io) self.verticalLayout.addWidget(self.btn_refresh_io)
self.btn_write_o = QtWidgets.QPushButton(self.gb_control) self.btn_write_o = QtWidgets.QPushButton(self.gb_control)
self.btn_write_o.setShortcut("F6")
self.btn_write_o.setObjectName("btn_write_o") self.btn_write_o.setObjectName("btn_write_o")
self.verticalLayout.addWidget(self.btn_write_o) self.verticalLayout.addWidget(self.btn_write_o)
self.cbx_refresh = QtWidgets.QCheckBox(self.gb_control) self.cbx_refresh = QtWidgets.QCheckBox(self.gb_control)
@@ -65,9 +68,13 @@ class Ui_wid_debugcontrol(object):
self.gb_devices.setTitle(_translate("wid_debugcontrol", "Revolution Pi devices")) self.gb_devices.setTitle(_translate("wid_debugcontrol", "Revolution Pi devices"))
self.cbx_stay_on_top.setText(_translate("wid_debugcontrol", "Open to stay on top")) self.cbx_stay_on_top.setText(_translate("wid_debugcontrol", "Open to stay on top"))
self.gb_control.setTitle(_translate("wid_debugcontrol", "IO Control")) self.gb_control.setTitle(_translate("wid_debugcontrol", "IO Control"))
self.btn_read_io.setToolTip(_translate("wid_debugcontrol", "Read all IO values and discard local changes (F4)")) self.btn_read_io.setToolTip(_translate("wid_debugcontrol", "Read all IO values and discard local changes (F4)\n"
"\n"
"Hold this button pressed and it will refresh the IOs every 200 ms."))
self.btn_read_io.setText(_translate("wid_debugcontrol", "Read &all IO values")) self.btn_read_io.setText(_translate("wid_debugcontrol", "Read &all IO values"))
self.btn_refresh_io.setToolTip(_translate("wid_debugcontrol", "Refresh all IO values which are locally not changed (F5)")) self.btn_refresh_io.setToolTip(_translate("wid_debugcontrol", "Refresh all IO values which are locally not changed (F5)\n"
"\n"
"Hold this button pressed and it will refresh the IOs every 200 ms."))
self.btn_refresh_io.setText(_translate("wid_debugcontrol", "&Refresh unchanged IOs")) self.btn_refresh_io.setText(_translate("wid_debugcontrol", "&Refresh unchanged IOs"))
self.btn_write_o.setToolTip(_translate("wid_debugcontrol", "Write locally changed output values to process image (F6)")) self.btn_write_o.setToolTip(_translate("wid_debugcontrol", "Write locally changed output values to process image (F6)"))
self.btn_write_o.setText(_translate("wid_debugcontrol", "&Write changed outputs")) self.btn_write_o.setText(_translate("wid_debugcontrol", "&Write changed outputs"))

View File

@@ -53,26 +53,42 @@
<item> <item>
<widget class="QPushButton" name="btn_read_io"> <widget class="QPushButton" name="btn_read_io">
<property name="toolTip"> <property name="toolTip">
<string>Read all IO values and discard local changes (F4)</string> <string>Read all IO values and discard local changes (F4)
Hold this button pressed and it will refresh the IOs every 200 ms.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Read &amp;all IO values</string> <string>Read &amp;all IO values</string>
</property> </property>
<property name="shortcut"> <property name="autoRepeat">
<string notr="true">F4</string> <bool>true</bool>
</property>
<property name="autoRepeatDelay">
<number>100</number>
</property>
<property name="autoRepeatInterval">
<number>200</number>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btn_refresh_io"> <widget class="QPushButton" name="btn_refresh_io">
<property name="toolTip"> <property name="toolTip">
<string>Refresh all IO values which are locally not changed (F5)</string> <string>Refresh all IO values which are locally not changed (F5)
Hold this button pressed and it will refresh the IOs every 200 ms.</string>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Refresh unchanged IOs</string> <string>&amp;Refresh unchanged IOs</string>
</property> </property>
<property name="shortcut"> <property name="autoRepeat">
<string notr="true">F5</string> <bool>true</bool>
</property>
<property name="autoRepeatDelay">
<number>100</number>
</property>
<property name="autoRepeatInterval">
<number>200</number>
</property> </property>
</widget> </widget>
</item> </item>
@@ -84,9 +100,6 @@
<property name="text"> <property name="text">
<string>&amp;Write changed outputs</string> <string>&amp;Write changed outputs</string>
</property> </property>
<property name="shortcut">
<string notr="true">F6</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>