From: <dhu...@us...> - 2007-02-14 22:01:12
|
Revision: 325 http://svn.sourceforge.net/qcell/?rev=325&view=rev Author: dhubleizh Date: 2007-02-14 14:01:07 -0800 (Wed, 14 Feb 2007) Log Message: ----------- - I can't even remember all the things changed Modified Paths: -------------- trunk/qcell/baseheaders/basetools.ui trunk/qcell/baseheaders/simulationwindow.h trunk/qcell/baseheaders/simulationwindow.ui trunk/qcell/basesources/LocalFunction.cpp trunk/qcell/basesources/basetools.cpp trunk/qcell/basesources/functiontable.cpp trunk/qcell/basesources/simulationwindow.cpp trunk/qcell/parsers/FQT/FQTParserPlugin.cpp trunk/qcell/visgui/MainWindow.cpp Modified: trunk/qcell/baseheaders/basetools.ui =================================================================== --- trunk/qcell/baseheaders/basetools.ui 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/baseheaders/basetools.ui 2007-02-14 22:01:07 UTC (rev 325) @@ -8,7 +8,7 @@ <rect> <x>0</x> <y>0</y> - <width>166</width> + <width>171</width> <height>494</height> </rect> </property> @@ -26,8 +26,8 @@ <widget class="QGroupBox" name="ViewModeGroup" > <property name="sizePolicy" > <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>5</vsizetype> + <hsizetype>1</hsizetype> + <vsizetype>1</vsizetype> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -35,7 +35,7 @@ <property name="maximumSize" > <size> <width>16777215</width> - <height>16777215</height> + <height>115</height> </size> </property> <property name="title" > @@ -101,6 +101,9 @@ </item> <item> <widget class="QLabel" name="localObserversLabel" > + <property name="statusTip" > + <string>Shows local observers position (X,Y,Z)</string> + </property> <property name="text" > <string>Observers position:</string> </property> @@ -132,6 +135,15 @@ <property name="enabled" > <bool>false</bool> </property> + <property name="minimumSize" > + <size> + <width>0</width> + <height>15</height> + </size> + </property> + <property name="statusTip" > + <string>Shows local observers position (X,Y,Z)</string> + </property> <property name="text" > <string>(X,Y,Z)</string> </property> Modified: trunk/qcell/baseheaders/simulationwindow.h =================================================================== --- trunk/qcell/baseheaders/simulationwindow.h 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/baseheaders/simulationwindow.h 2007-02-14 22:01:07 UTC (rev 325) @@ -125,6 +125,7 @@ Renderer *getNeighbourhoodEditor(void); Ui::simulationWindowClass ui; + void back1DTable(); protected slots: void zPlaneChange(int i); Modified: trunk/qcell/baseheaders/simulationwindow.ui =================================================================== --- trunk/qcell/baseheaders/simulationwindow.ui 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/baseheaders/simulationwindow.ui 2007-02-14 22:01:07 UTC (rev 325) @@ -36,7 +36,7 @@ <enum>QTabWidget::Rounded</enum> </property> <property name="currentIndex" > - <number>4</number> + <number>5</number> </property> <widget class="QWidget" name="view3D" > <attribute name="title" > @@ -115,6 +115,14 @@ <attribute name="title" > <string>Function</string> </attribute> + <layout class="QVBoxLayout" > + <property name="margin" > + <number>9</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + </layout> </widget> <widget class="QWidget" name="NeighbourhoodTab" > <attribute name="title" > Modified: trunk/qcell/basesources/LocalFunction.cpp =================================================================== --- trunk/qcell/basesources/LocalFunction.cpp 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/basesources/LocalFunction.cpp 2007-02-14 22:01:07 UTC (rev 325) @@ -24,7 +24,7 @@ } valueTable.resize(numElements); - valueTable.fill(0); + valueTable.fill(-1); } int LocalFunction::mostPopularValue(void) Modified: trunk/qcell/basesources/basetools.cpp =================================================================== --- trunk/qcell/basesources/basetools.cpp 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/basesources/basetools.cpp 2007-02-14 22:01:07 UTC (rev 325) @@ -136,12 +136,12 @@ QString label("("); for (int i = 0; i < coords.size(); i++) { - if (coords[i] > 0) - { +// if (coords[i] > 0) +// { label.append(QString("%1,") .arg(QString::number(coords[i])) ); - } +// } } label.chop(1); label.append(')'); Modified: trunk/qcell/basesources/functiontable.cpp =================================================================== --- trunk/qcell/basesources/functiontable.cpp 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/basesources/functiontable.cpp 2007-02-14 22:01:07 UTC (rev 325) @@ -28,6 +28,7 @@ ++counter; } } + headers = function->rowsHeaders(); ui.functionTable->setVerticalHeaderLabels(headers); headers = function->columnHeaders(); @@ -56,20 +57,24 @@ void FunctionTable::selectCell(int index) { - int counter = 0; - QTableWidgetItem *item; - for(int i=0;i<ui.functionTable->rowCount();++i) - { - for(int j=0;j<ui.functionTable->columnCount();++j) - { - item = ui.functionTable->item(i, j); - if(counter==index) - item->setSelected(1); - else - item->setSelected(0); - counter++; - } - } + // The item we will be editing + QTableWidgetItem *item; + + // As dividing by 0 is bad + if (index > 0) + { + item = ui.functionTable->item( + index / ui.functionTable->columnCount(), + index % ui.functionTable->columnCount() % index + ); + } + else + { + item = ui.functionTable->item(0, 0); + } + + // Edit proper cell + ui.functionTable->editItem(item); } void FunctionTable::functionEdit(int row, int column) Modified: trunk/qcell/basesources/simulationwindow.cpp =================================================================== --- trunk/qcell/basesources/simulationwindow.cpp 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/basesources/simulationwindow.cpp 2007-02-14 22:01:07 UTC (rev 325) @@ -773,7 +773,7 @@ ui.tabWidget->setTabEnabled(6, 0); // for test only - ui.functionTab->setLayout(new QVBoxLayout(ui.functionTab)); +// ui.functionTab->setLayout(new QVBoxLayout(ui.functionTab)); ft = new FunctionTable(ui.functionTab); ui.functionTab->layout()->addWidget(ft); @@ -1659,3 +1659,9 @@ // } } +void simulationWindow::back1DTable() +{ + table1DMem->removeRow(table1DMem->rowCount()-1); + table1DMem->removeRow(table1DMem->rowCount()-1); +} + Modified: trunk/qcell/parsers/FQT/FQTParserPlugin.cpp =================================================================== --- trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/parsers/FQT/FQTParserPlugin.cpp 2007-02-14 22:01:07 UTC (rev 325) @@ -178,7 +178,7 @@ // Main function parsing lines[0] = lines[0].trimmed(); - format = QRegExp("^(\\d)+: [0-9A-z]{" + QString::number(free_args_columns-1) + "}[0-9A-z]$"); + format = QRegExp("^(\\d)+: [\\-0-9A-z]{" + QString::number(free_args_columns-1) + "}[\\-0-9A-z]$"); QStringList tmp; int tmp_sum,value_index; QVector<int> tmp_values; @@ -234,8 +234,12 @@ // Collecting this lines values tmp_sign = (int)value.toAscii(); - if(tmp_sign >= (int)'A') + if (tmp_sign == (int)'-') { + tmp_values.append(-1); + } + else if(tmp_sign >= (int)'A') + { tmp_values.append(tmp_sign - (int)'A' + 10); } @@ -293,7 +297,7 @@ switch(lf.getFunctonType()) { case LocalFunction::SUM_AND_SWITCH: - lf.setDefaultValue(0); + lf.setDefaultValue(-1); foreach(int sum, results.keys()) { for(int i=0; i < results[sum].size(); ++i) Modified: trunk/qcell/visgui/MainWindow.cpp =================================================================== --- trunk/qcell/visgui/MainWindow.cpp 2007-02-14 19:10:56 UTC (rev 324) +++ trunk/qcell/visgui/MainWindow.cpp 2007-02-14 22:01:07 UTC (rev 325) @@ -818,7 +818,9 @@ iteration--; calc = *(data[iteration]); -// data.removeLast(); + data.removeLast(); + sw->back1DTable(); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |