SLGMMainWindow::SLGMMainWindow(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); connect(ui.actionNew,SIGNAL(triggered()),this,SLOT(onActionNew())); connect(ui.actionOpen,SIGNAL(triggered()),this,SLOT(onActionOpen())); connect(ui.actionSave,SIGNAL(triggered()),this,SLOT(onActionSave())); connect(ui.actionSaveAs,SIGNAL(triggered()),this,SLOT(onActionSaveAs())); connect(ui.actionClose,SIGNAL(triggered()),this,SLOT(onActionClose())); mainLayout = new QHBoxLayout(); editorWidget = new SLGMEditorWidget(); widgetMapTreeEditor = new SLGMMapTreeEditor(this->getEditorScene()->game, this); objectSelectorWidget = new SLGMObjectSelectorWidget(this); mainLayout->addWidget(widgetMapTreeEditor); mainLayout->addWidget(editorWidget); mainLayout->addWidget(objectSelectorWidget); QWidget* temp = new QWidget(); temp->setLayout(mainLayout); setCentralWidget(temp); }
void MainWindowImpl::setSlots(void) { connect( actionNew, SIGNAL( triggered() ), this, SLOT( onActionNew() ) ); connect( actionOpen, SIGNAL( triggered() ), this, SLOT( onActionOpen() ) ); connect( actionSaveAs, SIGNAL( triggered() ), this, SLOT( onActionSaveAs() ) ); connect( actionProperties, SIGNAL( triggered() ), this, SLOT( onActionProperties() ) ); connect( actionExit, SIGNAL( triggered() ), this, SLOT( onActionExit() ) ); connect( actionCut, SIGNAL( triggered() ), this, SLOT( onActionCut() ) ); connect( actionCopy, SIGNAL( triggered() ), this, SLOT( onActionCopy() ) ); connect( actionPaste, SIGNAL( triggered() ), this, SLOT( onActionPaste() ) ); connect( actionSelectAll, SIGNAL( triggered() ), this, SLOT( onActionSelectAll() ) ); connect( actionDeselect, SIGNAL( triggered() ), this, SLOT( onActionDeselect() ) ); connect( actionAddFile, SIGNAL( triggered() ), this, SLOT( onActionAddFile() ) ); connect( actionAddDirectory, SIGNAL( triggered() ), this, SLOT( onActionAddDirectory() ) ); connect( actionDelete, SIGNAL( triggered() ), this, SLOT( onActionDelete() ) ); connect( actionAbout, SIGNAL( triggered() ), this, SLOT( onActionAbout() ) ); connect( actionAboutQt, SIGNAL( triggered() ), this, SLOT( onActionAboutQt() ) ); connect( treeView->selectionModel(), SIGNAL( currentChanged(const QModelIndex &, const QModelIndex &) ), this, SLOT( onItemSelected(const QModelIndex &, const QModelIndex &) ) ); connect( pbGo, SIGNAL( clicked() ), this, SLOT( onGo() ) ); }