Commit 4314deda authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED update the tutorial to reflect viewer/mainwindow changes

And add a screenshot action to the toolbar
parent 7aa67ed6
......@@ -61,7 +61,7 @@ BitmapViewer::BitmapViewer() : InteractiveViewer(BitmapViewerName, InteractiveVi
getRendererWidget()->getActiveCamera()->ParallelProjectionOn();
isVisible = false;
switchToolBar = nullptr;
switchToolbar = nullptr;
}
// -------------------- Destructor --------------------
......@@ -102,23 +102,26 @@ QWidget* BitmapViewer::getWidget(QWidget* parent) {
// -------------------- getToolBar --------------------
QToolBar* BitmapViewer::getToolBar() {
if (switchToolBar == nullptr) {
if (switchToolbar == nullptr) {
// create the toolbar and add the action to it
switchToolbar = new QToolBar(objectName() + " Toolbar");
// ensure object name is set for saving the state
switchToolbar->setObjectName(objectName() + " Toolbar");
switchToolbar->addAction(screenshotAction);
// create the action to switch between the default and this viewer
QAction* switchViewerAction = new QAction(tr("Bitmap Viewer"), this);
QAction* switchViewerAction = new QAction(tr("Hide Bitmap Viewer"), this);
switchViewerAction->setCheckable(true);
switchViewerAction->setChecked(true); // first time getToolBar is called -> BitmapViewer is being displayed
switchViewerAction->setStatusTip(tr("Switch The Central Viewer"));
switchViewerAction->setWhatsThis(tr("Switch The Central Viewer between the BitmapViewer and MedicalImageViewer"));
connect(switchViewerAction, SIGNAL(toggled(bool)), this, SLOT(switchCentralViewer()));
// create the toolbar and add the action to it
switchToolBar = new QToolBar(objectName() + " ToolBar");
// ensure object name is set for saving the state
switchToolBar->setObjectName(objectName() + " ToolBar");
switchToolBar->addAction(switchViewerAction);
switchToolbar->addAction(switchViewerAction);
}
return switchToolBar;
return switchToolbar;
}
// -------------------- updateVisibility --------------------
......
......@@ -66,7 +66,7 @@ private:
bool isVisible;
QToolBar* switchToolBar;
QToolBar* switchToolbar;
// set visibility of all possible component (that is component that can be displayed in 2D)
void updateVisibility();
......
camitk_extension(ACTION_EXTENSION
)
camitk_extension(ACTION_EXTENSION)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment