forked from openlp/openlp
Audit database
This commit is contained in:
parent
341916d610
commit
3821af30b7
@ -27,7 +27,7 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from datetime import date
|
||||
|
||||
from openlp.core.lib import Plugin, Receiver, translate, str_to_bool
|
||||
from openlp.core.lib import Plugin, Receiver, translate, str_to_bool
|
||||
from openlp.plugins.audit.lib import AuditTab, AuditManager
|
||||
|
||||
class AuditPlugin(Plugin):
|
||||
@ -97,20 +97,10 @@ class AuditPlugin(Plugin):
|
||||
QtCore.SIGNAL(u'audit_live'), self.onReceiveAudit)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'audit_changed'), self.onUpdateAudit)
|
||||
self.auditFileName = self.config.get_config(u'audit file', u'')
|
||||
self.auditActive = str_to_bool(
|
||||
self.config.get_config(u'audit active', False))
|
||||
if self.auditFileName == u'':
|
||||
self.auditActive = False
|
||||
self.ToolsAuditItem.setEnabled(False)
|
||||
self.auditFile = None
|
||||
else:
|
||||
self.auditFile = open(self.auditFileName, u'a')
|
||||
self.ToolsAuditItem.setChecked(self.auditActive)
|
||||
try:
|
||||
self.auditmanager = AuditManager()
|
||||
except:
|
||||
log.exception(u'oops')
|
||||
self.auditmanager = AuditManager()
|
||||
|
||||
def toggleAuditState(self):
|
||||
self.auditActive = not self.auditActive
|
||||
|
@ -22,5 +22,5 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from manager import AuditManager
|
||||
from audittab import AuditTab
|
||||
from manager import AuditManager
|
||||
|
@ -54,7 +54,7 @@ class ImageTab(SettingsTab):
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.TimeoutLayout.addItem(self.TimeoutSpacer)
|
||||
self.ImageLayout.setWidget(
|
||||
0, QtGui.QFormLayout.LabelRole, self.ImageModeGroupBox)
|
||||
0, QtGui.QFormLayout.LabelRole, self.ImageSettingsGroupBox)
|
||||
# Signals and slots
|
||||
QtCore.QObject.connect(self.TimeoutSpinBox,
|
||||
QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
|
||||
|
Loading…
Reference in New Issue
Block a user