[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-2/kst/kst
From: Andrew Walker <arwalker () sumusltd ! com>
Date: 2004-10-19 19:18:34
Message-ID: 20041019191834.BB70616C73 () office ! kde ! org
[Download RAW message or body]
CVS commit by arwalker:
Provide progress bar feedback when changing a data file.
CCMAIL: 91693@bugs.kde.org
M +28 -5 kstchangefiledialog_i.cpp 1.27
--- kdeextragear-2/kst/kst/kstchangefiledialog_i.cpp #1.26:1.27
@@ -63,5 +63,8 @@ void KstChangeFileDialogI::updateChangeF
KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
- /* insert vectors into ChangeFileCurveList */
+
+ //
+ // insert vectors into ChangeFileCurveList
+ //
for (int i = 0; i < (int)rvl.count(); i++) {
rvl[i]->readLock();
@@ -115,6 +118,19 @@ void KstChangeFileDialogI::applyFileChan
file->writeLock();
+ KstApp *app = KstApp::inst();
KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList);
- for (int i = 0; i < (int)ChangeFileCurveList->count(); i++) {
+ int selected = 0;
+ int handled = 0;
+ int count;
+ int i;
+
+ count = (int)ChangeFileCurveList->count();
+ for (i = 0; i < count; i++) {
+ if (ChangeFileCurveList->isSelected(i)) {
+ selected++;
+ }
+ }
+
+ for (i = 0; i < count; i++) {
if (ChangeFileCurveList->isSelected(i)) {
KstRVectorPtr vector = rvl[i];
@@ -122,7 +138,8 @@ void KstChangeFileDialogI::applyFileChan
if (!file->isValidField(vector->field())) {
if (invalid > 0) {
- invalidSources += ", ";
+ invalidSources = i18n("%1, %2").arg(invalidSources).arg(vector->field());
+ } else {
+ invalidSources = vector->field();
}
- invalidSources += vector->field();
invalid++;
} else {
@@ -130,7 +147,10 @@ void KstChangeFileDialogI::applyFileChan
}
vector->writeUnlock();
+ app->slotUpdateProgress(selected, ++handled, i18n("Updating vectors..."));
}
}
+ app->slotUpdateProgress(0, 0, QString::null);
+
if (!invalidSources.isEmpty()) {
if (invalid == 1) {
@@ -144,5 +164,8 @@ void KstChangeFileDialogI::applyFileChan
file = 0L;
emit docChanged();
- // Force an update in case we're in paused mode
+
+ //
+ // force an update in case we're in paused mode
+ //
KstApp::inst()->forceUpdate();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic