-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@1560 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
- Loading branch information
Arnaud Gelas
committed
Oct 2, 2009
1 parent
5a505e7
commit 156e3e3
Showing
3 changed files
with
96 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,88 @@ | ||
#include "QGoTabImageView3D.h" | ||
|
||
#include "QGoImageView3D.h" | ||
|
||
QGoTabImageView3D::QGoTabImageView3D( QWidget* parent ) | ||
{ | ||
// m_ImageView = new QGoImageView3D( this ); | ||
m_Image = 0; | ||
|
||
setupUi( this ); | ||
|
||
QAction* QuadViewAction = new QAction( tr("QuadView"), this ); | ||
m_ViewActions.push_back( QuadViewAction ); | ||
|
||
QAction* FullScreenXYAction = new QAction( tr( "Full-Screen XY" ), this ); | ||
m_ViewActions.push_back( FullScreenXYAction ); | ||
|
||
QAction* LookupTableAction = new QAction( tr( "Lookup Table" ), this ); | ||
LookupTableAction->setStatusTip( tr(" Change the associated lookup table" ) ); | ||
|
||
// Here write the connection | ||
QObject::connect( LookupTableAction, SIGNAL( triggered() ), | ||
this, SLOT( ChangeLookupTable() ) ); | ||
|
||
m_ViewActions.push_back( LookupTableAction ); | ||
|
||
QAction* ScalarBarAction = new QAction( tr( "Display Scalar Bar" ), this ); | ||
ScalarBarAction->setCheckable( true ); | ||
m_ViewActions.push_back( ScalarBarAction ); | ||
|
||
QObject::connect( ScalarBarAction, SIGNAL( toggled( bool ) ), | ||
this, SLOT( ShowScalarBar( bool ) ) ); | ||
|
||
QAction* BackgroundColorAction = new QAction( tr("Background Color"), this ); | ||
m_ViewActions.push_back( BackgroundColorAction ); | ||
|
||
QObject::connect( BackgroundColorAction, SIGNAL( triggered() ), | ||
this, SLOT( ChangeBackgroundColor() ) ); | ||
|
||
ReadSettings(); | ||
} | ||
|
||
QGoTabImageView3D::~QGoTabImageView3D( ) | ||
{ | ||
} | ||
|
||
//-------------------------------------------------------------------------- | ||
void QGoTabImageView3D::setupUi( QWidget* parent ) | ||
{ | ||
if(parent->objectName().isEmpty()) | ||
{ | ||
parent->resize(800, 800); | ||
} | ||
|
||
m_ImageView = new QGoImageView3D( this ); | ||
m_ImageView->SetBackgroundColor( m_BackgroundColor ); | ||
|
||
m_LayOut = new QHBoxLayout( parent ); | ||
m_LayOut->addWidget( m_ImageView ); | ||
|
||
retranslateUi(parent); | ||
|
||
QMetaObject::connectSlotsByName(parent); | ||
} // setupUi | ||
//-------------------------------------------------------------------------- | ||
|
||
//-------------------------------------------------------------------------- | ||
void QGoTabImageView3D::retranslateUi(QWidget *parent) | ||
{ | ||
parent->setWindowTitle( tr( "QGoTabImageView2D" ) ); | ||
Q_UNUSED(parent); | ||
} | ||
//-------------------------------------------------------------------------- | ||
|
||
GoFigure::TabDimensionType QGoTabImageView3D::GetTabDimensionType( ) const | ||
{ | ||
return GoFigure::THREE_D; | ||
} | ||
} | ||
|
||
void QGoTabImageView3D::SetImage( vtkImageData* iImage ) | ||
{ | ||
m_ImageView->SetImage( iImage ); | ||
m_Image = iImage; | ||
} | ||
|
||
void QGoTabImageView3D::Update() | ||
{ | ||
m_ImageView->Update(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters