[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri May 16 01:39:17 CEST 2003
CVS commit by staikos:
fill in the scalar and vector lists
M +19 -4 kstplugindialog_i.cpp 1.7
--- kdeextragear-2/kst/kst/kstplugindialog_i.cpp #1.6:1.7
@@ -127,5 +127,5 @@ void KstPluginDialogI::delete_I() {
-static void generateEntries(bool input, int& cnt, QWidget *parent, QGridLayout *grid, const QValueList<Plugin::Data::IOValue>& table) {
+static void generateEntries(bool input, int& cnt, QWidget *parent, QGridLayout *grid, const QValueList<Plugin::Data::IOValue>& table, KstDoc *doc) {
QString scalarLabelTemplate, vectorLabelTemplate;
@@ -140,7 +140,9 @@ QString scalarLabelTemplate, vectorLabel
for (QValueList<Plugin::Data::IOValue>::ConstIterator it = table.begin(); it != table.end(); ++it) {
QString labellabel;
+ bool scalar = false;
switch ((*it)._type) {
case Plugin::Data::IOValue::FloatType:
labellabel = scalarLabelTemplate.arg((*it)._name);
+ scalar = true;
break;
case Plugin::Data::IOValue::TableType:
@@ -163,7 +165,19 @@ QString scalarLabelTemplate, vectorLabel
label = new QLabel(labellabel, parent, "Output label");
}
- QComboBox *combo = new QComboBox(true, parent, (*it)._name.latin1());
+
+ QComboBox *combo = new QComboBox(!input, parent, (*it)._name.latin1());
grid->addWidget(label, cnt, 0);
grid->addWidget(combo, cnt, 1);
+
+ if (scalar) {
+ for (unsigned i = 0; i < doc->scalarList.count(); i++) {
+ combo->insertItem("["+doc->scalarList.at(i)->tagName()+"]");
+ }
+ } else {
+ for (unsigned i = 0; i < doc->vectorList.count(); i++) {
+ combo->insertItem("["+doc->vectorList.at(i)->tagName()+"]");
+ }
+ }
+
if (!(*it)._description.isEmpty()) {
QWhatsThis::add(label, (*it)._description);
@@ -213,5 +228,5 @@ void KstPluginDialogI::pluginChanged(int
// Generate the input values
- generateEntries(true, cnt, _frameWidget, grid, pluginData._inputs);
+ generateEntries(true, cnt, _frameWidget, grid, pluginData._inputs, doc);
// Add a separator
@@ -224,5 +239,5 @@ void KstPluginDialogI::pluginChanged(int
// Generate the output values
- generateEntries(false, cnt, _frameWidget, grid, pluginData._outputs);
+ generateEntries(false, cnt, _frameWidget, grid, pluginData._outputs, doc);
}
More information about the Kst
mailing list