permane il bug per cui dalle avanzate titolo non posso salvare
potrebbe essere il fatto che passa la classe di configurazione non per puntatore ma per copia
This commit is contained in:
@@ -3,4 +3,5 @@ encoding//bananaSPLIT/UserInterface/compiledUI/avanzatetitolo.py=utf-8
|
||||
encoding//bananaSPLIT/UserInterface/compiledUI/avanzatetitolo3.py=utf-8
|
||||
encoding//bananaSPLIT/UserInterface/compiledUI/mainwindow.py=utf-8
|
||||
encoding//bananaSPLIT/UserInterface/compiledUI/opzioniavanzate.py=utf-8
|
||||
encoding//bananaSPLIT/UserInterface/compiledUI/selezout.py=utf-8
|
||||
encoding//bananaSPLIT/UserInterface/compiledUI/titolow.py=utf-8
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
"INworkPath": "D:/Emanuele/Documenti/workspace/bananaSPLIT/TestFiles",
|
||||
"OUTworkPath": "D:/Emanuele/Documenti/workspace/bananaSPLIT/TestFiles",
|
||||
"fileList": [
|
||||
".",
|
||||
"..",
|
||||
"GUARDIAN 1993.txt",
|
||||
"GUARDIAN 1996.txt",
|
||||
"GUARDIAN 1999.txt",
|
||||
@@ -34,19 +32,19 @@
|
||||
"language": "scelto da languageconf.json",
|
||||
"docSep": "\\s*Copyright [(0-9)]+",
|
||||
"dateFormat": "{month} {day:d}, {year:d}{}",
|
||||
"outPrefix": "123",
|
||||
"outSuffix": "456",
|
||||
"outPrefix": "p",
|
||||
"outSuffix": "s",
|
||||
"outDateType": "jpn",
|
||||
"outNameFormat": "",
|
||||
"outDate": true,
|
||||
"outNumber": true,
|
||||
"outTitle": false,
|
||||
"outTitle": true,
|
||||
"outNumber": false,
|
||||
"numberPos": 1,
|
||||
"datePos": 2,
|
||||
"titlePos": 3,
|
||||
"maxTitleLen": 6,
|
||||
"outNameSep": "_",
|
||||
"customSep": "~",
|
||||
"maxTitleLen": 12,
|
||||
"outNameSep": ",",
|
||||
"customSep": "=",
|
||||
"dateFormats": {
|
||||
"jpn": "{year:04d}{month:02d}{day:02d}",
|
||||
"it": "{day:02d}{month:02d}{year:04d}",
|
||||
|
||||
@@ -20,6 +20,7 @@ from libconfload import bananaCONF
|
||||
from libsplit import bananaSPLITTER
|
||||
|
||||
from PyQt5.QtCore import QDir
|
||||
import copy
|
||||
|
||||
class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
||||
def __init__(self):
|
||||
@@ -30,7 +31,6 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
||||
self.conf.open()
|
||||
self.conf.use("defaults.json")
|
||||
self.conf.use(self.conf.getParam('paths', 'lastUsed'))
|
||||
print(self.conf.inUse)
|
||||
except:
|
||||
sys.exit()
|
||||
|
||||
@@ -86,7 +86,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
||||
self.advopt.fillInterface()
|
||||
|
||||
def fillFileList(self):
|
||||
fl = QDir(self.conf.getParam('paths','INworkPath')).entryList()
|
||||
fl = QDir(self.conf.getParam('paths','INworkPath')).entryList(QDir.NoDotAndDotDot | QDir.Files)
|
||||
self.ui.lst_files.clear()
|
||||
for f in fl:
|
||||
self.ui.lst_files.addItem(PyQt5.QtWidgets.QListWidgetItem(f))
|
||||
@@ -103,8 +103,6 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
||||
pass
|
||||
|
||||
def openLoadPreset(self):
|
||||
self.logger.debug("Forzo applica a tutte le tab")
|
||||
self.applica()
|
||||
self.logger.debug("Apri Carica Preset")
|
||||
lf = PyQt5.QtWidgets.QFileDialog(self,"Carica Preset",self.conf.getParam('paths', 'configurationPath'))
|
||||
lf.setAcceptMode(PyQt5.QtWidgets.QFileDialog.AcceptOpen)
|
||||
@@ -115,13 +113,14 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
||||
self.logger.debug("Scelto il File: {}".format(cf))
|
||||
self.conf.open()
|
||||
self.conf.use(cf)
|
||||
self.logger.debug("Riempio tutte le tab")
|
||||
self.fillAllInterfaces()
|
||||
pass
|
||||
|
||||
def openSavePreset(self):
|
||||
self.logger.debug("Apri Salva Preset")
|
||||
self.logger.debug("Forzo applica a tutte le tab")
|
||||
self.applica()
|
||||
self.applicaTutto()
|
||||
sf = PyQt5.QtWidgets.QFileDialog(self,"Salva Preset",self.conf.getParam('paths', 'configurationPath'))
|
||||
sf.setAcceptMode(PyQt5.QtWidgets.QFileDialog.AcceptSave)
|
||||
sf.setNameFilter("bananaCONF (*.json)")
|
||||
@@ -161,7 +160,7 @@ class bananaMain(PyQt5.QtWidgets.QMainWindow):
|
||||
self.log.debug("Apro in directory: {}".format(path))
|
||||
return
|
||||
|
||||
def applica(self):
|
||||
def applicaTutto(self):
|
||||
self.titolo.applica()
|
||||
self.titoloav.applica()
|
||||
self.selezout.applica()
|
||||
@@ -233,7 +232,7 @@ class bananaTitolo(PyQt5.QtWidgets.QWidget):
|
||||
for itmn in range(self.titoloui.lyt_sep.count()):
|
||||
itm=self.titoloui.lyt_sep.itemAt(itmn).widget()
|
||||
if isinstance(itm, PyQt5.QtWidgets.QRadioButton):
|
||||
if len(itm.text())==1 and itm.isChecked:
|
||||
if len(itm.text())==1 and itm.isChecked():
|
||||
self.conf.setParam(('docStruct', 'outNameSep'), itm.text())
|
||||
pass
|
||||
|
||||
@@ -330,6 +329,8 @@ class bananaTitoloAvanzate(PyQt5.QtWidgets.QWidget):
|
||||
def returnOk(self):
|
||||
self.log.debug("Avanzate Titolo Accettate")
|
||||
self.applica()
|
||||
print(self.conf.getParam('docStruct','outPrefix'))
|
||||
print(self.conf.getParam('docStruct','outSuffix'))
|
||||
self.hide()
|
||||
pass
|
||||
|
||||
@@ -367,8 +368,8 @@ class bananaTitoloAvanzate(PyQt5.QtWidgets.QWidget):
|
||||
else:
|
||||
self.conf.setParam(('docStruct', 'titlePos'), -1)
|
||||
#prefisso e suffisso
|
||||
self.conf.setParam(('docStruct', 'outPrefix'), self.titoloavui.txt_prefisso.text())
|
||||
self.conf.setParam(('docStruct', 'outSuffix'), self.titoloavui.txt_suffisso.text())
|
||||
self.conf.setParam(('docStruct','outPrefix'), self.titoloavui.txt_prefisso.text())
|
||||
self.conf.setParam(('docStruct','outSuffix'), self.titoloavui.txt_suffisso.text())
|
||||
|
||||
|
||||
class bananaSelezOut(PyQt5.QtWidgets.QWidget):
|
||||
|
||||
Reference in New Issue
Block a user