|
From: <dhu...@us...> - 2007-02-12 10:07:35
|
Revision: 308
http://svn.sourceforge.net/qcell/?rev=308&view=rev
Author: dhubleizh
Date: 2007-02-12 02:07:30 -0800 (Mon, 12 Feb 2007)
Log Message:
-----------
- locking and unlocking stuff accordingly
Modified Paths:
--------------
trunk/qcell/baseheaders/simulationwindow.h
trunk/qcell/basesources/simulationwindow.cpp
trunk/qcell/visgui/MainWindow.cpp
trunk/qcell/visgui/MainWindow.ui
Modified: trunk/qcell/baseheaders/simulationwindow.h
===================================================================
--- trunk/qcell/baseheaders/simulationwindow.h 2007-02-12 09:50:21 UTC (rev 307)
+++ trunk/qcell/baseheaders/simulationwindow.h 2007-02-12 10:07:30 UTC (rev 308)
@@ -47,7 +47,6 @@
void setNToolsVisible(bool visible);
private:
- Ui::simulationWindowClass ui;
protected:
// only for test
@@ -124,6 +123,8 @@
CalculationData *getStorage();
Renderer *getNeighbourhoodEditor(void);
+ Ui::simulationWindowClass ui;
+
protected slots:
void zPlaneChange(int i);
void dataUpdateRequest(void);
Modified: trunk/qcell/basesources/simulationwindow.cpp
===================================================================
--- trunk/qcell/basesources/simulationwindow.cpp 2007-02-12 09:50:21 UTC (rev 307)
+++ trunk/qcell/basesources/simulationwindow.cpp 2007-02-12 10:07:30 UTC (rev 308)
@@ -722,7 +722,9 @@
ui.tabWidget->setTabEnabled(1, 0);
ui.tabWidget->setTabEnabled(2, 0);
ui.tabWidget->setTabEnabled(3, 0);
+ ui.tabWidget->setTabEnabled(4, 0);
ui.tabWidget->setTabEnabled(5, 0);
+ ui.tabWidget->setTabEnabled(6, 0);
// for test only
ui.functionTab->setLayout(new QVBoxLayout(ui.functionTab));
@@ -1474,8 +1476,10 @@
void simulationWindow::unlockGUI()
{
// basetools->unlockGUI();
- ui.tabWidget->setTabEnabled(5, true);
- ui.functionTab->setEnabled(true);
+// ui.tabWidget->setTabEnabled(4, 1);
+// ui.tabWidget->setTabEnabled(5, 1);
+// ui.tabWidget->setTabEnabled(6, 1);
+// ui.functionTab->setEnabled(true);
ft->unlockGUI();
}
@@ -1590,4 +1594,4 @@
{
nRrenderer->maskSet(maskx, masky, maskz);
nRrenderer->repaint();
-}
\ No newline at end of file
+}
Modified: trunk/qcell/visgui/MainWindow.cpp
===================================================================
--- trunk/qcell/visgui/MainWindow.cpp 2007-02-12 09:50:21 UTC (rev 307)
+++ trunk/qcell/visgui/MainWindow.cpp 2007-02-12 10:07:30 UTC (rev 308)
@@ -1,4 +1,4 @@
-/**@file MainWindow.c
+/**@file MainWindow.cpp
* @author czarny
* @version 0.1
* @date
@@ -141,12 +141,12 @@
// add Neigborhood Tools
- dockNtools = new BetterDockWidget(this);
- dockNtools->hide();
- //dockNtools->setDisabled(true);
+ dockNtools = new BetterDockWidget(this);
+ dockNtools->hide();
+ dockNtools->setDisabled(true);
NeigborhoodTools * neigborhoodTools = new NeigborhoodTools(this);
- dockNtools->setWindowTitle(tr("Neigborhood Tools"));
- dockNtools->setWidget(neigborhoodTools);
+ dockNtools->setWindowTitle(tr("Neigborhood Tools"));
+ dockNtools->setWidget(neigborhoodTools);
((QVBoxLayout*)dockNtools->layout())->addStretch();
dockNtools->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
@@ -202,14 +202,14 @@
statusBar()->addPermanentWidget(tmp_label);
statusBar()->addPermanentWidget(iterationLCD);
- // Model elements loaded indicator
- world_check = new QCheckBox(tr("World"), this);
-// world_check->setBackgroundColor(QColor(Qt::red));
- neighbourhood_check = new QCheckBox(tr("Neighbourhood"), this);
- local_function_check = new QCheckBox(tr("Local Function"), this);
- statusBar()->addPermanentWidget(world_check);
- statusBar()->addPermanentWidget(neighbourhood_check);
- statusBar()->addPermanentWidget(local_function_check);
+// // Model elements loaded indicator
+// world_check = new QCheckBox(tr("World"), this);
+//// world_check->setBackgroundColor(QColor(Qt::red));
+// neighbourhood_check = new QCheckBox(tr("Neighbourhood"), this);
+// local_function_check = new QCheckBox(tr("Local Function"), this);
+// statusBar()->addPermanentWidget(world_check);
+// statusBar()->addPermanentWidget(neighbourhood_check);
+// statusBar()->addPermanentWidget(local_function_check);
// Plugin parsing
/// @todo get that code out of here!
@@ -737,11 +737,7 @@
// Menus
menu_View->setEnabled(true);
- // Docks unlocking
- baseDock->setEnabled(true);
- dock3D->setEnabled(true);
- dock2D->setEnabled(true);
- dock1D->setEnabled(true);
+// dockNtools->setEnabled(true);
emit unlockGUI();
}
@@ -1500,6 +1496,13 @@
emit neigborhoodSet(sw->getNeighbourhoodEditor()->getStorage()->getSizeX(), sw->getNeighbourhoodEditor()->getStorage()->getSizeY(), sw->getNeighbourhoodEditor()->getStorage()->getSizeZ());
emit neigborCount(neighbourhood->getNeighbourNumber());
//***************************************************
+
+ // Unlock stuff
+ sw->ui.tabWidget->setTabEnabled(6, 1);
+ dockNtools->setEnabled(true);
+
+ // Switch to N
+ sw->ui.tabWidget->setCurrentIndex(6);
}
void MainWindow::setupLocalFunction()
@@ -1514,6 +1517,13 @@
// for test only *********************************
sw->getFunctionTable()->setFunctionPointer(local_function);
//************************************************
+
+ // Unlock stuff
+ sw->ui.tabWidget->setTabEnabled(5, 1);
+ sw->ui.functionTab->setEnabled(true);
+
+ // Switch to function table
+ sw->ui.tabWidget->setCurrentIndex(5);
}
void MainWindow::setupWorld()
@@ -1553,9 +1563,9 @@
);
// Pass rules selection from GUI to engine
- connect(((ElementalRulesWidget*)elemental_dock->widget()), SIGNAL(rulesSelected(QVector<int>)),
- elemental_rules, SLOT(rulesSelected(QVector<int>))
- );
+// connect(((ElementalRulesWidget*)elemental_dock->widget()), SIGNAL(rulesSelected(QVector<int>)),
+// elemental_rules, SLOT(rulesSelected(QVector<int>))
+// );
// We should only work when the rules list is visible, as it slows
// the calculation considerably
@@ -1572,6 +1582,31 @@
menu_Save->setEnabled(true);
action_World_save->setEnabled(true);
+ // Unlock stuff
+ baseDock->setEnabled(true);
+
+ // Switch to proper tab
+ switch (sw->getStorage()->getDimension())
+ {
+ case 3:
+ {
+ sw->ui.tabWidget->setCurrentIndex(0);
+ dock3D->setEnabled(true);
+ break;
+ }
+ case 2:
+ {
+ sw->ui.tabWidget->setCurrentIndex(2);
+ dock2D->setEnabled(true);
+ break;
+ }
+ case 1:
+ {
+ sw->ui.tabWidget->setCurrentIndex(3);
+ dock1D->setEnabled(true);
+ break;
+ }
+ }
}
void MainWindow::on_action_Export_activated()
Modified: trunk/qcell/visgui/MainWindow.ui
===================================================================
--- trunk/qcell/visgui/MainWindow.ui 2007-02-12 09:50:21 UTC (rev 307)
+++ trunk/qcell/visgui/MainWindow.ui 2007-02-12 10:07:30 UTC (rev 308)
@@ -34,19 +34,13 @@
<height>30</height>
</rect>
</property>
- <widget class="QMenu" name="menu_Experiment" >
+ <widget class="QMenu" name="menu_View" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="title" >
- <string>&Experiment</string>
+ <string>&View</string>
</property>
- <addaction name="action_Start" />
- <addaction name="action_Stop" />
- <addaction name="action_Restart" />
- <addaction name="separator" />
- <addaction name="action_Forward" />
- <addaction name="action_Back" />
</widget>
<widget class="QMenu" name="menu_Help" >
<property name="title" >
@@ -55,13 +49,19 @@
<addaction name="separator" />
<addaction name="action_About" />
</widget>
- <widget class="QMenu" name="menu_View" >
+ <widget class="QMenu" name="menu_Experiment" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="title" >
- <string>&View</string>
+ <string>&Experiment</string>
</property>
+ <addaction name="action_Start" />
+ <addaction name="action_Stop" />
+ <addaction name="action_Restart" />
+ <addaction name="separator" />
+ <addaction name="action_Forward" />
+ <addaction name="action_Back" />
</widget>
<widget class="QMenu" name="menu_File" >
<property name="title" >
@@ -78,14 +78,6 @@
<addaction name="action_Neighbourhood" />
<addaction name="action_Function" />
</widget>
- <widget class="QMenu" name="menu_New" >
- <property name="title" >
- <string>&New</string>
- </property>
- <addaction name="action_New_World" />
- <addaction name="action_New_Neighbourhood" />
- <addaction name="action_New_Function" />
- </widget>
<widget class="QMenu" name="menu_Save" >
<property name="enabled" >
<bool>false</bool>
@@ -97,6 +89,14 @@
<addaction name="action_Neighbourhood_save" />
<addaction name="action_Function_save" />
</widget>
+ <widget class="QMenu" name="menu_New" >
+ <property name="title" >
+ <string>&New</string>
+ </property>
+ <addaction name="action_New_World" />
+ <addaction name="action_New_Neighbourhood" />
+ <addaction name="action_New_Function" />
+ </widget>
<addaction name="menu_New" />
<addaction name="menu_Open" />
<addaction name="action_Open_experiment" />
@@ -173,6 +173,9 @@
<property name="statusTip" >
<string>Opens a predefined experiment.</string>
</property>
+ <property name="visible" >
+ <bool>false</bool>
+ </property>
</action>
<action name="action_Continue_experiment" >
<property name="text" >
@@ -316,6 +319,9 @@
<property name="text" >
<string>&World</string>
</property>
+ <property name="statusTip" >
+ <string>Creates a new world of given size.</string>
+ </property>
</action>
<action name="action_New_Neighbourhood" >
<property name="text" >
@@ -348,6 +354,9 @@
<property name="text" >
<string>&Export</string>
</property>
+ <property name="statusTip" >
+ <string>Exports experiments to formats readable by other simulators.</string>
+ </property>
</action>
</widget>
<resources/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|