mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 19:50:45 +00:00
Argh.. Git is annoying
This commit is contained in:
commit
acfcb664e1
@ -8,6 +8,11 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <AGL/agl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SleepLib/profiles.h"
|
#include "SleepLib/profiles.h"
|
||||||
#include "graphwindow.h"
|
#include "graphwindow.h"
|
||||||
#include "gTitle.h"
|
#include "gTitle.h"
|
||||||
@ -806,8 +811,15 @@ void gGraphWindow::initializeGL()
|
|||||||
m_scrX=width();
|
m_scrX=width();
|
||||||
m_scrY=height();
|
m_scrY=height();
|
||||||
|
|
||||||
|
/*QGLFormat glFormat(QGL::SampleBuffers);
|
||||||
|
glFormat.setAlpha(true);
|
||||||
|
glFormat.setDirectRendering(true);
|
||||||
|
glFormat.setSwapInterval(1);
|
||||||
|
setFormat(glFormat);*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool first_draw_event=true;
|
||||||
void gGraphWindow::resizeGL(int w, int h)
|
void gGraphWindow::resizeGL(int w, int h)
|
||||||
{
|
{
|
||||||
m_scrX=w;
|
m_scrX=w;
|
||||||
@ -868,11 +880,16 @@ void gGraphWindow::Render(int w, int h)
|
|||||||
|
|
||||||
void gGraphWindow::paintGL()
|
void gGraphWindow::paintGL()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_scrX<=0) m_scrX=width();
|
if (m_scrX<=0) m_scrX=width();
|
||||||
if (m_scrY<=0) m_scrY=height();
|
if (m_scrY<=0) m_scrY=height();
|
||||||
if (m_scrX<=0) return;
|
if (m_scrX<=0) return;
|
||||||
if (m_scrY<=0) return;
|
if (m_scrY<=0) return;
|
||||||
|
#ifdef __APPLE__
|
||||||
|
AGLContext aglContext;
|
||||||
|
aglContext=aglGetCurrentContext();
|
||||||
|
GLint swapInt=1;
|
||||||
|
aglSetInteger(aglContext, AGL_SWAP_INTERVAL, &swapInt);
|
||||||
|
#endif
|
||||||
|
|
||||||
//glDisable(GL_DEPTH_TEST);
|
//glDisable(GL_DEPTH_TEST);
|
||||||
Render(m_scrX,m_scrY);
|
Render(m_scrX,m_scrY);
|
||||||
|
26
daily.cpp
26
daily.cpp
@ -8,6 +8,7 @@
|
|||||||
#include "ui_daily.h"
|
#include "ui_daily.h"
|
||||||
|
|
||||||
#include <QTextCharFormat>
|
#include <QTextCharFormat>
|
||||||
|
#include <QPalette>
|
||||||
#include <QTextBlock>
|
#include <QTextBlock>
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include <QSpacerItem>
|
#include <QSpacerItem>
|
||||||
@ -15,6 +16,7 @@
|
|||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
|
#include <QScrollBar>
|
||||||
|
|
||||||
#include "SleepLib/session.h"
|
#include "SleepLib/session.h"
|
||||||
#include "Graphs/graphdata_custom.h"
|
#include "Graphs/graphdata_custom.h"
|
||||||
@ -62,7 +64,6 @@ Daily::Daily(QWidget *parent,QGLWidget * shared, MainWindow *mw)
|
|||||||
layout->addWidget(GraphView,1);
|
layout->addWidget(GraphView,1);
|
||||||
layout->addWidget(scrollbar,0);
|
layout->addWidget(scrollbar,0);
|
||||||
|
|
||||||
|
|
||||||
SF=new gGraph(GraphView,"Event Flags",180);
|
SF=new gGraph(GraphView,"Event Flags",180);
|
||||||
FRW=new gGraph(GraphView,"Flow Rate",180);
|
FRW=new gGraph(GraphView,"Flow Rate",180);
|
||||||
MP=new gGraph(GraphView,"Mask Pressure",180);
|
MP=new gGraph(GraphView,"Mask Pressure",180);
|
||||||
@ -160,15 +161,24 @@ Daily::Daily(QWidget *parent,QGLWidget * shared, MainWindow *mw)
|
|||||||
|
|
||||||
|
|
||||||
/* scrollArea=new MyScrollArea(ui->graphMainArea,this);
|
/* scrollArea=new MyScrollArea(ui->graphMainArea,this);
|
||||||
|
=======
|
||||||
|
scrollArea=new MyScrollArea(ui->graphMainArea,this);
|
||||||
|
QPalette p;
|
||||||
|
p.setColor(QPalette::Window,Qt::white);
|
||||||
|
scrollArea->setPalette(p);
|
||||||
|
scrollArea->setBackgroundRole(QPalette::Window);
|
||||||
|
>>>>>>> 70c348c1e196c10bbd34b1ce73bce9dda7fdbd29
|
||||||
ui->graphLayout->addWidget(scrollArea,1);
|
ui->graphLayout->addWidget(scrollArea,1);
|
||||||
ui->graphLayout->setSpacing(0);
|
ui->graphLayout->setSpacing(0);
|
||||||
ui->graphLayout->setMargin(0);
|
ui->graphLayout->setMargin(0);
|
||||||
ui->graphLayout->setContentsMargins(0,0,0,0);
|
ui->graphLayout->setContentsMargins(0,0,0,0);
|
||||||
scrollArea->setWidgetResizable(true);
|
scrollArea->setWidgetResizable(true);
|
||||||
scrollArea->setAutoFillBackground(false);
|
scrollArea->setAutoFillBackground(true);
|
||||||
|
|
||||||
GraphLayout=new QWidget(scrollArea);
|
GraphLayout=new QWidget(scrollArea);
|
||||||
GraphLayout->setAutoFillBackground(false);
|
GraphLayout->setAutoFillBackground(true);
|
||||||
|
GraphLayout->setPalette(p);
|
||||||
|
GraphLayout->setBackgroundRole(QPalette::Window);
|
||||||
scrollArea->setWidget(GraphLayout);
|
scrollArea->setWidget(GraphLayout);
|
||||||
|
|
||||||
splitter=new QVBoxLayout(GraphLayout);
|
splitter=new QVBoxLayout(GraphLayout);
|
||||||
@ -1123,16 +1133,6 @@ void Daily::on_treeWidget_itemSelectionChanged()
|
|||||||
double st=(d.addSecs(-120)).toMSecsSinceEpoch();
|
double st=(d.addSecs(-120)).toMSecsSinceEpoch();
|
||||||
double et=(d.addSecs(120)).toMSecsSinceEpoch();
|
double et=(d.addSecs(120)).toMSecsSinceEpoch();
|
||||||
GraphView->SetXBounds(st,et);
|
GraphView->SetXBounds(st,et);
|
||||||
/*FRW->SetXBounds(st,et);
|
|
||||||
MP->SetXBounds(st,et);
|
|
||||||
SF->SetXBounds(st,et);
|
|
||||||
PRD->SetXBounds(st,et);
|
|
||||||
LEAK->SetXBounds(st,et);
|
|
||||||
SNORE->SetXBounds(st,et);
|
|
||||||
MV->SetXBounds(st,et);
|
|
||||||
TV->SetXBounds(st,et);
|
|
||||||
RR->SetXBounds(st,et);
|
|
||||||
FLG->SetXBounds(st,et); */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="tabPosition">
|
<property name="tabPosition">
|
||||||
<enum>QTabWidget::North</enum>
|
<enum>QTabWidget::North</enum>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user