Commit 0ba98d49 authored by math's avatar math
Browse files

[CHANGE] Now the signals and slots get wired in a separate member function of WMainWindow

parent b95b7db5
......@@ -31,6 +31,7 @@
#include "../icons/WIcons.h"
void WMainWindow::addDockableGLWidget( QMainWindow *MainWindow )
{
m_glWidget = new WQtGLWidget();
......@@ -41,6 +42,15 @@ void WMainWindow::addDockableGLWidget( QMainWindow *MainWindow )
MainWindow->addDockWidget( Qt::LeftDockWidgetArea, dockWidget );
}
void WMainWindow::connectSlots( QMainWindow *MainWindow )
{
QObject::connect( m_actionExit, SIGNAL( activated() ), MainWindow, SLOT( close() ) );
QObject::connect( m_actionLoad, SIGNAL( activated() ), this, SLOT( load() ) );
QMetaObject::connectSlotsByName( MainWindow );
}
void WMainWindow::setupGUI( QMainWindow *MainWindow )
{
QIcon mainWindowIcon;
......@@ -155,13 +165,7 @@ void WMainWindow::setupGUI( QMainWindow *MainWindow )
m_toolBar->setWindowTitle( QApplication::translate( "MainWindow",
"toolBar", 0, QApplication::UnicodeUTF8 ) );
QObject::connect( m_actionExit, SIGNAL( activated() ), MainWindow,
SLOT( close() ) );
QObject::connect( m_actionLoad, SIGNAL( activated() ), this,
SLOT( load() ) );
QMetaObject::connectSlotsByName( MainWindow );
connectSlots( MainWindow );
}
void WMainWindow::setEnabled( bool enable )
......
......@@ -72,6 +72,11 @@ private:
*/
void addDockableGLWidget( QMainWindow *MainWindow );
/**
* Connects some signals with some slots
*/
void connectSlots( QMainWindow *MainWindow );
QAction* m_actionLoad;
QAction* m_actionSave;
QAction* m_actionPreferences;
......
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