|
From: <dhu...@us...> - 2007-01-11 17:06:30
|
Revision: 148
http://svn.sourceforge.net/qcell/?rev=148&view=rev
Author: dhubleizh
Date: 2007-01-11 09:06:23 -0800 (Thu, 11 Jan 2007)
Log Message:
-----------
- error indicator in Calculator.cpp
- some minotr timer tweaks in MainWindow.cpp
- debug stuff in FQTParser
Modified Paths:
--------------
trunk/qcell/basesources/Calculator.cpp
trunk/qcell/parsers/FQT/FQTParserPlugin.cpp
trunk/qcell/visgui/MainWindow.cpp
Modified: trunk/qcell/basesources/Calculator.cpp
===================================================================
--- trunk/qcell/basesources/Calculator.cpp 2007-01-11 10:28:19 UTC (rev 147)
+++ trunk/qcell/basesources/Calculator.cpp 2007-01-11 17:06:23 UTC (rev 148)
@@ -222,6 +222,7 @@
void Calculator::calculate(void)
{
int counter = 0;
+ int index;
char temp[8] = {0,0,0,0,0,0,0,0};
int sx = sizeX, sy = sizeY, sz = sizeZ, st = sizeT;
@@ -244,12 +245,14 @@
{
for(int x=0;x<sx;++x)
{
+ index = (x - minBorder[0]) + ((y - minBorder[1]) * tempDataSize[0]) + (z - minBorder[2]) * (tempDataSize[0] * tempDataSize[1]) + (t - minBorder[3]) * (tempDataSize[0] * tempDataSize[1] * tempDataSize[2]) * dataSize;
neighbourhood->resolveValues(tempData + (x - minBorder[0]) + ((y - minBorder[1]) * tempDataSize[0]) + (z - minBorder[2]) * (tempDataSize[0] * tempDataSize[1]) + (t - minBorder[3]) * (tempDataSize[0] * tempDataSize[1] * tempDataSize[2]) * dataSize);
switch(dataType)
{
case baseDataTypes::BOOL:
case baseDataTypes::CHAR:
case baseDataTypes::SHORT:
+ /// @todo BUUUUMMM babol
case baseDataTypes::INT:
*((int *)temp) = localfunction->resolve(neighbourhood->valuesToVector_i());
break;
@@ -320,4 +323,4 @@
neighbourhood->calculateOffsets(tempDataSize[0], tempDataSize[1], tempDataSize[2], tempDataSize[3], getDataType());
}
-}
\ No newline at end of file
+}
Modified: trunk/qcell/parsers/FQT/FQTParserPlugin.cpp
===================================================================
--- trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-01-11 10:28:19 UTC (rev 147)
+++ trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-01-11 17:06:23 UTC (rev 148)
@@ -6,6 +6,7 @@
* Last Update: czw lis 30 14:19:22 CET 2006
*/
#include "FQTParserPlugin.h"
+#include <QDebug>
FQTParserPlugin::FQTParserPlugin()
{
@@ -54,7 +55,7 @@
lines[0] = lines[0].trimmed();
if(format.exactMatch(lines[0]))
{
- // TODO: There has to be something to do here - right ?
+ /// @todo There has to be something to do here - right ?
lines.removeFirst();
line_nr++;
@@ -126,10 +127,11 @@
}
default:
{
- format = QRegExp("^((\\d)+,){1-" + QString::number(arguments_nr-2) + "}(\\d)+$");
+ format = QRegExp("^((\\d)+,){1," + QString::number(arguments_nr-2) + "}(\\d)+$");
}
}
if(format.exactMatch(lines[0]))
+ /// @todo Absolutely change that!!!!
{
int arg_index, arg_nr;
arg_nr = 0;
@@ -152,7 +154,7 @@
return QString();
}
- arguments.append(arg_index);
+ arguments.append(arg_index-1);
}
// Now we can calculate the maximal sum value
max_sum = arg_nr * (values_nr - 1);
@@ -168,6 +170,8 @@
.arg(format.pattern())
.toAscii()
);
+
+ return QString();
}
/// @todo Is there a way of determining the number of lines left for sanity check?
Modified: trunk/qcell/visgui/MainWindow.cpp
===================================================================
--- trunk/qcell/visgui/MainWindow.cpp 2007-01-11 10:28:19 UTC (rev 147)
+++ trunk/qcell/visgui/MainWindow.cpp 2007-01-11 17:06:23 UTC (rev 148)
@@ -468,7 +468,7 @@
{
working = false;
iteration = 0;
- msec_delay = 0.0;
+ msec_delay = 0;
// Set all data pointers to NULL, as unlockExperiment depends on it!
neighbourhood = NULL;
@@ -585,19 +585,24 @@
void MainWindow::on_action_Start_activated()
{
+ // No need to put it into MainWindow, as it isn't used there
+ static int iterations = 10;
ExperimentSetup es;
+ es.delaySpinBox->setValue((long)msec_delay/100.00);
+ es.iterationsSpinBox->setValue(iterations);
if(es.exec() == QDialog::Accepted)
{
working = true;
- msec_delay = (int)(es.delaySpinBox->value() * 100.00);
+ msec_delay = (uint)(es.delaySpinBox->value() * 100.00);
if(es.continiuosCheckBox->isChecked())
{
continousSteps();
}
else
{
- stepForward(es.iterationsSpinBox->value());
+ iterations = es.iterationsSpinBox->value();
+ stepForward(iterations);
}
}
@@ -885,6 +890,8 @@
((delaySpinBox->maximum() - delaySpinBox->minimum()) / 100)
* value
);
+ // Setting the global value
+ msec_delay = (uint)(delaySpinBox->value() * 100);
// release lock
delaySpinBox->blockSignals(false);
}
@@ -893,8 +900,7 @@
{
// Anti spinBox->slider value change lock
delaySlider->blockSignals(true);
- // Setting it here is easier
- // When the value is set by slider, this function will be called anywayz
+ // Setting global value
msec_delay = value * 100.00;
// Set the slider proportional to spinBox range
delaySlider->setValue(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|