[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Mon Nov 21 08:09:51 CET 2005
SVN commit 481937 by staikos:
update the dialog when selection changes
M +9 -0 changenptsdialog.ui
M +23 -2 kstchangenptsdialog_i.cpp
M +1 -0 kstchangenptsdialog_i.h
--- trunk/extragear/graphics/kst/kst/changenptsdialog.ui #481936:481937
@@ -168,6 +168,12 @@
<receiver>KstChangeNptsDialog</receiver>
<slot>reject()</slot>
</connection>
+ <connection>
+ <sender>CurveList</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>KstChangeNptsDialog</receiver>
+ <slot>updateTimeCombo()</slot>
+ </connection>
</connections>
<tabstops>
<tabstop>CurveList</tabstop>
@@ -177,6 +183,9 @@
<tabstop>Apply</tabstop>
<tabstop>Cancel</tabstop>
</tabstops>
+<slots>
+ <slot access="private">updateTimeCombo()</slot>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<includes>
<include location="global" impldecl="in implementation">datarangewidget.h</include>
--- trunk/extragear/graphics/kst/kst/kstchangenptsdialog_i.cpp #481936:481937
@@ -89,9 +89,9 @@
void KstChangeNptsDialogI::applyNptsChange() {
KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
- for (uint i_vector = 0; i_vector < CurveList->count(); i_vector++) {
+ for (uint i_vector = 0; i_vector < CurveList->count(); ++i_vector) {
if (CurveList->isSelected(i_vector)) {
- KstRVectorPtr vector = rvl[i_vector];
+ KstRVectorPtr vector = rvl[i_vector]; // FIXME: broken
int f0, n;
vector->readLock();
if (_kstDataRange->isStartRelativeTime() && vector->dataSource()) {
@@ -162,5 +162,26 @@
}
+void KstChangeNptsDialogI::updateTimeCombo() {
+ KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
+ int cnt = CurveList->count();
+ bool supportsTime = true;
+ for (uint i = 0; i < cnt; ++i) {
+ if (CurveList->isSelected(i)) {
+ KstRVectorPtr vector = rvl[i]; // FIXME: broken
+ vector->readLock();
+ vector->dataSource()->readLock();
+ supportsTime = vector->dataSource()->supportsTimeConversions();
+ vector->dataSource()->readUnlock();
+ vector->readUnlock();
+ if (!supportsTime) {
+ break;
+ }
+ }
+ }
+ _kstDataRange->setAllowTime(supportsTime);
+}
+
+
#include "kstchangenptsdialog_i.moc"
// vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/kst/kstchangenptsdialog_i.h #481936:481937
@@ -44,6 +44,7 @@
private slots:
void applyNptsChange();
+ void updateTimeCombo();
signals:
/** signal that vectors have changed */
More information about the Kst
mailing list