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 = bananaTitoloAvanzate(self.conf)
|
||||||
self.advtitolo.okSig.connect(self.avanzateOk)
|
self.advtitolo.okSig.connect(self.avanzateOk)
|
||||||
self.advtitolo.koSig.connect(self.avanzateKo)
|
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
|
pass
|
||||||
|
|
||||||
def spawnAvanzate(self):
|
def spawnAvanzate(self):
|
||||||
@@ -165,7 +185,32 @@ class bananaTitolo(PyQt5.QtWidgets.QWidget):
|
|||||||
|
|
||||||
def avanzateOk(self):
|
def avanzateOk(self):
|
||||||
self.log.debug("Avanzate Accettate")
|
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):
|
def avanzateKo(self):
|
||||||
self.log.debug("Avanzate Rifiutate")
|
self.log.debug("Avanzate Rifiutate")
|
||||||
|
|||||||
@@ -12,15 +12,22 @@
|
|||||||
"dateFormat": "{month} {day:d}, {year:d}{}",
|
"dateFormat": "{month} {day:d}, {year:d}{}",
|
||||||
"outPrefix": "DEFP",
|
"outPrefix": "DEFP",
|
||||||
"outSuffix": "DEFS",
|
"outSuffix": "DEFS",
|
||||||
"outDateFormat": "{year:04d}{month:02d}{day:02d}",
|
"outDateType": "jpn",
|
||||||
"outInterFormat": "{docnum}_{date}_{title}",
|
"outNameFormat": "",
|
||||||
"outNameFormat": "{prefisso}_{inter}_{suffisso}.txt",
|
|
||||||
"outDate": true,
|
"outDate": true,
|
||||||
"outNumber": true,
|
"outNumber": true,
|
||||||
"outTitle": true,
|
"outTitle": true,
|
||||||
"numberPos": 1,
|
"numberPos": 1,
|
||||||
"datePos": 2,
|
"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": {
|
"settings": {
|
||||||
"encoding": "utf-8",
|
"encoding": "utf-8",
|
||||||
@@ -31,7 +38,6 @@
|
|||||||
"removeDuplicates": true,
|
"removeDuplicates": true,
|
||||||
"showSkipped": true,
|
"showSkipped": true,
|
||||||
"showRemovedDuplicates": false,
|
"showRemovedDuplicates": false,
|
||||||
"maxTitleLen": 32,
|
|
||||||
"loadTXT": true,
|
"loadTXT": true,
|
||||||
"loadDOCX": false,
|
"loadDOCX": false,
|
||||||
"removeOldFiles": true,
|
"removeOldFiles": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user