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
|
||||
|
||||
@@ -12,15 +12,22 @@
|
||||
"dateFormat": "{month} {day:d}, {year:d}{}",
|
||||
"outPrefix": "DEFP",
|
||||
"outSuffix": "DEFS",
|
||||
"outDateFormat": "{year:04d}{month:02d}{day:02d}",
|
||||
"outInterFormat": "{docnum}_{date}_{title}",
|
||||
"outNameFormat": "{prefisso}_{inter}_{suffisso}.txt",
|
||||
"outDateType": "jpn",
|
||||
"outNameFormat": "",
|
||||
"outDate": true,
|
||||
"outNumber": true,
|
||||
"outTitle": true,
|
||||
"numberPos": 1,
|
||||
"datePos": 2,
|
||||
"titlePos": 3
|
||||
"titlePos": 3,
|
||||
"maxTitleLen": 32,
|
||||
"outNameSep": "-",
|
||||
"customSep": "",
|
||||
"dateFormats": {
|
||||
"jpn": "{year:04d}{month:02d}{day:02d}",
|
||||
"it": "{day:02d}{month:02d}{year:04d}",
|
||||
"usa": "{month:02d}{year:04d}{day:02d}"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"encoding": "utf-8",
|
||||
@@ -31,7 +38,6 @@
|
||||
"removeDuplicates": true,
|
||||
"showSkipped": true,
|
||||
"showRemovedDuplicates": false,
|
||||
"maxTitleLen": 32,
|
||||
"loadTXT": true,
|
||||
"loadDOCX": false,
|
||||
"removeOldFiles": true,
|
||||
|
||||
Reference in New Issue
Block a user