MCPcopy Create free account
hub / github.com/YACReader/yacreader / GoToFlowWidget

Method GoToFlowWidget

YACReader/goto_flow_widget.cpp:12–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <QSettings>
11
12GoToFlowWidget::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
47void GoToFlowWidget::applyTheme(const Theme &theme)
48{

Callers

nothing calls this directly

Calls 3

getGotoSlideSizeMethod · 0.80
setShowMarksMethod · 0.45
setSlideSizeMethod · 0.45

Tested by

no test coverage detected