A?adido di?logo de selecci?n del flow (en el primer arranque).

A?adida la comprobaci?n de que OpenGL est? disponible en el sistema.
This commit is contained in:
Luis Ángel San Martín
2012-10-11 22:39:16 +02:00
parent b4669c5b8b
commit 46a769e53e
12 changed files with 103 additions and 11 deletions

View File

@ -0,0 +1,40 @@
#include "onstart_flow_selection_dialog.h"
#include <QPushButton>
#include <QHBoxLayout>
OnStartFlowSelectionDialog::OnStartFlowSelectionDialog(QWidget * parent)
:QDialog(parent)
{
setModal(true);
QPushButton * acceptHW = new QPushButton(this);
connect(acceptHW,SIGNAL(clicked()),this,SLOT(accept()));
QPushButton * rejectHW = new QPushButton(this); //and use SW flow
connect(rejectHW,SIGNAL(clicked()),this,SLOT(reject()));
acceptHW->setGeometry(90,165,110,118);
acceptHW->setFlat(true);
acceptHW->setAutoFillBackground(true);
rejectHW->setGeometry(464,165,110,118);
rejectHW->setFlat(true);
rejectHW->setAutoFillBackground(true);
QPalette paletteHW;
paletteHW.setBrush(acceptHW->backgroundRole(), QBrush(QImage(":/images/useNewFlowButton.png")));
acceptHW->setPalette(paletteHW);
QPalette paletteSW;
paletteSW.setBrush(rejectHW->backgroundRole(), QBrush(QImage(":/images/useOldFlowButton.png")));
rejectHW->setPalette(paletteSW);
//QHBoxLayout * layout = new QHBoxLayout;
//layout->addWidget(acceptHW);
//layout->addWidget(rejectHW);
QPalette palette;
palette.setBrush(this->backgroundRole(), QBrush(QImage(":/images/onStartFlowSelection.png")));
setPalette(palette);
//setLayout(layout);
resize(664,371);
}

View File

@ -0,0 +1,13 @@
#ifndef ONSTART_FLOW_SELECTION_DIALOG_H
#define ONSTART_FLOW_SELECTION_DIALOG_H
#include <QDialog>
class OnStartFlowSelectionDialog : public QDialog
{
Q_OBJECT
public:
OnStartFlowSelectionDialog(QWidget * parent = 0);
};
#endif

View File

@ -270,7 +270,7 @@ void YACReaderFlowGL::initializeGL()
markTexture = bindTexture(QImage(":/images/setRead.png"),GL_TEXTURE_2D,GL_RGBA,QGLContext::LinearFilteringBindOption | QGLContext::MipmapBindOption);
if(lazyPopulateObjects!=-1)
populate(lazyPopulateObjects); //TODO esto es responsabilidad del usuario de la clase
populate(lazyPopulateObjects);
}
void YACReaderFlowGL::paintGL()
@ -1158,8 +1158,8 @@ void YACReaderPageFlowGL::updateImageData()
void YACReaderPageFlowGL::populate(int n)
{
worker->reset();
if(lazyPopulateObjects!=-1)
YACReaderFlowGL::populate(n);
//if(lazyPopulateObjects!=-1)
//YACReaderFlowGL::populate(n);
lazyPopulateObjects = n;
imagesReady = QVector<bool> (n,false);
rawImages = QVector<QByteArray> (n);