Audit database

This commit is contained in:
Tim Bentley 2009-09-22 20:36:25 +01:00
parent 341916d610
commit 3821af30b7
3 changed files with 4 additions and 14 deletions

View File

@ -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')
def toggleAuditState(self):
self.auditActive = not self.auditActive

View File

@ -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

View File

@ -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)