updated go to flow visual style

This commit is contained in:
Luis Ángel San Martín
2015-12-11 20:59:18 +01:00
parent d68604c1c1
commit 405cfc864d
19 changed files with 53 additions and 83 deletions

View File

@ -34,7 +34,6 @@ GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
worker = new PageLoader(&mutexGoToFlow);
flow = new YACReaderFlow(this,flowType);
flow->setReflectionEffect(PictureFlow::PlainReflection);
imageSize = Configuration::getConfiguration().getGotoSlideSize();
@ -46,23 +45,14 @@ GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
connect(toolBar,SIGNAL(goTo(unsigned int)),this,SIGNAL(goToPage(unsigned int)));
connect(toolBar,SIGNAL(setCenter(unsigned int)),flow,SLOT(showSlide(unsigned int)));
mainLayout->insertWidget(0,flow);
mainLayout->setStretchFactor(flow,1);
mainLayout->addWidget(flow);
toolBar->raise();
resize(static_cast<int>(5*imageSize.width()),static_cast<int>(imageSize.height()*1.7));
//install eventFilter
//flow->installEventFilter(this);
/*edit->installEventFilter(this);
centerButton->installEventFilter(this);
goToButton->installEventFilter(this);
connect(edit,SIGNAL(returnPressed()),goToButton,SIGNAL(clicked()));*/
resize(static_cast<int>(5*imageSize.width()),toolBar->height() + static_cast<int>(imageSize.height()*1.7));
this->setCursor(QCursor(Qt::ArrowCursor));
}
GoToFlow::~GoToFlow()
{
delete flow;
@ -84,6 +74,15 @@ void GoToFlow::keyPressEvent(QKeyEvent *event)
GoToFlowWidget::keyPressEvent(event);
}
void GoToFlow::resizeEvent(QResizeEvent *event)
{
QWidget::resizeEvent(event);
toolBar->move(0, event->size().height() - toolBar->height());
toolBar->setFixedWidth(width());
}
void GoToFlow::centerSlide(int slide)
{
if(flow->centerIndex()!=slide)