Commit 1233a625 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - view menu now also available in toolbar. Merged...

[CHANGE] - view menu now also available in toolbar. Merged setupPermanentToolbar and setupGUI - common ... new WQtGLWidget in setupPermanentToolbar?
parent 9d0732cf
......@@ -39,6 +39,7 @@
#include "axial.xpm"
#include "cor.xpm"
#include "sag.xpm"
#include "camera.xpm"
#include "box.xpm"
#include "o.xpm"
......
/* XPM */
const char * camera_xpm[] = {
"32 32 376 2",
" c None",
". c #232323",
"+ c #222222",
"@ c #3E3E3F",
"# c #999A9A",
"$ c #999A99",
"% c #949493",
"& c #ACACAB",
"* c #B9BABA",
"= c #656767",
"- c #2C2E30",
"; c #383B3D",
"> c #707071",
", c #CCCCCD",
"' c #787878",
") c #838384",
"! c #5F6060",
"~ c #515252",
"{ c #35393B",
"] c #333739",
"^ c #323638",
"/ c #323637",
"( c #303436",
"_ c #2F3335",
": c #2C3132",
"< c #464747",
"[ c #AFAFAF",
"} c #C5C5C5",
"| c #D3D3D2",
"1 c #DDDDDB",
"2 c #E1E1E0",
"3 c #E1E1E1",
"4 c #EFEFEF",
"5 c #838383",
"6 c #949494",
"7 c #969696",
"8 c #D0D0D0",
"9 c #666666",
"0 c #B0B0B0",
"a c #8C8C8C",
"b c #777777",
"c c #939393",
"d c #909090",
"e c #A6A6A6",
"f c #A0A0A0",
"g c #9C9C9C",
"h c #7E7E7E",
"i c #4A4B4B",
"j c #808080",
"k c #B9B9B9",
"l c #A9A9A9",
"m c #ECECEC",
"n c #E2E2E2",
"o c #A3A3A2",
"p c #C2C2C2",
"q c #D1D1D1",
"r c #9A9A9A",
"s c #575757",
"t c #ADADAD",
"u c #B8B8B8",
"v c #CCCCCC",
"w c #9E9E9E",
"x c #8F8F8F",
"y c #D4D4D4",
"z c #D3D3D3",
"A c #DCDCDC",
"B c #DBDBDB",
"C c #C7C7C7",
"D c #878787",
"E c #C1C1C1",
"F c #A1A4A5",
"G c #8D8F8F",
"H c #D1D2D2",
"I c #9F9F9E",
"J c #8B8B8A",
"K c #9D9E9E",
"L c #A0A3A4",
"M c #A0A2A3",
"N c #A1A3A3",
"O c #B4B5B6",
"P c #C3C4C5",
"Q c #B7B9B9",
"R c #D2D2D3",
"S c #D0D2D2",
"T c #DFE0E1",
"U c #DFDFDF",
"V c #DEDEDF",
"W c #C1C2C3",
"X c #B0B3B3",
"Y c #9A9C9D",
"Z c #969A9A",
"` c #929697",
" . c #737677",
".. c #8C9091",
"+. c #757575",
"@. c #515759",
"#. c #45494A",
"$. c #595C5D",
"%. c #4F5355",
"&. c #595E5F",
"*. c #6D6F6F",
"=. c #D2D2D2",
"-. c #757777",
";. c #919596",
">. c #A3A5A6",
",. c #A5A7A8",
"'. c #AAACAD",
"). c #A6A7A8",
"!. c #A2A3A4",
"~. c #A2A5A6",
"{. c #A3A6A7",
"]. c #8D9192",
"^. c #454B4D",
"/. c #272828",
"(. c #585858",
"_. c #282929",
":. c #C8C8C8",
"<. c #42494C",
"[. c #3C4142",
"}. c #3A3E3F",
"|. c #3E4344",
"1. c #404547",
"2. c #7E7E7F",
"3. c #818181",
"4. c #9A9D9E",
"5. c #D5D5D6",
"6. c #E9E9E9",
"7. c #979898",
"8. c #66696A",
"9. c #848686",
"0. c #989A9C",
"a. c #929596",
"b. c #171717",
"c. c #111111",
"d. c #CFCFCF",
"e. c #40484B",
"f. c #2E3436",
"g. c #2E3537",
"h. c #686A6B",
"i. c #7C7C7C",
"j. c #7D7D7D",
"k. c #979797",
"l. c #BDBEBE",
"m. c #FCFCFC",
"n. c #EEEEEE",
"o. c #E1E2E2",
"p. c #E0E0E0",
"q. c #D7D8D8",
"r. c #959697",
"s. c #767879",
"t. c #9FA1A1",
"u. c #535555",
"v. c #1B1B1B",
"w. c #343739",
"x. c #DADADA",
"y. c #2F3537",
"z. c #31383A",
"A. c #6E7172",
"B. c #818484",
"C. c #D6D6D6",
"D. c #DEDEDE",
"E. c #E7E7E7",
"F. c #F8F9F9",
"G. c #E6E7E6",
"H. c #D5D6D5",
"I. c #CDCECE",
"J. c #ADAEAE",
"K. c #7B7E7F",
"L. c #929495",
"M. c #686C6D",
"N. c #3C4447",
"O. c #E4E4E4",
"P. c #E5E5E5",
"Q. c #474D4E",
"R. c #6D7070",
"S. c #B2B3B3",
"T. c #D9D9D9",
"U. c #DDDEDE",
"V. c #D6D7D7",
"W. c #D8D8D8",
"X. c #EBEBEB",
"Y. c #FDFDFD",
"Z. c #E9E9E8",
"`. c #BDBEBC",
" + c #B6B8B8",
".+ c #A9A9AA",
"++ c #828585",
"@+ c #808283",
"#+ c #4A5053",
"$+ c #4C5152",
"%+ c #6B6E6E",
"&+ c #E0E1E1",
"*+ c #EAEAEA",
"=+ c #E6E6E5",
"-+ c #D5D5D4",
";+ c #C6C6C5",
">+ c #C4C4C4",
",+ c #BABBB9",
"'+ c #A6A8A6",
")+ c #A2A3A3",
"!+ c #868889",
"~+ c #8D9091",
"{+ c #4F5557",
"]+ c #F3F3F3",
"^+ c #F8F8F8",
"/+ c #353B3D",
"(+ c #3C4042",
"_+ c #3A4041",
":+ c #32383A",
"<+ c #4C4F50",
"[+ c #787A7A",
"}+ c #D5D6D6",
"|+ c #F2F2F2",
"1+ c #C6C6C6",
"2+ c #AEAEAE",
"3+ c #BBBBBB",
"4+ c #A6A7A5",
"5+ c #8F9190",
"6+ c #959696",
"7+ c #848687",
"8+ c #4E5355",
"9+ c #FAFAFA",
"0+ c #F6F6F6",
"a+ c #8D8E8F",
"b+ c #B6B6B6",
"c+ c #BFBFBD",
"d+ c #8A8C8C",
"e+ c #494C4D",
"f+ c #898A8A",
"g+ c #C8C9C9",
"h+ c #CBCBCB",
"i+ c #4F4F50",
"j+ c #444444",
"k+ c #444445",
"l+ c #444545",
"m+ c #979899",
"n+ c #B3B3B2",
"o+ c #868887",
"p+ c #888A8A",
"q+ c #4A4E4F",
"r+ c #484B4C",
"s+ c #4D4F4F",
"t+ c #616161",
"u+ c #727272",
"v+ c #6D6E6E",
"w+ c #353839",
"x+ c #35393A",
"y+ c #797B7B",
"z+ c #CECFCF",
"A+ c #B8B9B9",
"B+ c #030A13",
"C+ c #053F95",
"D+ c #083C86",
"E+ c #0B2142",
"F+ c #010204",
"G+ c #686B6D",
"H+ c #BCBCBC",
"I+ c #939493",
"J+ c #797B7C",
"K+ c #878989",
"L+ c #E3E3E3",
"M+ c #3F474A",
"N+ c #2B3133",
"O+ c #282D2F",
"P+ c #262B2D",
"Q+ c #282E30",
"R+ c #2C3133",
"S+ c #2D3132",
"T+ c #CBCCCC",
"U+ c #646667",
"V+ c #0C1F3B",
"W+ c #083C88",
"X+ c #073578",
"Y+ c #0A2041",
"Z+ c #020508",
"`+ c #505355",
" @ c #BABABA",
".@ c #A3A4A3",
"+@ c #707172",
"@@ c #858686",
"#@ c #EDEDED",
"$@ c #292E2F",
"%@ c #262929",
"&@ c #C9C9C9",
"*@ c #A4A6A6",
"=@ c #CECECE",
"-@ c #6F7374",
";@ c #050E19",
">@ c #0C254A",
",@ c #091F40",
"'@ c #071120",
")@ c #000000",
"!@ c #5A5D60",
"~@ c #BFBFBF",
"{@ c #ACADAC",
"]@ c #767777",
"^@ c #5C5E5E",
"/@ c #343B3D",
"(@ c #E6E6E6",
"_@ c #2E3536",
":@ c #1A1D1E",
"<@ c #6A6B6B",
"[@ c #939596",
"}@ c #9B9C9D",
"|@ c #020202",
"1@ c #050910",
"2@ c #04080F",
"3@ c #777B7E",
"4@ c #818283",
"5@ c #252829",
"6@ c #3B4346",
"7@ c #C0C0C0",
"8@ c #2F3638",
"9@ c #2A2F31",
"0@ c #191C1D",
"a@ c #898A8B",
"b@ c #C3C3C3",
"c@ c #B9BCBE",
"d@ c #D5D6D7",
"e@ c #D3D5D6",
"f@ c #D6D8D9",
"g@ c #B4B7BA",
"h@ c #545757",
"i@ c #424546",
"j@ c #D7D7D7",
"k@ c #303638",
"l@ c #242829",
"m@ c #272929",
"n@ c #6E7171",
"o@ c #CDCDCD",
"p@ c #A3A3A3",
"q@ c #9D9D9D",
"r@ c #A7A7A7",
"s@ c #3A3D3D",
"t@ c #BB7C17",
"u@ c #D7901E",
"v@ c #C78D2D",
"w@ c #292E30",
"x@ c #26292A",
"y@ c #737474",
"z@ c #222525",
"A@ c #2D3334",
"B@ c #C78315",
"C@ c #D6952A",
"D@ c #767676",
"E@ c #A4A4A4",
"F@ c #595F62",
"G@ c #2D3436",
"H@ c #25292C",
"I@ c #2F3132",
"J@ c #3D4041",
"K@ c #676969",
"L@ c #4B4D4E",
"M@ c #282B2C",
"N@ c #212526",
"O@ c #32393B",
"P@ c #B4791A",
"Q@ c #D18D1F",
"R@ c #CC9337",
"S@ c #696969",
"T@ c #555555",
"U@ c #A8A8A8",
"V@ c #ACACAC",
"W@ c #B5B5B5",
"X@ c #C9CACA",
"Y@ c #6A6A6A",
"Z@ c #484848",
"`@ c #2A2A2A",
" # c #252525",
".# c #242424",
"+# c #212121",
"@# c #1E1E1E",
"## c #1D1D1D",
"$# c #1C1C1C",
"%# c #1F1F1F",
"&# c #3F3F3F",
" ",
" ",
" ",
" ",
" . + . ",
" @ # $ % & * = - ; > , ' ) ! ~ { ] ] ^ / / ( _ : ",
" < [ } | 1 2 3 4 5 6 7 8 9 0 a 5 b b c d e f g 7 h i ",
" j k l 6 m n n e o p q r a s t u v w x y z A A B B B C D ",
" ' E F G H I J K L M N O P Q R S T U V W X Y Z ` ...} +. ",
" ' k @.#.$.%.&.*.=.=.4 u -.;.>.,.'.).!.~.{.].^./.(._.:.+. ",
" ' } <.[.}.|.1.2.=.=.4 u 3.4.5.6.q u 7.8.9.0.a.b.c.b.z +. ",
" ' d.e.f.f.f.g.h.i.i.j.3.k.l.m.n.o.p.q.* r.s.t.u.v.w.A +. ",
" ' x.e.f.f.f.g.y.y.z.A.B.C.E D.o.E.F.G.H.I.J.K.L.M.N.O.+. ",
" ' P.e.f.f.f.g.y.y.Q.R.S.T.U.V.W.X.Y.Z.| `. +.+++@+#+m +. ",
" ' 4 e.f.f.f.g.y.y.$+%+d.W.&+O.*+=+-+;+>+,+'+)+!+~+{+]++. ",
" ' ^+e./+(+|._+:+y.<+[+d.}+8 |+O.1+2+0 E 3+4+5+6+7+8+9++. ",
" ' 0+a+b+v C.c+>+d+e+f+d.g+h+A i+j+k+l+l+m+n+o+p+7+q+9++. ",
" ' n.r+s+t+u+' v+w+x+y+z+A+y 7 B+C+D+E+F+G+H+I+J+K+[.]++. ",
" ' L+M+N+O+P+Q+R+f.S+u.T+0 =.U+V+W+X+Y+Z+`+ @.@+@@@/+#@+. ",
" ' T.e.f.f.f.g.y.y.$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@+. ",
" ' =@e.f.f.f.g.y.y._@:@<@[@d.}@|@1@2@)@)@3@W.7.4@5@6@U +. ",
" ' 7@e.f.f.f.g.y.y.8@9@0@a@H+b@c@d@e@f@f@g@|+h@i@8@6@j@+. ",
" ' 2+e.f.f.f.g.y.y.8@k@l@m@n@o@E p@r q@r@(@)+s@t@u@v@h++. ",
" ' r@e.f.f.f.g.y.y.8@k@k@w@x@^@7@8 z A E y@z@A@B@u@C@1++. ",
" D@E@F@y.f.f.g.y.y.8@k@y.y.G@H@I@J@K@L@M@N@k@O@P@Q@R@~@+. ",
" S@T@r U@U@V@W@~@&@=.j@W.5.j@x.D.B A+g+y d.h+:.&@X@b@9 Y@ ",
" Z@`@ # # # # #.#.#. +#@###$#$#$#$#$#$#v.v.$#%#+#+ &# ",
" ",
" ",
" ",
" ",
" "};
......@@ -103,6 +103,7 @@ void WMainWindow::setupGUI()
m_iconManager.addIcon( std::string( "moduleCrashed" ), moduleCrashed_xpm );
m_iconManager.addIcon( std::string( "remove" ), remove_xpm );
m_iconManager.addIcon( std::string( "config" ), preferences_system_xpm );
m_iconManager.addIcon( std::string( "view" ), camera_xpm );
if( objectName().isEmpty() )
{
......@@ -135,7 +136,39 @@ void WMainWindow::setupGUI()
addDockWidget( Qt::RightDockWidgetArea, m_controlPanel );
setupPermanentToolBar();
m_mainGLWidget = boost::shared_ptr< WQtGLWidget >( new WQtGLWidget( "main", this, WGECamera::ORTHOGRAPHIC ) );
setCentralWidget( m_mainGLWidget.get() );
m_permanentToolBar = new WQtToolBar( "Permanent Toolbar", this );
// Set the style of the toolbar
// NOTE: this only works if the toolbar is used with QActions instead of buttons and other widgets
m_permanentToolBar->setToolButtonStyle( getToolbarStyle() );
m_iconManager.addIcon( std::string( "ROI icon" ), box_xpm );
m_iconManager.addIcon( std::string( "Reset icon" ), o_xpm );
m_iconManager.addIcon( std::string( "axial icon" ), axial_xpm );
m_iconManager.addIcon( std::string( "coronal icon" ), cor_xpm );
m_iconManager.addIcon( std::string( "sagittal icon" ), sag_xpm );
m_loadButton = new QAction( m_iconManager.getIcon( "load" ), "load", m_permanentToolBar );
QAction* roiButton = new QAction( m_iconManager.getIcon( "ROI icon" ), "ROI", m_permanentToolBar );
QAction* resetButton = new QAction( m_iconManager.getIcon( "view" ), "Reset", m_permanentToolBar );
resetButton->setShortcut( QKeySequence( Qt::Key_Escape ) );
QAction* projectLoadButton = new QAction( m_iconManager.getIcon( "loadProject" ), "loadProject", m_permanentToolBar );
QAction* projectSaveButton = new QAction( m_iconManager.getIcon( "saveProject" ), "saveProject", m_permanentToolBar );
connect( m_loadButton, SIGNAL( triggered( bool ) ), this, SLOT( openLoadDialog() ) );
connect( resetButton, SIGNAL( triggered( bool ) ), m_mainGLWidget.get(), SLOT( reset() ) );
connect( roiButton, SIGNAL( triggered( bool ) ), this, SLOT( newRoi() ) );
connect( projectLoadButton, SIGNAL( triggered( bool ) ), this, SLOT( projectLoad() ) );
connect( projectSaveButton, SIGNAL( triggered( bool ) ), this, SLOT( projectSaveAll() ) );
m_loadButton->setToolTip( "Load Data" );
resetButton->setToolTip( "Reset main view" );
roiButton->setToolTip( "Create New ROI" );
projectLoadButton->setToolTip( "Load a project from file" );
projectSaveButton->setToolTip( "Save current project to file" );
// we want the upper most tree item to be selected. This helps to make the always compatible modules
// show up in the tool bar from the beginning. And ... it doesn't hurt.
......@@ -162,6 +195,8 @@ void WMainWindow::setupGUI()
saveMenu->addAction( "Save Modules Only", this, SLOT( projectSaveModuleOnly() ) );
saveMenu->addAction( "Save Camera Only", this, SLOT( projectSaveCameraOnly() ) );
saveMenu->addAction( "Save ROIs Only", this, SLOT( projectSaveROIOnly() ) );
projectSaveButton->setMenu( saveMenu );
fileMenu->addSeparator();
fileMenu->addAction( m_iconManager.getIcon( "config" ), "Config", this, SLOT( openConfigDialog() ) );
fileMenu->addSeparator();
......@@ -177,20 +212,43 @@ void WMainWindow::setupGUI()
QList< QKeySequence > controlPanelShortcut;
controlPanelShortcut.append( QKeySequence( Qt::Key_F9 ) );
controlPanelTrigger->setShortcuts( controlPanelShortcut );
viewMenu->addAction( controlPanelTrigger );
viewMenu->addSeparator();
this->addAction( controlPanelTrigger ); // this enables the action even if the menu bar is invisible
// NOTE: the shortcuts for these view presets should be chosen carefully. Most keysequences have another meaning in the most applications
// so the user may get confused. It is also not a good idea to take letters as they might be used by OpenSceneGraph widget ( like "S" for
// statistics ).
// By additionally adding the action to the main window, we ensure the action can be triggered even if the menu bar is hidden.
this->addAction( viewMenu->addAction( "Left", this, SLOT( setPresetViewLeft() ), QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_L ) ) );
this->addAction( viewMenu->addAction( "Right", this, SLOT( setPresetViewRight() ), QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_R ) ) );
this->addAction( viewMenu->addAction( "Superior", this, SLOT( setPresetViewSuperior() ), QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_S ) ) );
this->addAction( viewMenu->addAction( "Inferior", this, SLOT( setPresetViewInferior() ), QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_I ) ) );
this->addAction( viewMenu->addAction( "Anterior", this, SLOT( setPresetViewAnterior() ), QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_A ) ) );
this->addAction( viewMenu->addAction( "Posterior", this, SLOT( setPresetViewPosterior() ), QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_P ) ) );
QAction* tmpAction = viewMenu->addAction( m_iconManager.getIcon( "sagittal icon" ), "Left", this, SLOT( setPresetViewLeft() ),
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_L ) );
tmpAction->setIconVisibleInMenu(true);
this->addAction( tmpAction );
tmpAction = viewMenu->addAction( m_iconManager.getIcon( "sagittal icon" ), "Right", this, SLOT( setPresetViewRight() ),
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_R ) );
tmpAction->setIconVisibleInMenu(true);
this->addAction( tmpAction );
tmpAction = viewMenu->addAction( m_iconManager.getIcon( "axial icon" ), "Superior", this, SLOT( setPresetViewSuperior() ),
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_S ) );
tmpAction->setIconVisibleInMenu(true);
this->addAction( tmpAction );
tmpAction = viewMenu->addAction( m_iconManager.getIcon( "axial icon" ), "Inferior", this, SLOT( setPresetViewInferior() ),
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_I ) );
tmpAction->setIconVisibleInMenu(true);
this->addAction( tmpAction );
tmpAction = viewMenu->addAction( m_iconManager.getIcon( "coronal icon" ), "Anterior", this, SLOT( setPresetViewAnterior() ),
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_A ) );
tmpAction->setIconVisibleInMenu(true);
this->addAction( tmpAction );
tmpAction = viewMenu->addAction( m_iconManager.getIcon( "coronal icon" ), "Posterior", this, SLOT( setPresetViewPosterior() ),
QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_P ) );
tmpAction->setIconVisibleInMenu(true);
this->addAction( tmpAction );
resetButton->setMenu( viewMenu );
QMenu* helpMenu = m_menuBar->addMenu( "Help" );
helpMenu->addAction( m_iconManager.getIcon( "help" ), "OpenWalnut Help", this, SLOT( openOpenWalnutHelpDialog() ),
......@@ -269,54 +327,7 @@ void WMainWindow::setupGUI()
addToolBar( Qt::TopToolBarArea, m_commandPrompt );
this->addAction( m_commandPrompt->toggleViewAction() ); // this enables the action even if the menu bar is invisible
// after creating the GUI, restore its saved state
restoreSavedState();
}
void WMainWindow::setupPermanentToolBar()
{
m_mainGLWidget = boost::shared_ptr< WQtGLWidget >( new WQtGLWidget( "main", this, WGECamera::ORTHOGRAPHIC ) );
setCentralWidget( m_mainGLWidget.get() );
m_permanentToolBar = new WQtToolBar( "Permanent Toolbar", this );
// Set the style of the toolbar
// NOTE: this only works if the toolbar is used with QActions instead of buttons and other widgets
m_permanentToolBar->setToolButtonStyle( getToolbarStyle() );
m_iconManager.addIcon( std::string( "ROI icon" ), box_xpm );
m_iconManager.addIcon( std::string( "Reset icon" ), o_xpm );
m_iconManager.addIcon( std::string( "axial icon" ), axial_xpm );
m_iconManager.addIcon( std::string( "coronal icon" ), cor_xpm );
m_iconManager.addIcon( std::string( "sagittal icon" ), sag_xpm );
m_loadButton = new QAction( m_iconManager.getIcon( "load" ), "load", m_permanentToolBar );
QAction* roiButton = new QAction( m_iconManager.getIcon( "ROI icon" ), "ROI", m_permanentToolBar );
QAction* resetButton = new QAction( m_iconManager.getIcon( "Reset icon" ), "Reset", m_permanentToolBar );
resetButton->setShortcut( QKeySequence( Qt::Key_Escape ) );
QAction* projectLoadButton = new QAction( m_iconManager.getIcon( "loadProject" ), "loadProject", m_permanentToolBar );
QAction* projectSaveButton = new QAction( m_iconManager.getIcon( "saveProject" ), "saveProject", m_permanentToolBar );
// setup save button
QMenu* saveMenu = new QMenu( "Save Project" );
saveMenu->addAction( "Save Project", this, SLOT( projectSaveAll() ) );
saveMenu->addAction( "Save Modules", this, SLOT( projectSaveModuleOnly() ) );
saveMenu->addAction( "Save Camera", this, SLOT( projectSaveCameraOnly() ) );
saveMenu->addAction( "Save ROIs", this, SLOT( projectSaveROIOnly() ) );
projectSaveButton->setMenu( saveMenu );
connect( m_loadButton, SIGNAL( triggered( bool ) ), this, SLOT( openLoadDialog() ) );
connect( resetButton, SIGNAL( triggered( bool ) ), m_mainGLWidget.get(), SLOT( reset() ) );
connect( roiButton, SIGNAL( triggered( bool ) ), this, SLOT( newRoi() ) );
connect( projectLoadButton, SIGNAL( triggered( bool ) ), this, SLOT( projectLoad() ) );
connect( projectSaveButton, SIGNAL( triggered( bool ) ), this, SLOT( projectSaveAll() ) );
m_loadButton->setToolTip( "Load Data" );
resetButton->setToolTip( "Reset main view" );
roiButton->setToolTip( "Create New ROI" );
projectLoadButton->setToolTip( "Load a project from file" );
projectSaveButton->setToolTip( "Save current project to file" );
// setup permanent toolbar
m_permanentToolBar->addAction( m_loadButton );
m_permanentToolBar->addSeparator();
m_permanentToolBar->addAction( projectLoadButton );
......@@ -327,6 +338,9 @@ void WMainWindow::setupPermanentToolBar()
m_permanentToolBar->addSeparator();
addToolBar( Qt::TopToolBarArea, m_permanentToolBar );
// after creating the GUI, restore its saved state
restoreSavedState();
}
void WMainWindow::autoAdd( boost::shared_ptr< WModule > module, std::string proto )
......
......@@ -277,11 +277,6 @@ public slots:
void openConfigDialog();
private:
/**
* Sets up the permanent tool bar.
*/
void setupPermanentToolBar();
/**
* The currently set compatibles toolbar
*/
......
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