|
From: <dhu...@us...> - 2007-01-24 12:49:45
|
Revision: 243
http://svn.sourceforge.net/qcell/?rev=243&view=rev
Author: dhubleizh
Date: 2007-01-24 04:49:43 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
- docks disabled by default
- unlocking of docks after full experiment setup
Modified Paths:
--------------
trunk/qcell/visgui/MainWindow.cpp
trunk/qcell/visgui/MainWindow.h
Modified: trunk/qcell/visgui/MainWindow.cpp
===================================================================
--- trunk/qcell/visgui/MainWindow.cpp 2007-01-24 12:38:54 UTC (rev 242)
+++ trunk/qcell/visgui/MainWindow.cpp 2007-01-24 12:49:43 UTC (rev 243)
@@ -49,15 +49,16 @@
// );
// View 3D Tools
- QDockWidget* dw = new QDockWidget(this);
- dw->hide();
+ dock3D = new QDockWidget(this);
+ dock3D->hide();
+ dock3D->setDisabled(true);
View3DTools* view3DTools = new View3DTools(this);
- dw->setWindowTitle(tr("3D Tools"));
- dw->setWidget(view3DTools);
- ((QVBoxLayout*)dw->layout())->addStretch();
- addDockWidget(Qt::RightDockWidgetArea, dw);
+ dock3D->setWindowTitle(tr("3D Tools"));
+ dock3D->setWidget(view3DTools);
+ ((QVBoxLayout*)dock3D->layout())->addStretch();
+ addDockWidget(Qt::RightDockWidgetArea, dock3D);
- QAction* v3d_action = dw->toggleViewAction();
+ QAction* v3d_action = dock3D->toggleViewAction();
v3d_action->setText(tr("&3D Tools"));
menu_View->addAction(v3d_action);
@@ -69,19 +70,20 @@
view3DTools, SLOT(setRange(int, int, int))
);
connect(sw, SIGNAL(set3DToolsVisible(bool)),
- dw, SLOT(setVisible(bool))
+ dock3D, SLOT(setVisible(bool))
);
// View 2D Tools
- dw = new QDockWidget(this);
- dw->hide();
+ dock2D = new QDockWidget(this);
+ dock2D->hide();
+ dock2D->setDisabled(true);
View2DTextTools* view2DTextTools = new View2DTextTools(this);
- dw->setWindowTitle(tr("2D Text Tools"));
- dw->setWidget(view2DTextTools);
- ((QVBoxLayout*)dw->layout())->addStretch();
- addDockWidget(Qt::RightDockWidgetArea, dw);
+ dock2D->setWindowTitle(tr("2D Text Tools"));
+ dock2D->setWidget(view2DTextTools);
+ ((QVBoxLayout*)dock2D->layout())->addStretch();
+ addDockWidget(Qt::RightDockWidgetArea, dock2D);
- QAction* v2d_action = dw->toggleViewAction();
+ QAction* v2d_action = dock2D->toggleViewAction();
v2d_action->setText(tr("&2D Text Tools"));
menu_View->addAction(v2d_action);
@@ -99,20 +101,21 @@
view2DTextTools, SLOT(showZPlaneOnly(bool))
);
connect(sw, SIGNAL(set2DTextToolsVisible(bool)),
- dw, SLOT(setVisible(bool))
+ dock2D, SLOT(setVisible(bool))
);
// View 1D Tools
- dw = new QDockWidget(this);
- dw->hide();
+ dock1D = new QDockWidget(this);
+ dock1D->hide();
+ dock1D->setDisabled(true);
View1DTextTools* view1DTextTools = new View1DTextTools(this);
- dw->setWindowTitle(tr("1D Text Tools"));
- dw->setWidget(view1DTextTools);
- ((QVBoxLayout*)dw->layout())->addStretch();
- addDockWidget(Qt::RightDockWidgetArea, dw);
+ dock1D->setWindowTitle(tr("1D Text Tools"));
+ dock1D->setWidget(view1DTextTools);
+ ((QVBoxLayout*)dock1D->layout())->addStretch();
+ addDockWidget(Qt::RightDockWidgetArea, dock1D);
- QAction* v1d_action = dw->toggleViewAction();
- v1d_action->setText(tr("1D Text Tools"));
+ QAction* v1d_action = dock1D->toggleViewAction();
+ v1d_action->setText(tr("&1D Text Tools"));
menu_View->addAction(v1d_action);
connect(view1DTextTools, SIGNAL(viewModeChenged(int)),
@@ -122,7 +125,7 @@
sw, SLOT(GridView1DMemClear())
);
connect(sw, SIGNAL(set1DTextToolsVisible(bool)),
- dw, SLOT(setVisible(bool))
+ dock1D, SLOT(setVisible(bool))
);
// Adding delay setup
@@ -635,6 +638,11 @@
// Whole experiment saving
action_Save_experiment->setEnabled(true);
+ // Docks unlocking
+ dock3D->setEnabled(true);
+ dock2D->setEnabled(true);
+ dock1D->setEnabled(true);
+
emit unlockGUI();
}
}
Modified: trunk/qcell/visgui/MainWindow.h
===================================================================
--- trunk/qcell/visgui/MainWindow.h 2007-01-24 12:38:54 UTC (rev 242)
+++ trunk/qcell/visgui/MainWindow.h 2007-01-24 12:49:43 UTC (rev 243)
@@ -106,6 +106,9 @@
Calculator calc;
ElementalRules* elemental_rules;
QDockWidget* elemental_dock;
+ QDockWidget* dock3D;
+ QDockWidget* dock2D;
+ QDockWidget* dock1D;
QList<CalculationData*> data;
LocalFunction* local_function;
Neighbourhood* neighbourhood;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|