|
From: <dhu...@us...> - 2007-02-16 23:32:23
|
Revision: 341
http://svn.sourceforge.net/qcell/?rev=341&view=rev
Author: dhubleizh
Date: 2007-02-16 15:32:16 -0800 (Fri, 16 Feb 2007)
Log Message:
-----------
- in LIF import fill table with 0 instead -1
- maximum symbol adding bug fixed
Modified Paths:
--------------
trunk/qcell/baseheaders/simulationwindow.h
trunk/qcell/basesources/simulationwindow.cpp
trunk/qcell/parsers/Life-1.05/Life105ParserPlugin.cpp
Modified: trunk/qcell/baseheaders/simulationwindow.h
===================================================================
--- trunk/qcell/baseheaders/simulationwindow.h 2007-02-16 22:37:59 UTC (rev 340)
+++ trunk/qcell/baseheaders/simulationwindow.h 2007-02-16 23:32:16 UTC (rev 341)
@@ -91,7 +91,6 @@
int cycleTable, maxTime, usedSpace;
char *storeCurentTable;
CalculationData localView;
- bool localViewFlag;
QList< QVector<int> > dataToCopy;
@@ -161,6 +160,7 @@
public:
void storeSelectedData(void);
void pasteStoredData(void);
+ bool localViewFlag;
//for test only
FunctionTable * getFunctionTable(void);
@@ -168,6 +168,8 @@
void setSelectedCell(QVector<int> coord);
void setSelectedFunctionRule(int index);
void clearView();
+ int getLocalObserversHistoryCount();
+ CalculationData* getLocalObserversCD(int iteration);
public slots:
void NViewModeChange(int mode);
Modified: trunk/qcell/basesources/simulationwindow.cpp
===================================================================
--- trunk/qcell/basesources/simulationwindow.cpp 2007-02-16 22:37:59 UTC (rev 340)
+++ trunk/qcell/basesources/simulationwindow.cpp 2007-02-16 23:32:16 UTC (rev 341)
@@ -639,6 +639,8 @@
item->setCheckState(Qt::Unchecked);
}
}
+
+ symbolTable->scrollToBottom();
}
void simulationWindow::changeSymbol(int x, int y, int z)
@@ -1064,14 +1066,19 @@
{
symbol.textSybmol = QChar((int)'0' + symbol_nr);
}
- else if (symbol_nr > 9 && symbol_nr < 'Z'-'A')
+ else if (symbol_nr > 9 && symbol_nr < (int)('Z'-'A') + 10 + 1)
{
symbol.textSybmol = QChar((int)'A' + (symbol_nr-10));
}
- else if (symbol_nr > 9 && symbol_nr > (int)('Z'-'A') && symbol_nr < (int)('z'-'a'))
+ else if (symbol_nr > 9 && symbol_nr > (int)('Z'-'A') && symbol_nr < (int)('z'-'a') + 10 + (int)('Z'-'A') + 2)
{
- symbol.textSybmol = QChar((int)'a' + (symbol_nr - 10));
+ symbol.textSybmol = QChar((int)'a' + (symbol_nr - 10 - (int)('Z' - 'A') - 1));
}
+ else
+ {
+ qDebug(tr("To many symbols - cannot add.").toAscii());
+ return;
+ }
renderer->addSymbol(symbol);
renderer->setSymbolColor(renderer->getSymbolCount()-1, symbol.color);
@@ -1690,3 +1697,14 @@
return symbolTable->rowCount();
}
+int simulationWindow::getLocalObserversHistoryCount()
+{
+ return loclaViewMemory.count();
+}
+
+CalculationData* simulationWindow::getLocalObserversCD(int iteration)
+{
+ return &loclaViewMemory[iteration];
+}
+
+
Modified: trunk/qcell/parsers/Life-1.05/Life105ParserPlugin.cpp
===================================================================
--- trunk/qcell/parsers/Life-1.05/Life105ParserPlugin.cpp 2007-02-16 22:37:59 UTC (rev 340)
+++ trunk/qcell/parsers/Life-1.05/Life105ParserPlugin.cpp 2007-02-16 23:32:16 UTC (rev 341)
@@ -53,6 +53,7 @@
summed_args.append(i);
}
lf.setSumArguments(summed_args);
+ lf.setDefaultValue(0);
// Basic sanity check
lines = QString(content).split('\n');
@@ -107,21 +108,21 @@
if (conway.exactMatch(lines[0]))
{
- if (lf.getValueTableSize() == 0)
- {
+// if (lf.getValueTableSize() == 0)
+// {
lf.setFunctionValue(1, 2, QVector<int>(1, 1));
lf.setFunctionValue(1, 3, QVector<int>(1, 1));
lf.setFunctionValue(1, 3, QVector<int>(1, 0));
- }
- else
- {
- qDebug(tr("Double function declaration in line %1")
- .arg(line_nr)
- .toAscii()
- );
-
- return QString();
- }
+// }
+// else
+// {
+// qDebug(tr("Double function declaration in line %1")
+// .arg(line_nr)
+// .toAscii()
+// );
+//
+// return QString();
+// }
}
else if (rule.exactMatch(lines[0]))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|