Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
CamiTK Community Edition
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
25
Issues
25
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
CamiTK
CamiTK Community Edition
Commits
4314deda
Commit
4314deda
authored
Nov 04, 2019
by
Emmanuel Promayon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIXED update the tutorial to reflect viewer/mainwindow changes
And add a screenshot action to the toolbar
parent
7aa67ed6
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
tutorials/actions/switchviewer/BitmapViewer.cpp
tutorials/actions/switchviewer/BitmapViewer.cpp
+13
-10
tutorials/actions/switchviewer/BitmapViewer.h
tutorials/actions/switchviewer/BitmapViewer.h
+1
-1
tutorials/actions/switchviewer/CMakeLists.txt
tutorials/actions/switchviewer/CMakeLists.txt
+1
-2
No files found.
tutorials/actions/switchviewer/BitmapViewer.cpp
View file @
4314deda
...
...
@@ -61,7 +61,7 @@ BitmapViewer::BitmapViewer() : InteractiveViewer(BitmapViewerName, InteractiveVi
getRendererWidget
()
->
getActiveCamera
()
->
ParallelProjectionOn
();
isVisible
=
false
;
switchTool
B
ar
=
nullptr
;
switchTool
b
ar
=
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
switchTool
B
ar
;
return
switchTool
b
ar
;
}
// -------------------- updateVisibility --------------------
...
...
tutorials/actions/switchviewer/BitmapViewer.h
View file @
4314deda
...
...
@@ -66,7 +66,7 @@ private:
bool
isVisible
;
QToolBar
*
switchTool
B
ar
;
QToolBar
*
switchTool
b
ar
;
// set visibility of all possible component (that is component that can be displayed in 2D)
void
updateVisibility
();
...
...
tutorials/actions/switchviewer/CMakeLists.txt
View file @
4314deda
camitk_extension
(
ACTION_EXTENSION
)
camitk_extension
(
ACTION_EXTENSION
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment