mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 10:22:58 -05:00
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
#ifndef __GOTO_FLOW_WIDGET_H
|
|
#define __GOTO_FLOW_WIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QSettings>
|
|
#include "yacreader_global_gui.h"
|
|
|
|
#include "yacreader_page_flow_rhi.h"
|
|
#include "themable.h"
|
|
|
|
using namespace YACReader;
|
|
|
|
class QSettings;
|
|
class GoToFlowToolBar;
|
|
class QVBoxLayout;
|
|
class QKeyEvent;
|
|
|
|
class GoToFlowWidget : public QWidget, protected Themable
|
|
{
|
|
Q_OBJECT
|
|
protected:
|
|
void applyTheme(const Theme &theme) override;
|
|
|
|
public:
|
|
GoToFlowWidget(QWidget *parent = nullptr, FlowType flowType = CoverFlowLike);
|
|
~GoToFlowWidget() override;
|
|
|
|
public slots:
|
|
void reset();
|
|
void centerSlide(int slide);
|
|
void setPageNumber(int page);
|
|
void setFlowType(FlowType flowType);
|
|
void setNumSlides(unsigned int slides);
|
|
void setImageReady(int index, const QByteArray &image);
|
|
void updateSize();
|
|
void updateConfig(QSettings *settings);
|
|
void setFlowRightToLeft(bool b);
|
|
|
|
signals:
|
|
void goToPage(unsigned int);
|
|
|
|
protected:
|
|
void keyPressEvent(QKeyEvent *event) override;
|
|
void resizeEvent(QResizeEvent *event) override;
|
|
|
|
private:
|
|
QVBoxLayout *mainLayout;
|
|
GoToFlowToolBar *toolBar;
|
|
YACReaderPageFlow3D *flow;
|
|
QSize imageSize;
|
|
};
|
|
|
|
#endif
|