[Kst] branches/work/kst/1.6/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Thu Dec 6 20:32:04 CET 2007
SVN commit 745668 by arwalker:
BUG:153153 Fix hierarchical naming convention for event monitor
M +9 -9 ksteventmonitor_i.cpp
M +19 -9 ksteventmonitorentry.cpp
M +4 -3 ksteventmonitorentry.h
--- branches/work/kst/1.6/kst/src/libkstapp/ksteventmonitor_i.cpp #745667:745668
@@ -226,15 +226,15 @@
bool KstEventMonitorI::editSingleObject(EventMonitorEntryPtr emPtr) {
emPtr->writeLock();
-
+
if (_lineEditEquationDirty) {
emPtr->setEvent(_w->lineEditEquation->text());
}
-
+
if (_lineEditDescriptionDirty) {
emPtr->setDescription(_w->lineEditDescription->text());
}
-
+
if (_checkBoxDebugDirty) {
if (!(_w->radioButtonLogNotice->isChecked() ||
_w->radioButtonLogWarning->isChecked() ||
@@ -322,11 +322,11 @@
_tagName->setFocus();
return false;
}
-
+
ep->writeLock();
- ep->setTagName(KstObjectTag(tag_name, ep->tag().context())); // FIXME: doesn't allow changing tag context
+ ep->setTagName(tag_name);
ep->unlock();
-
+
// then edit the object
_lineEditEquationDirty = true;
_lineEditDescriptionDirty = true;
@@ -367,10 +367,10 @@
_w->checkBoxELOGNotify->setTristate(true);
_w->checkBoxELOGNotify->setNoChange();
-
+
_tagName->setText("");
_tagName->setEnabled(false);
-
+
_w->lineEditEMailRecipients->setEnabled(true);
_w->radioButtonLogNotice->setEnabled(true);
_w->radioButtonLogWarning->setEnabled(true);
@@ -381,7 +381,7 @@
_w->_useScript->setChecked(false);
_w->_script->setEnabled(false);
_w->_script->setText("");
-
+
// and clean all the fields
_lineEditEquationDirty = false;
_lineEditDescriptionDirty = false;
--- branches/work/kst/1.6/kst/src/libkstapp/ksteventmonitorentry.cpp #745667:745668
@@ -338,13 +338,13 @@
bool EventMonitorEntry::event(QEvent *e) {
- if (e->type() == EventMonitorEventType) {
- readLock();
- doLog(static_cast<EventMonitorEvent*>(e)->logMessage);
- unlock();
- return true;
- }
- return false;
+ if (e->type() == EventMonitorEventType) {
+ readLock();
+ doLog(static_cast<EventMonitorEvent*>(e)->logMessage);
+ unlock();
+ return true;
+ }
+ return false;
}
@@ -582,6 +582,16 @@
}
+void EventMonitorEntry::setTagName(const QString &in_tag) {
+ KstObjectTag newTag(in_tag, tag().context());
+
+ if (newTag == tag()) {
+ return;
+ }
+
+ KstObject::setTagName(newTag);
+ (*_xVector)->setTagName(KstObjectTag("x", tag()));
+ (*_yVector)->setTagName(KstObjectTag("y", tag()));
+}
+
#include "ksteventmonitorentry.moc"
-
-// vim: ts=2 sw=2 et
--- branches/work/kst/1.6/kst/src/libkstapp/ksteventmonitorentry.h #745667:745668
@@ -38,6 +38,8 @@
UpdateType update(int updateCounter = -1);
void save(QTextStream &ts, const QString& indent = QString::null);
QString propertyString() const;
+
+ virtual void setTagName(const QString& tag);
void showNewDialog();
void showEditDialog();
@@ -66,9 +68,9 @@
void setEMailRecipients(const QString& str);
bool reparse();
-
+
KstDataObjectPtr makeDuplicate(KstDataObjectDataObjectMap& duplicatedMap);
-
+
void replaceDependency(KstDataObjectPtr oldObject, KstDataObjectPtr newObject);
void replaceDependency(KstVectorPtr oldVector, KstVectorPtr newVector);
@@ -111,4 +113,3 @@
typedef KstObjectList<EventMonitorEntryPtr> KstEventMonitorEntryList;
#endif
-// vim: ts=2 sw=2 et
More information about the Kst
mailing list