-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlusDialog.cpp
39 lines (33 loc) · 1018 Bytes
/
PlusDialog.cpp
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
33
34
35
36
37
38
39
#include "PlusDialog.h"
#include "ui_PlusDialog.h"
#include "PlusWidget.h"
PlusDialog::PlusDialog(QWidget * p) :
QDialog(p),
ui(new Ui::PlusDialog),
m_pPlusWidget(0)
{
ui->setupUi(this);
}
PlusDialog::~PlusDialog()
{
delete ui;
}
void
PlusDialog::
setPlusWidget(PlusWidget * plusWidget)
{
m_pPlusWidget = plusWidget;
ui->layout->addWidget(plusWidget);
connect(ui->pageNavigatorWidget, SIGNAL(nextPageToggled()), plusWidget, SLOT(nextPage()));
connect(ui->pageNavigatorWidget, SIGNAL(prevPageToggled()), plusWidget, SLOT(prevPage()));
connect(plusWidget, SIGNAL(pageNumChanged(int)), ui->pageNavigatorWidget, SLOT(setPageNum(int)));
connect(plusWidget, SIGNAL(thereIsNextPage(bool)), ui->pageNavigatorWidget, SLOT(enableNextButton(bool)));
connect(plusWidget, SIGNAL(thereIsPrevPage(bool)), ui->pageNavigatorWidget, SLOT(enablePrevButton(bool)));
}
void
PlusDialog::
closeEvent(QCloseEvent * e)
{
m_pPlusWidget->clearContents();
QDialog::closeEvent(e);
}