prefs.recordSpinBox->setValue(m_recordLimitVal);
prefs.daysLimit->setCheckState(m_daysLimitCheck ? Qt::Checked : Qt::Unchecked);
prefs.daysSpinBox->setValue(m_daysLimitVal);
+ prefs.checkMessages->setCheckState(m_checkMessages ? Qt::Checked : Qt::Unchecked);
+ prefs.checkMessagesSpin->setValue(m_checkMessagesInterval);
prefs.exec();
}
mainWin->m_recordLimitVal = this->recordSpinBox->value();
mainWin->m_daysLimitCheck = this->daysLimit->checkState() == Qt::Checked;
mainWin->m_daysLimitVal = this->daysSpinBox->value();
+ mainWin->m_checkMessages = this->checkMessages->checkState() == Qt::Checked;
+ mainWin->m_checkMessagesInterval = this->checkMessagesSpin->value();
QSettings settings("www.bacula.org", "bat");
- settings.beginGroup("Messages");
+ settings.beginGroup("Debug");
settings.setValue("commDebug", mainWin->m_commDebug);
settings.setValue("displayAll", mainWin->m_displayAll);
settings.setValue("sqlDebug", mainWin->m_sqlDebug);
settings.setValue("commandDebug", mainWin->m_commandDebug);
settings.setValue("miscDebug", mainWin->m_miscDebug);
+ settings.endGroup();
+ settings.beginGroup("JobList");
settings.setValue("recordLimitCheck", mainWin->m_recordLimitCheck);
settings.setValue("recordLimitVal", mainWin->m_recordLimitVal);
settings.setValue("daysLimitCheck", mainWin->m_daysLimitCheck);
settings.setValue("daysLimitVal", mainWin->m_daysLimitVal);
settings.endGroup();
+ settings.beginGroup("Messages");
+ settings.setValue("checkMessages", mainWin->m_checkMessages);
+ settings.setValue("checkMessagesInterval", mainWin->m_checkMessagesInterval);
+ settings.endGroup();
+ foreach(Console *console, mainWin->m_consoleHash) {
+ console->startTimer();
+ }
}
void prefsDialog::reject()
void MainWin::readPreferences()
{
QSettings settings("www.bacula.org", "bat");
- settings.beginGroup("Messages");
+ settings.beginGroup("Debug");
m_commDebug = settings.value("commDebug", false).toBool();
m_displayAll = settings.value("displayAll", false).toBool();
m_sqlDebug = settings.value("sqlDebug", false).toBool();
m_commandDebug = settings.value("commandDebug", false).toBool();
m_miscDebug = settings.value("miscDebug", false).toBool();
+ settings.endGroup();
+ settings.beginGroup("JobList");
m_recordLimitCheck = settings.value("recordLimitCheck", true).toBool();
m_recordLimitVal = settings.value("recordLimitVal", 150).toInt();
m_daysLimitCheck = settings.value("daysLimitCheck", false).toBool();
m_daysLimitVal = settings.value("daysLimitVal", 28).toInt();
settings.endGroup();
+ settings.beginGroup("Messages");
+ m_checkMessages = settings.value("checkMessages", false).toBool();
+ m_checkMessagesInterval = settings.value("checkMessagesInterval", 28).toInt();
+ settings.endGroup();
}
<rect>
<x>0</x>
<y>0</y>
- <width>384</width>
- <height>378</height>
+ <width>415</width>
+ <height>396</height>
</rect>
</property>
<property name="sizePolicy" >
<property name="windowIcon" >
<iconset>images/bat.png</iconset>
</property>
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="geometry" >
- <rect>
- <x>9</x>
- <y>343</y>
- <width>366</width>
- <height>26</height>
- </rect>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
</property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <property name="spacing" >
+ <number>6</number>
</property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- <widget class="QWidget" name="layoutWidget" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>310</width>
- <height>25</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>81</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string><h2>Preferences</h2></string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>101</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="geometry" >
- <rect>
- <x>9</x>
- <y>40</y>
- <width>366</width>
- <height>297</height>
- </rect>
- </property>
- <property name="currentIndex" >
- <number>1</number>
- </property>
- <widget class="QWidget" name="tab" >
- <attribute name="title" >
- <string>Messages</string>
- </attribute>
- <widget class="QGroupBox" name="groupBox" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>30</y>
- <width>271</width>
- <height>181</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="1" column="0" >
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="currentIndex" >
+ <number>0</number>
</property>
- <property name="title" >
- <string>Debugging Options</string>
- </property>
- <widget class="QWidget" name="layoutWidget" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>21</y>
- <width>241</width>
- <height>131</height>
- </rect>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Messages</string>
+ </attribute>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>291</width>
+ <height>181</height>
+ </rect>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title" >
+ <string>Messages Options</string>
</property>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="commDebug" >
- <property name="text" >
- <string>Debug comm</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="displayAll" >
- <property name="text" >
- <string>Display all messages in console</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QCheckBox" name="commandDebug" >
- <property name="text" >
- <string>Debug Commands</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QCheckBox" name="sqlDebug" >
- <property name="text" >
- <string>Debug Sql queries</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QCheckBox" name="miscDebug" >
- <property name="text" >
- <string>Debug Miscelaneous Items</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </widget>
- <widget class="QWidget" name="tab_2" >
- <attribute name="title" >
- <string>Joblist</string>
- </attribute>
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="geometry" >
- <rect>
- <x>9</x>
- <y>62</y>
- <width>301</width>
- <height>146</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title" >
- <string>Jolist Limit Options</string>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
<layout class="QGridLayout" >
<property name="margin" >
- <number>0</number>
+ <number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="2" column="0" >
- <widget class="QCheckBox" name="daysLimit" >
+ <widget class="QLabel" name="checkLabel" >
<property name="text" >
- <string>Days Limit</string>
+ <string>Message check interval in seconds</string>
</property>
</widget>
</item>
- <item row="3" column="0" >
- <widget class="QSpinBox" name="daysSpinBox" >
- <property name="maximum" >
- <number>10000</number>
- </property>
- <property name="minimum" >
- <number>1</number>
- </property>
- <property name="singleStep" >
- <number>7</number>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="checkMessages" >
+ <property name="text" >
+ <string>Check Messages</string>
</property>
</widget>
</item>
<item row="1" column="0" >
- <widget class="QSpinBox" name="recordSpinBox" >
- <property name="maximum" >
- <number>10000</number>
- </property>
- <property name="minimum" >
- <number>1</number>
- </property>
- <property name="singleStep" >
- <number>25</number>
- </property>
- </widget>
+ <widget class="QSpinBox" name="checkMessagesSpin" />
</item>
+ </layout>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="tab_2" >
+ <attribute name="title" >
+ <string>Joblist</string>
+ </attribute>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>62</y>
+ <width>301</width>
+ <height>146</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title" >
+ <string>Jolist Limit Options</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
<item row="0" column="0" >
- <widget class="QCheckBox" name="recordLimit" >
- <property name="text" >
- <string>Record Limit</string>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
</property>
- </widget>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="daysLimit" >
+ <property name="text" >
+ <string>Days Limit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QSpinBox" name="daysSpinBox" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="singleStep" >
+ <number>7</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QSpinBox" name="recordSpinBox" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="singleStep" >
+ <number>25</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="recordLimit" >
+ <property name="text" >
+ <string>Record Limit</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
- </item>
- </layout>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="tab_3" >
+ <attribute name="title" >
+ <string>Debug</string>
+ </attribute>
+ <widget class="QGroupBox" name="groupBox_3" >
+ <property name="geometry" >
+ <rect>
+ <x>20</x>
+ <y>40</y>
+ <width>271</width>
+ <height>181</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title" >
+ <string>Debugging Options</string>
+ </property>
+ <widget class="QWidget" name="layoutWidget_2" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>21</y>
+ <width>241</width>
+ <height>131</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="commDebug" >
+ <property name="text" >
+ <string>Debug comm</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="displayAll" >
+ <property name="text" >
+ <string>Display all messages in console</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QCheckBox" name="commandDebug" >
+ <property name="text" >
+ <string>Debug Commands</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QCheckBox" name="sqlDebug" >
+ <property name="text" >
+ <string>Debug Sql queries</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QCheckBox" name="miscDebug" >
+ <property name="text" >
+ <string>Debug Miscelaneous Items</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>81</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="headingLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string><h2>Preferences</h2></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>101</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
</widget>
- </widget>
- </widget>
+ </item>
+ </layout>
</widget>
<resources/>
<connections>