gui.cpp

changeset 156
d35b7e440585
parent 155
e21c24bfcdf3
child 158
499286fcbf37
--- a/gui.cpp	Fri May 03 23:46:46 2013 +0300
+++ b/gui.cpp	Sat May 04 01:57:42 2013 +0300
@@ -94,6 +94,7 @@
 EXTERN_ACTION (screencap)
 EXTERN_ACTION (editObject)
 EXTERN_ACTION (uncolorize)
+EXTERN_ACTION (axes)
 
 #ifndef RELEASE
 EXTERN_ACTION (addTestQuad)
@@ -108,6 +109,7 @@
 cfg (int, gui_toolbar_iconsize, 24);
 cfg (str, gui_colortoolbar, "16:24:|:0:1:2:3:4:5:6:7");
 extern_cfg (str, io_recentfiles);
+extern_cfg (bool, gl_axes);
 
 // =============================================================================
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -172,11 +174,14 @@
 		connect (qAct, SIGNAL (triggered ()), this, SLOT (slot_action ()));
 	}
 	
-	// Grid actions are checkable
+	// Grid actions and axes are checkable
 	ACTION (gridCoarse)->setCheckable (true);
 	ACTION (gridMedium)->setCheckable (true);
 	ACTION (gridFine)->setCheckable (true);
 	
+	ACTION (axes)->setCheckable (true);
+	ACTION (axes)->setChecked (gl_axes);
+	
 	// things not implemented yet
 	QAction* const qaDisabledActions[] = {
 		ACTION (help),
@@ -211,6 +216,7 @@
 	// View menu
 	qViewMenu = menuBar ()->addMenu (tr ("&View"));
 	qViewMenu->addAction (ACTION (resetView));			// Reset View
+	qViewMenu->addAction (ACTION (axes));					// Draw Axes
 	qViewMenu->addSeparator ();							// -----
 	qViewMenu->addAction (ACTION (screencap));			// Screencap Part
 	qViewMenu->addAction (ACTION (showHistory));			// Edit History
@@ -395,6 +401,10 @@
 	addToolBarBreak (Qt::TopToolBarArea);
 	
 	// ==========================================
+	initSingleToolBar ("View");
+	g_CurrentToolBar->addAction (ACTION (axes));
+	
+	// ==========================================
 	// Color toolbar
 	qColorToolBar = new QToolBar ("Quick Colors");
 	addToolBar (Qt::RightToolBarArea, qColorToolBar);
@@ -415,6 +425,7 @@
 	g_CurrentToolBar->addAction (ACTION (screencap));
 	g_CurrentToolBar->addAction (ACTION (uncolorize));
 	
+	
 	updateToolBars ();
 }
 

mercurial