This commit is contained in:
2023-02-21 14:55:46 +01:00
3 changed files with 11 additions and 9 deletions

View File

@@ -32,6 +32,7 @@ from pyqtacc.bdbase.savehdf import QSaveHDF
from pyqtacc.bdbase.hdf5filemenu import HDF5GroupBox
from pyqtacc.bdbase.sendelog import QSendToELOG
from pyqtacc.bdbase.screenshot import QScreenshot
from pyqtacc.bdbase.guiframe import GUIFrame
@@ -508,6 +509,7 @@ class BaseWindow(QMainWindow):
from pyqtacc.sls.guiheader import GUIHeader
from pyqtacc.sls.sendelogsls import QSendToELOG
self.gui_header = GUIHeader(self, user_mode=self.user_mode,
extended=extended)
self.mainwindow_layout.addWidget(self.gui_header.header_wgt)

View File

@@ -1665,7 +1665,10 @@ class GUIFrame(QWidget):
wgt_grid.addWidget(qFrame, irow, 0, 1, 4)
def input_wgt(self, buddy, label, key, value, irow=0, wgt_grid=None):
def input_wgt(self, buddy, label, key, value, irow=0, wgt_grid=None,):
if "QVLINE" in buddy:
print("QVLine", label, key, value)
if "QVLINE" in buddy:
print("QVLine", label, key, value)

View File

@@ -71,8 +71,7 @@ class QSendToELOGFrame(QDialog):
_line(), mess)
self.logbook = logbook
print("logbook===>", self.logbook)
print("message===>", message)
self.elog_items.setCurrentIndex(idx)
self.elog_items.currentIndexChanged.emit(idx)
self.elog_items.setObjectName("Elog")
@@ -181,6 +180,7 @@ class QSendToELOGFrame(QDialog):
self.messagelbl.setStyleSheet("QLabel { color : red; }")
self.layout.addWidget(self.messagelbl)
self.layout.addLayout(btnLayout)
self.setMinimumWidth(440)
#self.exec()
@@ -213,7 +213,6 @@ class QSendToELOGFrame(QDialog):
self.attributes['Wann'] = str(time.time())
print("self.attachFile", self.attachFile)
if self.attachFile is not None:
_attachFile = []
@@ -231,16 +230,13 @@ class QSendToELOGFrame(QDialog):
else:
self.files.append(self.destination + str(_attachFile[i]))
print("self.files", self.files)
el = self.elog_items.currentText()
print("el==============>", el)
url = self.parent.settings.data["ElogBooks"][el]["url"]
self.logbook = elog.open(url, user='robot', password='robot')
print("sendelogframe.py========>: ", url, flush=True)
print(message, flush=True)
try:
if self.files:
self.logbook.post(message, attributes=self.attributes,
@@ -325,3 +321,4 @@ class QSendToELOGFrame(QDialog):
layout_items.extend(layout_items_optional)
return layout_items