| 10 | #include <QSettings> |
| 11 | |
| 12 | GoToFlowWidget::GoToFlowWidget(QWidget *parent, FlowType flowType) |
| 13 | : QWidget(parent) |
| 14 | { |
| 15 | Q_UNUSED(flowType) |
| 16 | |
| 17 | mainLayout = new QVBoxLayout(this); |
| 18 | mainLayout->setContentsMargins(0, 0, 0, 0); |
| 19 | mainLayout->setSpacing(0); |
| 20 | |
| 21 | toolBar = new GoToFlowToolBar(this); |
| 22 | |
| 23 | setLayout(mainLayout); |
| 24 | |
| 25 | flow = new YACReaderPageFlow3D(this); |
| 26 | flow->setShowMarks(false); |
| 27 | |
| 28 | imageSize = Configuration::getConfiguration().getGotoSlideSize(); |
| 29 | |
| 30 | flow->setSlideSize(imageSize); |
| 31 | connect(flow, &YACReaderPageFlow3D::centerIndexChanged, this, &GoToFlowWidget::setPageNumber); |
| 32 | connect(flow, &YACReaderPageFlow3D::selected, this, &GoToFlowWidget::goToPage); |
| 33 | |
| 34 | connect(toolBar, &GoToFlowToolBar::goToPage, this, &GoToFlowWidget::goToPage); |
| 35 | connect(toolBar, &GoToFlowToolBar::setCenter, flow, &YACReaderPageFlow3D::setCenterIndex); |
| 36 | |
| 37 | mainLayout->addWidget(flow); |
| 38 | toolBar->raise(); |
| 39 | |
| 40 | resize(static_cast<int>(5 * imageSize.width()), toolBar->height() + static_cast<int>(imageSize.height() * 1.7)); |
| 41 | |
| 42 | this->setCursor(QCursor(Qt::ArrowCursor)); |
| 43 | |
| 44 | initTheme(this); |
| 45 | } |
| 46 | |
| 47 | void GoToFlowWidget::applyTheme(const Theme &theme) |
| 48 | { |
nothing calls this directly
no test coverage detected