-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
33 lines (22 loc) · 1.09 KB
/
Copy pathmainwindow.cpp
File metadata and controls
33 lines (22 loc) · 1.09 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
31
32
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "downloader.h"
#define CURR_PAGE ui->stackedWidget->currentIndex()
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowTitle(QString(tr("uQtLoad")));
connect(ui->componentWidget,&ComponentPage::s_nextPage,this,[=](){ui->stackedWidget->setCurrentIndex(CURR_PAGE+1);});
connect(ui->componentWidget,&ComponentPage::s_prevPage,this,[=](){ui->stackedWidget->setCurrentIndex(CURR_PAGE-1);});
connect(ui->saveWidget,&SavePage::s_prevPage,this,[=](){ui->stackedWidget->setCurrentIndex(CURR_PAGE-1);});
connect(ui->mirrorWidget,&MirrorSettings::s_closeApp,this,[=](){this->close();});
connect(ui->mirrorWidget,&MirrorSettings::s_nextPage,this,[=](){ui->stackedWidget->setCurrentIndex(CURR_PAGE+1);});
connect(ui->componentWidget,&ComponentPage::s_setUrls,ui->saveWidget,&SavePage::setUrls);
connect(ui->mirrorWidget,&MirrorSettings::s_setMirror,ui->componentWidget,&ComponentPage::getHTML);
}
MainWindow::~MainWindow()
{
delete ui;
}