Commit fe69e859 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE #219] gl widget dock windows now have a contex menu providing color...

[CHANGE #219] gl widget dock windows now have a contex menu providing color change, reset and camera presets
parent 534d75dc
......@@ -23,4 +23,4 @@
# systems refuse to accept these arbitrary version strings.
# The current version string:
VERSION=1.3.0+hgX
VERSION=1.3.1+hgX
/* XPM */
const char * ColorWheel_xpm[] = {
"32 32 539 2",
" c None",
". c #1A5D00",
"+ c #236200",
"@ c #2E6700",
"# c #396D00",
"$ c #437200",
"% c #4F7700",
"& c #035400",
"* c #166C0E",
"= c #46A731",
"- c #74D54E",
"; c #89DF54",
"> c #ABFD68",
", c #B8FD68",
"' c #ADE354",
") c #B0DC4E",
"! c #99BA31",
"~ c #77900E",
"{ c #6F8000",
"] c #005609",
"^ c #197D1D",
"/ c #45C344",
"( c #7DFF75",
"_ c #A9FF9E",
": c #CDFFC2",
"< c #D9FFCA",
"[ c #EEFFE3",
"} c #F0FFE4",
"| c #E9FFCA",
"1 c #ECFFC2",
"2 c #EAFF9F",
"3 c #ECFF77",
"4 c #C8D445",
"5 c #9A9F1A",
"6 c #7F8000",
"7 c #005A13",
"8 c #2EA13F",
"9 c #7DFD87",
"0 c #BAFFBB",
"a c #D7FFD6",
"b c #D0FFCC",
"c c #C8FFBF",
"d c #C6FFB3",
"e c #CAFFAD",
"f c #D3FFAD",
"g c #DFFFB4",
"h c #ECFFC0",
"i c #F5FFCD",
"j c #FAFFD7",
"k c #FBFFBD",
"l c #FCFE80",
"m c #B9B42E",
"n c #887800",
"o c #00601F",
"p c #34AC55",
"q c #97FFA9",
"r c #C4FFCA",
"s c #B8FFBB",
"t c #A1FFA1",
"u c #94FF8F",
"v c #93FF84",
"w c #9BFF7F",
"x c #A9FF7B",
"y c #B9FF7C",
"z c #CBFF81",
"A c #DDFF88",
"B c #EBFF92",
"C c #F6FFA5",
"D c #FDFFBA",
"E c #FFFEC6",
"F c #FFF999",
"G c #C3B134",
"H c #8F6D00",
"I c #00672C",
"J c #2EA95F",
"K c #84FFA8",
"L c #AAFFBC",
"M c #9CFFAA",
"N c #83FF8D",
"O c #78FF7C",
"P c #7BFF79",
"Q c #89FF7E",
"R c #9CFF83",
"S c #ADFF86",
"T c #BEFF87",
"U c #CFFF86",
"V c #DFFF83",
"W c #ECFF7F",
"X c #F6FF7F",
"Y c #FEFF89",
"Z c #FFFBA1",
"` c #FFF6AD",
" . c #FFEB89",
".. c #C39C2E",
"+. c #955E00",
"@. c #15894F",
"#. c #63FFA2",
"$. c #8EFFB3",
"%. c #8DFFAB",
"&. c #7AFF95",
"*. c #76FF88",
"=. c #7DFF85",
"-. c #86FF86",
";. c #94FF8D",
">. c #A4FF93",
",. c #B6FF96",
"'. c #C7FF98",
"). c #D8FF96",
"!. c #E7FF93",
"~. c #F3FF8D",
"{. c #FCFF86",
"]. c #FFFB7F",
"^. c #FFF283",
"/. c #FFEC93",
"(. c #FFE594",
"_. c #FFD267",
":. c #AD6D15",
"<. c #007243",
"[. c #39C786",
"}. c #72FFB1",
"|. c #86FFB7",
"1. c #7CFFA9",
"2. c #76FF9D",
"3. c #7FFF99",
"4. c #8AFF98",
"5. c #94FF99",
"6. c #9FFF9D",
"7. c #AFFFA4",
"8. c #C0FFA8",
"9. c #D1FFAA",
"0. c #E0FFA8",
"a. c #EEFFA4",
"b. c #F9FF9D",
"c. c #FFFE94",
"d. c #FFF58A",
"e. c #FFE981",
"f. c #FFE085",
"g. c #FFDA8D",
"h. c #FFC978",
"i. c #D98F3B",
"j. c #9C4200",
"k. c #139064",
"l. c #58FFBA",
"m. c #74FFBF",
"n. c #7EFFBE",
"o. c #77FFB3",
"p. c #7DFFAE",
"q. c #8AFFAC",
"r. c #96FFAC",
"s. c #A2FFAC",
"t. c #ADFFAE",
"u. c #BAFFB5",
"v. c #CAFFB9",
"w. c #DBFFBB",
"x. c #E9FFB9",
"y. c #F6FFB5",
"z. c #FEFFAD",
"A. c #FFF9A2",
"B. c #FFED96",
"C. c #FFDF8A",
"D. c #FFD383",
"E. c #FFCB88",
"F. c #FFBF7D",
"G. c #FFA75F",
"H. c #B04D13",
"I. c #007B59",
"J. c #2FBF94",
"K. c #5AFFC9",
"L. c #70FFCB",
"M. c #78FFC7",
"N. c #79FFC1",
"O. c #86FFC0",
"P. c #94FFC0",
"Q. c #A2FFC0",
"R. c #B0FFC0",
"S. c #BBFFC1",
"T. c #C6FFC5",
"U. c #D5FFCA",
"V. c #E4FFCC",
"W. c #F1FFCA",
"X. c #FBFFC5",
"Y. c #FFFCBB",
"Z. c #FFF1B0",
"`. c #FFE4A2",
" + c #FFD594",
".+ c #FFC587",
"++ c #FFBB84",
"@+ c #FFAF7B",
"#+ c #FF9A63",
"$+ c #D36130",
"%+ c #A12500",
"&+ c #007E62",
"*+ c #3EDEB9",
"=+ c #59FFD6",
"-+ c #6FFFD7",
";+ c #76FFD5",
">+ c #7EFFD3",
",+ c #8DFFD2",
"'+ c #9DFFD2",
")+ c #ADFFD2",
"!+ c #BBFFD3",
"~+ c #C8FFD3",
"{+ c #D3FFD5",
"]+ c #DFFFDA",
"^+ c #ECFFDC",
"/+ c #F8FFDA",
"(+ c #FFFED3",
"_+ c #FFF5C8",
":+ c #FFE9BB",
"<+ c #FFDAAD",
"[+ c #FFC99D",
"}+ c #FFB88D",
"|+ c #FFAC85",
"1+ c #FFA07A",
"2+ c #FF8A63",
"3+ c #E86542",
"4+ c #A31A00",
"5+ c #00806B",
"6+ c #47EED4",
"7+ c #5AFEE3",
"8+ c #6DFFE4",
"9+ c #78FFE3",
"0+ c #83FFE3",
"a+ c #93FFE3",
"b+ c #A4FFE3",
"c+ c #B5FFE4",
"d+ c #C5FFE4",
"e+ c #D3FFE5",
"f+ c #DFFFE5",
"g+ c #E8FFE8",
"h+ c #F4FFEA",
"i+ c #FDFFE8",
"j+ c #FFF9DF",
"k+ c #FFEDD3",
"l+ c #FFDFC5",
"m+ c #FFCFB5",
"n+ c #FFBDA4",
"o+ c #FFAC93",
"p+ c #FF9F87",
"q+ c #FF907B",
"r+ c #FE7B65",
"s+ c #F1634E",
"t+ c #A50F00",
"u+ c #008073",
"v+ c #4AF4E5",
"w+ c #58FBEC",
"x+ c #67FEEF",
"y+ c #78FFF0",
"z+ c #86FFF1",
"A+ c #96FFF1",
"B+ c #A8FFF2",
"C+ c #B9FFF2",
"D+ c #CAFFF3",
"E+ c #DAFFF4",
"F+ c #E8FFF4",
"G+ c #F2FFF4",
"H+ c #FAFFF6",
"I+ c #FFFDF2",
"J+ c #FFF2E8",
"K+ c #FFE4DA",
"L+ c #FFD5CA",
"M+ c #FFC3B9",
"N+ c #FFB2A8",
"O+ c #FFA196",
"P+ c #FF9187",
"Q+ c #FE7F75",
"R+ c #FB6E64",
"S+ c #F55C52",
"T+ c #A70700",
"U+ c #00807A",
"V+ c #47F1EC",
"W+ c #55F7F2",
"X+ c #66FCF8",
"Y+ c #76FEFA",
"Z+ c #87FFFB",
"`+ c #98FFFC",
" @ c #AAFFFD",
".@ c #BBFFFD",
"+@ c #CCFFFE",
"@@ c #DCFFFE",
"#@ c #EAFFFE",
"$@ c #F6FFFF",
"%@ c #FFFFFF",
"&@ c #FFF6F6",
"*@ c #FFEAEA",
"=@ c #FFDCDC",
"-@ c #FFCCCC",
";@ c #FFBBBB",
">@ c #FFAAAA",
",@ c #FF9898",
"'@ c #FE8686",
")@ c #FC7474",
"!@ c #F76161",
"~@ c #F25050",
"{@ c #A80000",
"]@ c #007F81",
"^@ c #3EE3E5",
"/@ c #51F1F4",
"(@ c #62F6F9",
"_@ c #74F9FD",
":@ c #86FBFF",
"<@ c #96FAFF",
"[@ c #A8F9FF",
"}@ c #B9F9FF",
"|@ c #CAF8FF",
"1@ c #DAF7FF",
"2@ c #E8F6FF",
"3@ c #F2F5FF",
"4@ c #FAF6FF",
"5@ c #FFF2FD",
"6@ c #FFE8F3",
"7@ c #FFDAE5",
"8@ c #FFCAD5",
"9@ c #FFB9C4",
"0@ c #FFA8B3",
"a@ c #FF96A1",
"b@ c #FD848E",
"c@ c #F9707B",
"d@ c #F45D67",
"e@ c #E94550",
"f@ c #A80009",
"g@ c #007A87",
"h@ c #30C6D2",
"i@ c #4BE3EF",
"j@ c #5DE9F6",
"k@ c #71EDFC",
"l@ c #82EDFE",
"m@ c #93EDFF",
"n@ c #A4ECFF",
"o@ c #B5EAFF",
"p@ c #C5E9FF",
"q@ c #D3E8FF",
"r@ c #DFE7FF",
"s@ c #E8E8FF",
"t@ c #F3EAFF",
"u@ c #FDE8FF",
"v@ c #FFDFFB",
"w@ c #FFD3EF",
"x@ c #FFC5E1",
"y@ c #FFB5D1",
"z@ c #FFA4C0",
"A@ c #FE92AD",
"B@ c #FC809A",
"C@ c #F66B85",
"D@ c #EF566E",
"E@ c #DB364D",
"F@ c #A80015",
"G@ c #00738B",
"H@ c #1FA3BC",
"I@ c #44D0EA",
"J@ c #56D6F2",
"K@ c #69DBF9",
"L@ c #7CDCFD",
"M@ c #8DDCFF",
"N@ c #9DDAFF",
"O@ c #ADD8FF",
"P@ c #BBD7FF",
"Q@ c #C8D5FF",
"R@ c #D3D5FF",
"S@ c #DEDAFF",
"T@ c #EBDCFF",
"U@ c #F7DAFF",
"V@ c #FED3FF",
"W@ c #FFC8F8",
"X@ c #FFBBEC",
"Y@ c #FFADDD",
"Z@ c #FF9DCD",
"`@ c #FD8BBA",
" # c #F978A5",
".# c #F2628E",
"+# c #EA4E78",
"@# c #CA224B",
"## c #A80024",
"$# c #0D79A1",
"%# c #3CBCE5",
"&# c #4CBFEC",
"*# c #61C5F5",
"=# c #74C8FB",
"-# c #85C8FE",
";# c #94C7FF",
"># c #A2C4FF",
",# c #B0C3FF",
"'# c #BBC2FF",
")# c #C6C5FF",
"!# c #D4CAFF",
"~# c #E2CCFF",
"{# c #EFCAFF",
"]# c #F9C5FF",
"^# c #FFBBFF",
"/# c #FFB0F5",
"(# c #FFA2E9",
"_# c #FE93D9",
":# c #FB82C6",
"<# c #F56EB0",
"[# c #EC5898",
"}# c #E54582",
"|# c #B30D44",
"1# c #005D95",
"2# c #1C85BF",
"3# c #40A7E4",
"4# c #53ABED",
"5# c #68B1F7",
"6# c #7AB2FC",
"7# c #89B0FE",
"8# c #96AFFF",
"9# c #A2AEFF",
"0# c #ADAEFF",
"a# c #BAB5FF",
"b# c #C9B9FF",
"c# c #D9BBFF",
"d# c #E7B9FF",
"e# c #F2B5FF",
"f# c #FBADFF",
"g# c #FFA2FC",
"h# c #FE95F1",
"i# c #FC87E3",
"j# c #F775CF",
"k# c #ED5EB6",
"l# c #E44A9E",
"m# c #C72274",
"n# c #A8004A",
"o# c #0E5BA6",
"p# c #358EDD",
"q# c #4490E4",
"r# c #5894EE",
"s# c #6B98F6",
"t# c #7C9BFC",
"u# c #8999FE",
"v# c #949AFF",
"w# c #9F9DFF",
"x# c #AEA4FF",
"y# c #BEA8FF",
"z# c #CFAAFF",
"A# c #DDA8FF",
"B# c #EAA4FF",
"C# c #F59DFF",
"D# c #FC93FE",
"E# c #FC87F7",
"F# c #F676E6",
"G# c #EE63D1",
"H# c #E44EBA",
"I# c #DD3DA5",
"J# c #B30E6E",
"K# c #00429C",
"L# c #0F51B2",
"M# c #3373D9",
"N# c #4375E1",
"O# c #567AEB",
"P# c #687DF3",
"Q# c #7781F9",
"R# c #8383FC",
"S# c #918BFD",
"T# c #A292FE",
"U# c #B395FE",
"V# c #C397FE",
"W# c #D395FE",
"X# c #E091FD",
"Y# c #EB8AFC",
"Z# c #F180F9",
"`# c #F271F3",
" $ c #EB60E4",
".$ c #E14CCF",
"+$ c #D93BBA",
"@$ c #B8128D",
"#$ c #A80072",
"$$ c #002F9E",
"%$ c #0A35AD",
"&$ c #3058D5",
"*$ c #3E58DC",
"=$ c #4E5CE4",
"-$ c #5D61EC",
";$ c #6D6BF2",
">$ c #8075F6",
",$ c #927CF8",
"'$ c #A581FA",
")$ c #B682FA",
"!$ c #C37FF8",
"~$ c #D07AF6",
"{$ c #D971F2",
"]$ c #DF65EC",
"^$ c #DF55E4",
"/$ c #DC46DB",
"($ c #D537CC",
"_$ c #B20E9D",
":$ c #A70089",
"<$ c #001FA1",
"[$ c #0E23B0",
"}$ c #2C3ED2",
"|$ c #353DD5",
"1$ c #4141DB",
"2$ c #544DE1",
"3$ c #6555E5",
"4$ c #795DE8",
"5$ c #8C61EA",
"6$ c #9D62EA",
"7$ c #AB5FE8",
"8$ c #B75AE5",
"9$ c #C051E1",
"0$ c #C747DB",
"a$ c #CA3BD5",
"b$ c #CF32D2",
"c$ c #B20EAF",
"d$ c #A7009C",
"e$ c #0010A4",
"f$ c #1017B0",
"g$ c #1518BD",
"h$ c #302DD1",
"i$ c #3F33D3",
"j$ c #4F39D5",
"k$ c #603DD6",
"l$ c #7241D8",
"m$ c #8342D8",
"n$ c #913FD6",
"o$ c #9F3CD5",
"p$ c #AB37D3",
"q$ c #B531D1",
"r$ c #AD19BD",
"s$ c #AA10B2",
"t$ c #A600A7",
"u$ c #0000A1",
"v$ c #110BAE",
"w$ c #2315BB",
"x$ c #3A1FC7",
"y$ c #4C23C9",
"z$ c #632DD0",
"A$ c #742ED0",
"B$ c #7C24C9",
"C$ c #8821C7",
"D$ c #8C15BB",
"E$ c #8C0BAE",
"F$ c #8B00A0",
"G$ c #0E007B",
"H$ c #1B0097",
"I$ c #28009B",
"J$ c #3900A8",
"K$ c #4800A8",
"L$ c #51009B",
"M$ c #5C0096",
"N$ c #55007A",
" ",
" ",
" . + @ # $ % ",
" & * = - ; > , ' ) ! ~ { ",
" ] ^ / ( _ : < [ } | 1 2 3 4 5 6 ",
" 7 8 9 0 a 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 A 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 ` ...+. ",
" @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:. ",
" <.[.}.|.1.2.3.4.5.6.7.8.9.0.a.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.A.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.`. +.+++@+#+$+%+ ",
" &+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+ ",
" 5+6+7+8+9+0+a+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+A+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+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@ ",
" ]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@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@A@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@`@ #.#+#@### ",
" $#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#(#_#:#<#[#}#|# ",
" 1#2#3#4#5#6#7#8#9#0#a#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#A#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#`# $.$+$@$#$ ",
" $$%$&$*$=$-$;$>$,$'$)$!$~${$]$^$/$($_$:$ ",
" <$[$}$|$1$2$3$4$5$6$7$8$9$0$a$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$A$B$C$D$E$F$ ",
" G$H$I$J$K$L$M$N$ ",
" ",
" ",
" ",
" "};
......@@ -60,4 +60,6 @@
#include "moduleDefault.xpm"
#include "ColorWheel.xpm"
#endif // WICONS_H
......@@ -181,6 +181,12 @@ void WMainWindow::setupGUI()
m_iconManager.addIcon( std::string( "video" ), video_xpm );
m_iconManager.addIcon( std::string( "image" ), image_xpm );
m_iconManager.addIcon( std::string( "preferences" ), preferences_xpm );
m_iconManager.addIcon( std::string( "colorwheel" ), ColorWheel_xpm );
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 );
try
{
......@@ -270,17 +276,10 @@ void WMainWindow::setupGUI()
m_permanentToolBar = new WQtToolBar( "Standard Toolbar", this );
addToolBar( Qt::TopToolBarArea, m_permanentToolBar );
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 Dataset or Project", m_permanentToolBar );
m_loadButton->setShortcut( QKeySequence( QKeySequence::Open ) );
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 ) );
m_saveAction = new QAction( m_iconManager.getIcon( "saveProject" ), "Save Project", m_permanentToolBar );
connect( m_loadButton, SIGNAL( triggered( bool ) ), this, SLOT( openLoadDialog() ) );
......@@ -326,15 +325,11 @@ void WMainWindow::setupGUI()
// This QAction stuff is quite ugly and complicated some times ... There is no nice constructor which takes name, slot keysequence and so on
// directly -> set shortcuts, and some further properties using QAction's interface
QMenu* bgColorMenu = new QMenu( "Background Colors" );
bgColorMenu->addAction( mainGLDock->getGLWidget()->getBackgroundColorAction() );
m_viewAction = new QAction( "View", this );
m_viewMenu = m_menuBar->addMenu( "View" );
m_viewMenu->addAction( hideMenuAction );
m_viewMenu->addSeparator();
m_viewMenu->addAction( showNavWidgets );
m_viewMenu->addMenu( bgColorMenu );
m_viewMenu->addSeparator();
m_viewMenu->addMenu( m_permanentToolBar->getStyleMenu() );
m_viewAction->setMenu( m_viewMenu );
......@@ -355,50 +350,14 @@ void WMainWindow::setupGUI()
m_settingsMenu->addMenu( logLevels );
m_settingsAction->setMenu( m_settingsMenu );
// a separate menu for some presets
QMenu* cameraPresetMenu = m_cameraMenu->addMenu( "Presets" );
QAction* controlPanelTrigger = m_controlPanel->toggleViewAction();
QList< QKeySequence > controlPanelShortcut;
controlPanelShortcut.append( QKeySequence( Qt::Key_F9 ) );
controlPanelTrigger->setShortcuts( controlPanelShortcut );