[Kst] branches/work/kst/portto4/kst/src/libkstapp
Nicolas Brisset
nicolas.brisset at eurocopter.com
Wed Sep 22 23:50:29 CEST 2010
SVN commit 1178391 by brisset:
Fix small quirks with event monitor dialog:
- the detailed widgets (email, type of log, etc...) should be activated
only when the corresponding option is checked
- the expression should be updated when operators, scalars or vectors
are selected in the combo boxes
M +14 -0 eventmonitordialog.cpp
M +2 -0 eventmonitordialog.h
M +140 -76 eventmonitortab.ui
--- branches/work/kst/portto4/kst/src/libkstapp/eventmonitordialog.cpp #1178390:1178391
@@ -29,6 +29,9 @@
setTabTitle(tr("Event Monitor"));
connect(_equation, SIGNAL(textChanged(const QString &)), this, SLOT(selectionChanged()));
+ connect(_equationOperator, SIGNAL(activated(QString)), this, SLOT(equationOperatorUpdate(const QString&)));
+ connect(_vectorSelector, SIGNAL(selectionChanged(QString)), this, SLOT(equationUpdate(const QString&)));
+ connect(_scalarSelector, SIGNAL(selectionChanged(QString)), this, SLOT(equationUpdate(const QString&)));
connect(_debugLog, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
connect(_emailNotify, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
@@ -58,7 +61,18 @@
emit optionsChanged();
}
+void EventMonitorTab::equationUpdate(const QString& string) {
+ QString equation = _equation->text();
+ equation += "[" + string + "]";
+ _equation->setText(equation);
+}
+void EventMonitorTab::equationOperatorUpdate(const QString& string) {
+ QString equation = _equation->text();
+ equation += string;
+ _equation->setText(equation);
+}
+
void EventMonitorTab::logLevelChanged() {
_logLevelDirty = true;
}
--- branches/work/kst/portto4/kst/src/libkstapp/eventmonitordialog.h #1178390:1178391
@@ -69,6 +69,8 @@
private Q_SLOTS:
void selectionChanged();
void logLevelChanged();
+ void equationUpdate(const QString& string);
+ void equationOperatorUpdate(const QString& string);
Q_SIGNALS:
void optionsChanged();
--- branches/work/kst/portto4/kst/src/libkstapp/eventmonitortab.ui #1178390:1178391
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0" >
<class>EventMonitorTab</class>
<widget class="QWidget" name="EventMonitorTab" >
@@ -10,28 +11,16 @@
</rect>
</property>
<layout class="QGridLayout" >
- <property name="leftMargin" >
+ <property name="margin">
<number>9</number>
</property>
- <property name="topMargin" >
- <number>9</number>
- </property>
- <property name="rightMargin" >
- <number>9</number>
- </property>
- <property name="bottomMargin" >
- <number>9</number>
- </property>
- <property name="horizontalSpacing" >
+ <property name="spacing">
<number>0</number>
</property>
- <property name="verticalSpacing" >
- <number>0</number>
- </property>
<item row="2" column="0" >
<widget class="QGroupBox" name="_emailGroupBox" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -40,18 +29,9 @@
<string>E-Mail Notification</string>
</property>
<layout class="QHBoxLayout" >
- <property name="leftMargin" >
+ <property name="margin">
<number>0</number>
</property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
<item>
<widget class="QCheckBox" name="_emailNotify" >
<property name="text" >
@@ -60,7 +40,11 @@
</widget>
</item>
<item>
- <widget class="QLineEdit" name="_emailRecipients" />
+ <widget class="QLineEdit" name="_emailRecipients">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
</item>
</layout>
</widget>
@@ -68,7 +52,7 @@
<item row="0" column="0" >
<widget class="QGroupBox" name="_equationGroupBox" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -77,18 +61,9 @@
<string>Expression</string>
</property>
<layout class="QGridLayout" >
- <property name="leftMargin" >
+ <property name="margin">
<number>0</number>
</property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
<item row="1" column="0" >
<widget class="QLabel" name="textLabel2" >
<property name="text" >
@@ -166,12 +141,12 @@
</item>
<item>
<property name="text" >
- <string>></string>
+ <string>></string>
</property>
</item>
<item>
<property name="text" >
- <string>>=</string>
+ <string>>=</string>
</property>
</item>
<item>
@@ -287,7 +262,7 @@
</widget>
</item>
<item row="2" column="1" >
- <widget class="Kst::ScalarSelector" native="1" name="_scalarSelector" />
+ <widget class="Kst::ScalarSelector" name="_scalarSelector" native="true"/>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="textLabel3" >
@@ -303,7 +278,7 @@
<widget class="QLineEdit" name="_equation" />
</item>
<item row="1" column="1" >
- <widget class="Kst::VectorSelector" native="1" name="_vectorSelector" />
+ <widget class="Kst::VectorSelector" name="_vectorSelector" native="true"/>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="textLabel3_2" >
@@ -343,18 +318,9 @@
<string>KstScript</string>
</property>
<layout class="QHBoxLayout" >
- <property name="leftMargin" >
+ <property name="margin">
<number>0</number>
</property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
<item>
<widget class="QCheckBox" name="_executeScript" >
<property name="text" >
@@ -363,7 +329,11 @@
</widget>
</item>
<item>
- <widget class="QTextEdit" name="_script" />
+ <widget class="QTextEdit" name="_script">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
</item>
</layout>
</widget>
@@ -374,18 +344,9 @@
<string>ELOG</string>
</property>
<layout class="QHBoxLayout" >
- <property name="leftMargin" >
+ <property name="margin">
<number>0</number>
</property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
<item>
<widget class="QCheckBox" name="_ELOGNotify" >
<property name="text" >
@@ -395,6 +356,9 @@
</item>
<item>
<widget class="QPushButton" name="_ELOGConfigure" >
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="text" >
<string>&Configure...</string>
</property>
@@ -408,7 +372,7 @@
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>241</width>
<height>31</height>
@@ -422,7 +386,7 @@
<item row="1" column="0" >
<widget class="QGroupBox" name="_logButtonGroup" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -431,18 +395,9 @@
<string>Kst Debug Log</string>
</property>
<layout class="QGridLayout" >
- <property name="leftMargin" >
+ <property name="margin">
<number>0</number>
</property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
<item row="0" column="5" >
<spacer>
<property name="orientation" >
@@ -451,7 +406,7 @@
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>120</width>
<height>21</height>
@@ -461,6 +416,9 @@
</item>
<item row="0" column="3" >
<widget class="QRadioButton" name="_debugLogWarning" >
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="text" >
<string>&Warning</string>
</property>
@@ -468,6 +426,9 @@
</item>
<item row="0" column="4" >
<widget class="QRadioButton" name="_debugLogError" >
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="text" >
<string>&Error</string>
</property>
@@ -475,9 +436,15 @@
</item>
<item row="0" column="2" >
<widget class="QRadioButton" name="_debugLogNotice" >
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="text" >
<string>&Notice</string>
</property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item row="0" column="0" >
@@ -521,5 +488,102 @@
<tabstop>_ELOGConfigure</tabstop>
</tabstops>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>_emailNotify</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>_emailRecipients</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>40</x>
+ <y>258</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>106</x>
+ <y>256</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>_ELOGNotify</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>_ELOGConfigure</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>40</x>
+ <y>306</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>133</x>
+ <y>310</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>_executeScript</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>_script</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>39</x>
+ <y>393</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>139</x>
+ <y>391</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>_debugLog</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>_debugLogNotice</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>56</x>
+ <y>195</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>100</x>
+ <y>193</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>_debugLog</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>_debugLogWarning</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>63</x>
+ <y>204</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>208</x>
+ <y>199</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>_debugLog</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>_debugLogError</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>54</x>
+ <y>194</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>251</x>
+ <y>191</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
More information about the Kst
mailing list