|
From: <dhu...@us...> - 2007-01-07 20:26:17
|
Revision: 115
http://svn.sourceforge.net/qcell/?rev=115&view=rev
Author: dhubleizh
Date: 2007-01-07 12:26:16 -0800 (Sun, 07 Jan 2007)
Log Message:
-----------
- typo in simulationWindow
- off with Class::Enum::Value in Calculator
- Calculator{cpp,h} added to visgui.pro
- proper(?) simulationWindow handling in MainWindow
Modified Paths:
--------------
trunk/qcell/baseheaders/simulationwindow.h
trunk/qcell/basesources/Calculator.cpp
trunk/qcell/visgui/MainWindow.cpp
trunk/qcell/visgui/MainWindow.h
trunk/qcell/visgui/visgui.pro
Modified: trunk/qcell/baseheaders/simulationwindow.h
===================================================================
--- trunk/qcell/baseheaders/simulationwindow.h 2007-01-07 20:05:16 UTC (rev 114)
+++ trunk/qcell/baseheaders/simulationwindow.h 2007-01-07 20:26:16 UTC (rev 115)
@@ -60,8 +60,8 @@
simulationWindow(QWidget *parent = 0);
~simulationWindow();
- Renderer *getRenderer();
- CalculationData *getStorage();
+ Renderer *getRenderer();
+ CalculationData *getStorage();
protected slots:
void zPlaneChange(int i);
Modified: trunk/qcell/basesources/Calculator.cpp
===================================================================
--- trunk/qcell/basesources/Calculator.cpp 2007-01-07 20:05:16 UTC (rev 114)
+++ trunk/qcell/basesources/Calculator.cpp 2007-01-07 20:26:16 UTC (rev 115)
@@ -106,10 +106,10 @@
{
switch(dataType)
{
- case baseDataTypes::DATA_TYPES::BOOL:
+ case baseDataTypes::BOOL:
return (outDataSize[0] * outDataSize[1] * outDataSize[2] * outDataSize[3])/8 + 1;
- case baseDataTypes::DATA_TYPES::CHAR:
+ case baseDataTypes::CHAR:
switch(dimension)
{
case 1:
@@ -122,7 +122,7 @@
return outDataSize[0] * outDataSize[1] * outDataSize[2] * outDataSize[3] * sizeof(char);
}
- case baseDataTypes::DATA_TYPES::DOUBLE:
+ case baseDataTypes::DOUBLE:
switch(dimension)
{
case 1:
@@ -135,7 +135,7 @@
return outDataSize[0] * outDataSize[1] * outDataSize[2] * outDataSize[3] * sizeof(double);
}
- case baseDataTypes::DATA_TYPES::FLOAT:
+ case baseDataTypes::FLOAT:
switch(dimension)
{
case 1:
@@ -148,7 +148,7 @@
return outDataSize[0] * outDataSize[1] * outDataSize[2] * outDataSize[3] * sizeof(float);
}
- case baseDataTypes::DATA_TYPES::INT:
+ case baseDataTypes::INT:
switch(dimension)
{
case 1:
@@ -161,7 +161,7 @@
return outDataSize[0] * outDataSize[1] * outDataSize[2] * outDataSize[3] * sizeof(int);
}
- case baseDataTypes::DATA_TYPES::SHORT:
+ case baseDataTypes::SHORT:
switch(dimension)
{
case 1:
Modified: trunk/qcell/visgui/MainWindow.cpp
===================================================================
--- trunk/qcell/visgui/MainWindow.cpp 2007-01-07 20:05:16 UTC (rev 114)
+++ trunk/qcell/visgui/MainWindow.cpp 2007-01-07 20:26:16 UTC (rev 115)
@@ -248,6 +248,7 @@
neighbourhood = new Neighbourhood;
neighbourhood->fromXmlString(&neighbourhood_parsers[subtype]->parse(file_content, type, subtype));
+ calc.setNeighbourhood(neighbourhood);
}
else if (type == "LocalFunction")
@@ -263,6 +264,7 @@
local_function = new LocalFunction();
local_function->fromXmlString(&function_parsers[subtype]->parse(file_content, type, subtype));
+ calc.setLocalFunction(local_function);
}
else if (type == "World")
{
@@ -278,6 +280,9 @@
/// @todo Fix that!
data.clear();
data.append((CalculationData*)world_parsers[subtype]->parse(file_content, type, subtype).toInt());
+ CalculationData* cd = sw->getStorage();
+ cd = data.first();
+ /// @todo Nasty - get that code out of here !
}
else
{
Modified: trunk/qcell/visgui/MainWindow.h
===================================================================
--- trunk/qcell/visgui/MainWindow.h 2007-01-07 20:05:16 UTC (rev 114)
+++ trunk/qcell/visgui/MainWindow.h 2007-01-07 20:26:16 UTC (rev 115)
@@ -22,6 +22,7 @@
#include <Neighbourhood.h>
#include <Renderer.h>
#include <simulationwindow.h>
+#include <Calculator.h>
typedef QString (*parser_fun)(QByteArray content, QString type, QString subtype);
@@ -70,6 +71,7 @@
bool working;
int iteration;
+ Calculator calc;
QList<CalculationData*> data;
LocalFunction* local_function;
Neighbourhood* neighbourhood;
Modified: trunk/qcell/visgui/visgui.pro
===================================================================
--- trunk/qcell/visgui/visgui.pro 2007-01-07 20:05:16 UTC (rev 114)
+++ trunk/qcell/visgui/visgui.pro 2007-01-07 20:26:16 UTC (rev 115)
@@ -19,7 +19,8 @@
../baseheaders/CalculationData.h \
../baseheaders/LocalFunction.h \
../baseheaders/simulationwindow.h \
- ../baseheaders/Renderer.h
+ ../baseheaders/Renderer.h \
+ ../baseheaders/Calculator.h
SOURCES = ../basesources/GenericParserPlugin.cpp \
main.cpp \
@@ -30,7 +31,8 @@
../basesources/CalculationData.cpp \
../basesources/LocalFunction.cpp \
../basesources/simulationwindow.cpp \
- ../basesources/Renderer.cpp
+ ../basesources/Renderer.cpp \
+ ../basesources/Calculator.cpp
LIBS = -L../libs -lN -lFQT -lKI
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|