caricameto defaults da inerfaccia, parte prima
This commit is contained in:
@@ -156,6 +156,26 @@ class bananaTitolo(PyQt5.QtWidgets.QWidget):
|
||||
self.advtitolo = bananaTitoloAvanzate(self.conf)
|
||||
self.advtitolo.okSig.connect(self.avanzateOk)
|
||||
self.advtitolo.koSig.connect(self.avanzateKo)
|
||||
# imposta predefiniti interfaccia da file
|
||||
#Data (la piu complicata)
|
||||
self.titoloui.chk_data.setChecked(self.conf.getParam('docStruct','outDate'))
|
||||
if self.conf.getParam('docStruct', 'outDateType') is 'jpn':
|
||||
self.titoloui.rad_datajpn.setChecked(True)
|
||||
elif self.conf.getParam('docStruct', 'outDateType') is 'it':
|
||||
self.titoloui.rad_dataita.setChecked(True)
|
||||
elif self.conf.getParam('docStruct', 'outDateType') is 'usa':
|
||||
self.titoloui.rad_datausa.setChecked(True)
|
||||
#Titolo
|
||||
self.titoloui.chk_titolo.setChecked(self.conf.getParam('docStruct','outTitle'))
|
||||
self.titoloui.spn_ncarat.setValue(self.conf.getParam('docStruct', 'maxTitleLen'))
|
||||
#Numero Documento
|
||||
self.titoloui.chk_docnum.setChecked(self.conf.getParam('docStruct','outNumber'))
|
||||
#Separatore
|
||||
for c in self.titoloui.lyt_sep.children():
|
||||
if isinstance(c, PyQt5.QtWidgets.QRadioButton):
|
||||
if c.text() == self.conf.getParam('docStruct', 'outNameSep'):
|
||||
c.setChecked(True)
|
||||
self.titoloui.lin_altro.setText(self.conf.getParam('docStruct', 'customSep'))
|
||||
pass
|
||||
|
||||
def spawnAvanzate(self):
|
||||
@@ -165,8 +185,33 @@ class bananaTitolo(PyQt5.QtWidgets.QWidget):
|
||||
|
||||
def avanzateOk(self):
|
||||
self.log.debug("Avanzate Accettate")
|
||||
pass
|
||||
|
||||
if self.advtitolo.titoloavui.rad_dataprimo:
|
||||
self.conf.setParam(('docStruct', 'datePos'), 1)
|
||||
elif self.advtitolo.titoloavui.rad_datasecondo:
|
||||
self.conf.setParam(('docStruct', 'datePos'), 2)
|
||||
elif self.advtitolo.titoloavui.rad_dataterzo:
|
||||
self.conf.setParam(('docStruct', 'datePos'), 3)
|
||||
else:
|
||||
self.conf.setParam(('docStruct', 'datePos'), -1)
|
||||
|
||||
if self.advtitolo.titoloavui.rad_numeroprimo:
|
||||
self.conf.setParam(('docStruct', 'numberPos'), 1)
|
||||
elif self.advtitolo.titoloavui.rad_numerosecondo:
|
||||
self.conf.setParam(('docStruct', 'numberPos'), 2)
|
||||
elif self.advtitolo.titoloavui.rad_numeroterzo:
|
||||
self.conf.setParam(('docStruct', 'numberPos'), 3)
|
||||
else:
|
||||
self.conf.setParam(('docStruct', 'numberPos'), -1)
|
||||
|
||||
if self.advtitolo.titoloavui.rad_titoloprimo:
|
||||
self.conf.setParam(('docStruct', 'titlePos'), 1)
|
||||
elif self.advtitolo.titoloavui.rad_titolosecondo:
|
||||
self.conf.setParam(('docStruct', 'titlePos'), 2)
|
||||
elif self.advtitolo.titoloavui.rad_titoloterzo:
|
||||
self.conf.setParam(('docStruct', 'titlePos'), 3)
|
||||
else:
|
||||
self.conf.setParam(('docStruct', 'titlePos'), -1)
|
||||
|
||||
def avanzateKo(self):
|
||||
self.log.debug("Avanzate Rifiutate")
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user