more cleanup

Thu, 01 Aug 2013 03:32:57 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 01 Aug 2013 03:32:57 +0300
changeset 412
064b0467c8de
parent 411
fd90677cec8d
child 413
a52c30a4c041

more cleanup

src/gldraw.cpp file | annotate | diff | comparison | revisions
src/gldraw.h file | annotate | diff | comparison | revisions
src/gui.cpp file | annotate | diff | comparison | revisions
src/history.cpp file | annotate | diff | comparison | revisions
--- a/src/gldraw.cpp	Thu Aug 01 03:26:47 2013 +0300
+++ b/src/gldraw.cpp	Thu Aug 01 03:32:57 2013 +0300
@@ -92,27 +92,24 @@
 // =============================================================================
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 // =============================================================================
-GLRenderer::GLRenderer (QWidget* parent) :
-	QGLWidget (parent),
-	m_picking( false ),
-	m_rangepick( false ),
-	m_camera( (GL::Camera) gl_camera.value ),
-	m_drawToolTip( false ),
-	m_editMode( Select ),
-	m_rectdraw( false ),
-	m_panning( false ),
-	m_file( null ),
-	m_toolTipTimer( new QTimer( this )),
-	m_thickBorderPen( QPen( QColor( 0, 0, 0, 208 ), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin )),
-	m_thinBorderPen( m_thickBorderPen ),
-	m_msglog( null )
-{
+GLRenderer::GLRenderer (QWidget* parent) : QGLWidget (parent) {
+	m_picking = m_rangepick = false;
+	m_camera = (GL::Camera) gl_camera.value;
+	m_drawToolTip = false;
+	m_editMode = Select;
+	m_rectdraw = false;
+	m_panning = false;
+	setFile (null);
 	setDrawOnly (false);
 	resetAngles();
+	setMessageLog( null );
 	
+	m_toolTipTimer = new QTimer (this);
 	m_toolTipTimer->setSingleShot (true);
 	connect (m_toolTipTimer, SIGNAL (timeout()), this, SLOT (slot_toolTipTimer()));
 	
+	m_thickBorderPen = QPen (QColor (0, 0, 0, 208), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
+	m_thinBorderPen = m_thickBorderPen;
 	m_thinBorderPen.setWidth (1);
 	
 	// Init camera icons
--- a/src/gldraw.h	Thu Aug 01 03:26:47 2013 +0300
+++ b/src/gldraw.h	Thu Aug 01 03:32:57 2013 +0300
@@ -129,7 +129,7 @@
 	double m_virtWidth, m_virtHeight, m_rotX, m_rotY, m_rotZ, m_panX, m_panY;
 	bool m_darkbg, m_rangepick, m_addpick, m_drawToolTip, m_screencap;
 	QPoint m_pos, m_rangeStart;
-	QPen m_thinBorderPen, m_thickBorderPen;
+	QPen m_thickBorderPen, m_thinBorderPen;
 	Camera m_camera, m_toolTipCamera;
 	uint m_axeslist;
 	ushort m_width, m_height;
--- a/src/gui.cpp	Thu Aug 01 03:26:47 2013 +0300
+++ b/src/gui.cpp	Thu Aug 01 03:32:57 2013 +0300
@@ -71,15 +71,11 @@
 // =============================================================================
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 // =============================================================================
-ForgeWindow::ForgeWindow() :
-	m_renderer( new GLRenderer ),
-	ui( new Ui_LDForgeUI ),
-	m_primLoaderBar( new QProgressBar ),
-	m_primLoaderWidget( new QWidget ),
-	m_msglog( new MessageManager ),
-	m_quickColors( quickColorsFromConfig() )
-{
+ForgeWindow::ForgeWindow() {
 	g_win = this;
+	m_renderer = new GLRenderer;
+	
+	ui = new Ui_LDForgeUI;
 	ui->setupUi (this);
 	
 	// Stuff the renderer into its frame
@@ -90,13 +86,17 @@
 	connect (ui->objectList, SIGNAL (itemDoubleClicked (QListWidgetItem*)), this, SLOT (slot_editObject (QListWidgetItem*)));
 	connect (ui->fileList, SIGNAL (currentItemChanged (QListWidgetItem*, QListWidgetItem*)), this, SLOT (changeCurrentFile()));
 	
-	// Init message log manager=
+	// Init message log manager
+	m_msglog = new MessageManager;
 	m_msglog->setRenderer (R());
-	m_renderer->setMessageLog (m_msglog);=
+	m_renderer->setMessageLog (m_msglog);
+	m_quickColors = quickColorsFromConfig();
 	slot_selectionChanged();
 	setStatusBar (new QStatusBar);
 	
 	// Init primitive loader task stuff
+	m_primLoaderBar = new QProgressBar;
+	m_primLoaderWidget = new QWidget;
 	QHBoxLayout* primLoaderLayout = new QHBoxLayout (m_primLoaderWidget);
 	primLoaderLayout->addWidget (new QLabel ("Loading primitives:"));
 	primLoaderLayout->addWidget (m_primLoaderBar);
--- a/src/history.cpp	Thu Aug 01 03:26:47 2013 +0300
+++ b/src/history.cpp	Thu Aug 01 03:32:57 2013 +0300
@@ -26,8 +26,8 @@
 bool g_fullRefresh = false;
 
 History::History() :
-	m_opened( false ),
-	m_pos( -1 ) {}
+	m_pos( -1 ),
+	m_opened( false ) {}
 
 void History::undo() {
 	if (m_changesets.size() == 0 || pos() == -1)

mercurial