-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindow361.cpp
More file actions
42 lines (33 loc) · 1.04 KB
/
Copy pathwindow361.cpp
File metadata and controls
42 lines (33 loc) · 1.04 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
33
34
35
36
37
38
39
40
#include "window361.h"
#include <iostream>
#include <QGridLayout>
Window361::Window361() : renderArea(std::make_unique<RenderArea361>(nullptr)),
nextPageButton(std::make_unique<QPushButton>("Refresh"))
{
//renderArea = new RenderArea361((QWidget *)0);
//nextPageButton = new QPushButton("next page");
connect(nextPageButton.get(), SIGNAL(clicked()), this, SLOT(nextPageClicked()));
QGridLayout *layout = new QGridLayout;
layout->addWidget(renderArea.get(), 0, 0);
layout->addWidget(nextPageButton.get(), 0, 1);
setLayout(layout);
setWindowTitle(tr("361 Window"));
}
Drawable *Window361::getDrawable() {
return renderArea.get();
}
//Window361::~Window361() {
//}
void Window361::setPageTurner(PageTurner *inPageTurner) {
this->pageTurner = inPageTurner;
pageTurner->nextPage(); // give them the change for the first page.
}
void Window361::setTitle(const char* title)
{
setWindowTitle(tr(title));
}
void Window361::nextPageClicked() {
if(pageTurner != 0) {
pageTurner->nextPage();
}
}