|
From: <dhu...@us...> - 2007-01-10 12:33:36
|
Revision: 136
http://svn.sourceforge.net/qcell/?rev=136&view=rev
Author: dhubleizh
Date: 2007-01-10 04:33:32 -0800 (Wed, 10 Jan 2007)
Log Message:
-----------
- CalculationData typo
- tweaked a little AboutDialog - no tab switching, modal displaying, more 'aboutish' view
- no more experimenting how to display CalculatoinData; back to only displaying
- removed pending todos
- and in the same time added some more todos; waiting for Leszek
Modified Paths:
--------------
trunk/qcell/baseheaders/CalculationData.h
trunk/qcell/visgui/AboutDialog.ui
trunk/qcell/visgui/MainWindow.cpp
Modified: trunk/qcell/baseheaders/CalculationData.h
===================================================================
--- trunk/qcell/baseheaders/CalculationData.h 2007-01-09 19:30:22 UTC (rev 135)
+++ trunk/qcell/baseheaders/CalculationData.h 2007-01-10 12:33:32 UTC (rev 136)
@@ -65,7 +65,7 @@
bool resizeData(QVector<int> newSize, char *dataPointer=NULL, bool foreignDataPointer=0);
int getSizeX(void);
- int getSizeY(void);
+ int getSizeY(void);
int getSizeZ(void);
int getSizeT(void);
int getSizeInByte(void);
Modified: trunk/qcell/visgui/AboutDialog.ui
===================================================================
--- trunk/qcell/visgui/AboutDialog.ui 2007-01-09 19:30:22 UTC (rev 135)
+++ trunk/qcell/visgui/AboutDialog.ui 2007-01-10 12:33:32 UTC (rev 136)
@@ -1,6 +1,9 @@
<ui version="4.0" >
<class>AboutDialog</class>
<widget class="QDialog" name="AboutDialog" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
<property name="geometry" >
<rect>
<x>0</x>
@@ -24,10 +27,25 @@
<property name="enabled" >
<bool>true</bool>
</property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="contextMenuPolicy" >
+ <enum>Qt::NoContextMenu</enum>
+ </property>
<property name="acceptDrops" >
<bool>false</bool>
</property>
<property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="interactive" >
<bool>false</bool>
</property>
</widget>
@@ -77,6 +95,27 @@
</item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>OKButton</tabstop>
+ <tabstop>graphicsView</tabstop>
+ </tabstops>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>OKButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AboutDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>373</x>
+ <y>271</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>334</x>
+ <y>196</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>
Modified: trunk/qcell/visgui/MainWindow.cpp
===================================================================
--- trunk/qcell/visgui/MainWindow.cpp 2007-01-09 19:30:22 UTC (rev 135)
+++ trunk/qcell/visgui/MainWindow.cpp 2007-01-10 12:33:32 UTC (rev 136)
@@ -72,11 +72,12 @@
void MainWindow::on_action_About_activated()
{
+ // Construct and display AboutDialog
QDialog* dialog = new QDialog(this);
Ui::AboutDialog* ad = new Ui::AboutDialog();
ad->setupUi(dialog);
- connect(ad->OKButton, SIGNAL(clicked()), dialog, SLOT(accept()));
- dialog->show();
+ // Display it modally (block MaindWindow), but discard the result
+ dialog->exec();
}
void MainWindow::on_action_Quit_activated()
@@ -279,11 +280,7 @@
/// @todo Fix that!
data.clear();
data.append((CalculationData*)world_parsers[subtype]->parse(file_content, type, subtype).toInt());
- CalculationData* cd = new CalculationData();
- cd->setDataType(data.last()->getDataType());
- cd->fillData(data.last()->getDataPointer());
- qDebug() << "D\xB3ugo\xB6c :" << cd->getDimension();
- *sw->getStorage() = *cd;
+ *sw->getStorage() = *data.last();
calc.setForeignDataPointer((char*)data.first()->getDataPointer());
QVector<int> end_coord;
end_coord << data.last()->getSizeX()
@@ -378,6 +375,8 @@
{
if((iteration + 1) >= data.count())
{
+ /// @todo Use the updated API of Calculator
+ /// @todo Pass the calculated CalculationData to the data list
calc.calculate();
}
else
@@ -401,6 +400,7 @@
}
}
+ /// @todo This will probabelly need change after the Calculator API change
*sw->getStorage() = *data[iteration];
iterationLCD->display(iteration);
}
@@ -478,7 +478,6 @@
void MainWindow::on_action_Restart_activated()
{
- /// @todo Handle restarting the experiment
iteration = 0;
this->iterationLCD->display(iteration);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|