Import data message, and LineOverlay antialiasing

This commit is contained in:
Mark Watkins 2011-07-30 12:08:19 +10:00
parent 1eadb3c19a
commit 2a5797b141
3 changed files with 17 additions and 5 deletions

View File

@ -180,15 +180,14 @@ void gFlagsLine::Plot(gGraphWindow & w,float scrx,float scry)
glScissor(w.GetLeftMargin(),w.GetBottomMargin(),width,height);
glEnable(GL_SCISSOR_TEST);
glLineWidth (1.5);
bool antialias=pref["UseAntiAliasing"].toBool();
if (antialias) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //_MINUS_SRC_ALPHA);
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
}
glLineWidth (1.5);
} else glLineWidth (1);
if (quadcnt>0) {
glEnableClientState(GL_VERTEX_ARRAY);

View File

@ -128,6 +128,15 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry)
}
bool antialias=pref["UseAntiAliasing"].toBool();
if (antialias) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //_MINUS_SRC_ALPHA);
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glLineWidth (1.5);
} else glLineWidth (1);
glColor4ub(col.red(),col.green(),col.blue(),col.alpha());
if (quadcnt>0) {
glEnableClientState(GL_VERTEX_ARRAY);
@ -149,6 +158,10 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry)
glDisableClientState(GL_VERTEX_ARRAY);
}
if (antialias) {
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
glDisable(GL_SCISSOR_TEST);
}

View File

@ -75,7 +75,7 @@ MainWindow::MainWindow(QWidget *parent) :
qprogress->hide();
ui->statusbar->setMinimumWidth(200);
ui->statusbar->addPermanentWidget(qstatus,0);
ui->statusbar->addPermanentWidget(qprogress,10);
ui->statusbar->addPermanentWidget(qprogress,1);
ui->statusbar->addPermanentWidget(qstatus2,0);
Profiles::Scan();
@ -177,7 +177,7 @@ void MainWindow::on_action_Import_Data_triggered()
if (qfd.exec()) {
qprogress->setValue(0);
qprogress->show();
//qstatus->setText(tr("Importing Data"));
qstatus->setText(tr("Importing Data"));
dirNames=qfd.selectedFiles();
int c=0,d;
for (int i=0;i<dirNames.size();i++) {