-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmainWindow.cpp
More file actions
29 lines (26 loc) · 909 Bytes
/
mainWindow.cpp
File metadata and controls
29 lines (26 loc) · 909 Bytes
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
#include "mainWindow.h"
#include "myScene.h"
#include "ui_mainWindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
myScene *scene = new myScene;
ui->myScene->setScene(scene);
connect(ui->addressLine, SIGNAL(textChanged()), this, SLOT(receiveAddress()));
connect(this, SIGNAL(sendAddress(QString)), scene, SLOT(goToAddress(QString)));
connect(ui->homepage, SIGNAL(clicked()), scene, SLOT(homepage()));
connect(ui->back, SIGNAL(clicked()), scene, SIGNAL(back()));
connect(ui->forward, SIGNAL(clicked()), scene, SIGNAL(forward()));
connect(ui->reload, SIGNAL(clicked()), scene, SIGNAL(reload()));
connect(ui->stop, SIGNAL(clicked()), scene, SIGNAL(stop()));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::receiveAddress()
{
emit sendAddress(ui->addressLine->toPlainText());
}