mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 04:00:44 +00:00
Import data message, and LineOverlay antialiasing
This commit is contained in:
parent
1eadb3c19a
commit
2a5797b141
@ -180,15 +180,14 @@ void gFlagsLine::Plot(gGraphWindow & w,float scrx,float scry)
|
|||||||
glScissor(w.GetLeftMargin(),w.GetBottomMargin(),width,height);
|
glScissor(w.GetLeftMargin(),w.GetBottomMargin(),width,height);
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
glLineWidth (1.5);
|
|
||||||
bool antialias=pref["UseAntiAliasing"].toBool();
|
bool antialias=pref["UseAntiAliasing"].toBool();
|
||||||
if (antialias) {
|
if (antialias) {
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //_MINUS_SRC_ALPHA);
|
||||||
glEnable(GL_LINE_SMOOTH);
|
glEnable(GL_LINE_SMOOTH);
|
||||||
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
|
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
|
||||||
|
glLineWidth (1.5);
|
||||||
}
|
} else glLineWidth (1);
|
||||||
|
|
||||||
if (quadcnt>0) {
|
if (quadcnt>0) {
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
|
@ -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());
|
glColor4ub(col.red(),col.green(),col.blue(),col.alpha());
|
||||||
if (quadcnt>0) {
|
if (quadcnt>0) {
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
@ -149,6 +158,10 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry)
|
|||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (antialias) {
|
||||||
|
glDisable(GL_LINE_SMOOTH);
|
||||||
|
glDisable(GL_BLEND);
|
||||||
|
}
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
qprogress->hide();
|
qprogress->hide();
|
||||||
ui->statusbar->setMinimumWidth(200);
|
ui->statusbar->setMinimumWidth(200);
|
||||||
ui->statusbar->addPermanentWidget(qstatus,0);
|
ui->statusbar->addPermanentWidget(qstatus,0);
|
||||||
ui->statusbar->addPermanentWidget(qprogress,10);
|
ui->statusbar->addPermanentWidget(qprogress,1);
|
||||||
ui->statusbar->addPermanentWidget(qstatus2,0);
|
ui->statusbar->addPermanentWidget(qstatus2,0);
|
||||||
Profiles::Scan();
|
Profiles::Scan();
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ void MainWindow::on_action_Import_Data_triggered()
|
|||||||
if (qfd.exec()) {
|
if (qfd.exec()) {
|
||||||
qprogress->setValue(0);
|
qprogress->setValue(0);
|
||||||
qprogress->show();
|
qprogress->show();
|
||||||
//qstatus->setText(tr("Importing Data"));
|
qstatus->setText(tr("Importing Data"));
|
||||||
dirNames=qfd.selectedFiles();
|
dirNames=qfd.selectedFiles();
|
||||||
int c=0,d;
|
int c=0,d;
|
||||||
for (int i=0;i<dirNames.size();i++) {
|
for (int i=0;i<dirNames.size();i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user