Summary: | create vector column 0 | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | claude mercier <claude.mercier> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
claude mercier
2004-02-18 19:39:55 UTC
On Wednesday 18 February 2004 13:39, claude mercier wrote: > The create vector dialog box let me select > the column zero, and it starts at 1, should not let > me do it > > (minor, I missed the place I should have select it) The scope of this is actually a bit larger. It boils down to whether we should allow the user to type anything in this field at all, or if the datasources should supply the contents exclusively. 0 is not the only invalid thing that can be entered in this field. Are there any datasources that might not know their fields before reading the file or attempting to open a given field? Still no response to my comments here. I'm tempted to make this combo non-editable, though completable (if you understand what I mean). Frame Files don't return a complete frame list, though no-one is using it now. But others could come up. How about if data-sources have a bool fieldListIsComplete() method to help us decide. Editable if incomplete, non-editable if complete. CVS commit by staikos: activate the fieldListIsComplete() member in datasources to prevent users from entering vectors that don't exist when we know the complete set. note: data wizard surely doesn't work well with sources where we don't know the full set though CCMAIL: 75541-done@bugs.kde.org M +2 -0 datawizard.ui.h 1.75 M +1 -0 kstvectordialog_i.cpp 1.45 M +5 -0 datasources/frame/frame.cpp 1.8 M +2 -0 datasources/frame/frame.h 1.5 --- kdeextragear-2/kst/kst/datawizard.ui.h #1.74:1.75 @@ -117,4 +118,5 @@ void DataWizard::sourceChanged( const QS _xVector->insertStringList(fl); _xVector->completionObject()->insertItems(fl); + _xVector->setEditable(!_ds->fieldListIsComplete()); for (QStringList::ConstIterator it = fl.begin(); it != fl.end(); ++it) { new QCheckListItem(_vectors, *it, QCheckListItem::CheckBox); --- kdeextragear-2/kst/kst/kstvectordialog_i.cpp #1.44:1.45 @@ -91,4 +91,5 @@ void KstVectorDialogI::updateCompletion( list = ds->fieldList(); ds->readUnlock(); + Field->setEditable(!ds->fieldListIsComplete()); } else { list = KstDataSource::fieldListForSource(FileName->url()); --- kdeextragear-2/kst/kst/datasources/frame/frame.cpp #1.7:1.8 @@ -197,4 +197,9 @@ void FrameSource::save(QTextStream &ts) +bool FrameSource::fieldListIsComplete() const { + return false; +} + + extern "C" { KstDataSource *create_frame(const QString& filename, const QString& type) { --- kdeextragear-2/kst/kst/datasources/frame/frame.h #1.4:1.5 @@ -46,4 +46,6 @@ public: virtual bool isEmpty() const; + virtual bool fieldListIsComplete() const; + private: int _frameCount; |