-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
31 lines (24 loc) · 1.31 KB
/
mainwindow.cpp
File metadata and controls
31 lines (24 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
Engine::getInstance()->changeGraphSize(5);
connect(ui->matrix,SIGNAL(changed(QObject *)),Engine::getInstance(),SLOT(updateGraph(QObject*)));
connect(ui->list,SIGNAL(changed(QObject *)),Engine::getInstance(),SLOT(updateGraph(QObject*)));
connect(ui->connectionAdd,SIGNAL(changed(QObject *)),Engine::getInstance(),SLOT(updateGraph(QObject*)));
connect(ui->graphSize,SIGNAL(changed(int)),Engine::getInstance(),SLOT(changeGraphSize(int)));
connect(ui->generators,SIGNAL(graphGenerated(Graph*)),Engine::getInstance(),SLOT(setGraph(Graph*)));
connect(Engine::getInstance(),SIGNAL(changedGraph(QObject*)),ui->matrix,SLOT(update(QObject*)));
connect(Engine::getInstance(),SIGNAL(changedGraph(QObject*)),ui->list,SLOT(update(QObject*)));
connect(Engine::getInstance(),SIGNAL(changedGraph(QObject*)),ui->graph,SLOT(update(QObject*)));
connect(Engine::getInstance(),SIGNAL(changedGraph(QObject*)),ui->connectionAdd,SLOT(update(QObject*)));
connect(Engine::getInstance(),SIGNAL(changedGraph(QObject*)),ui->connectionMatrix,SLOT(update(QObject*)));
}
MainWindow::~MainWindow()
{
delete ui;
Engine::getInstance()->removeGraph();
}