Argh.. Git is annoying

This commit is contained in:
Mark Watkins 2011-08-25 16:35:30 +10:00
commit acfcb664e1
3 changed files with 34 additions and 14 deletions

View File

@ -8,6 +8,11 @@
#include <QDebug>
#include <QLabel>
#include <QMouseEvent>
#ifdef __APPLE__
#include <AGL/agl.h>
#endif
#include "SleepLib/profiles.h"
#include "graphwindow.h"
#include "gTitle.h"
@ -806,8 +811,15 @@ void gGraphWindow::initializeGL()
m_scrX=width();
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)
{
m_scrX=w;
@ -868,11 +880,16 @@ void gGraphWindow::Render(int w, int h)
void gGraphWindow::paintGL()
{
if (m_scrX<=0) m_scrX=width();
if (m_scrY<=0) m_scrY=height();
if (m_scrX<=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);
Render(m_scrX,m_scrY);

View File

@ -8,6 +8,7 @@
#include "ui_daily.h"
#include <QTextCharFormat>
#include <QPalette>
#include <QTextBlock>
#include <QColorDialog>
#include <QSpacerItem>
@ -15,6 +16,7 @@
#include <QPixmap>
#include <QMessageBox>
#include <QResizeEvent>
#include <QScrollBar>
#include "SleepLib/session.h"
#include "Graphs/graphdata_custom.h"
@ -62,7 +64,6 @@ Daily::Daily(QWidget *parent,QGLWidget * shared, MainWindow *mw)
layout->addWidget(GraphView,1);
layout->addWidget(scrollbar,0);
SF=new gGraph(GraphView,"Event Flags",180);
FRW=new gGraph(GraphView,"Flow Rate",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);
QPalette p;
p.setColor(QPalette::Window,Qt::white);
scrollArea->setPalette(p);
scrollArea->setBackgroundRole(QPalette::Window);
>>>>>>> 70c348c1e196c10bbd34b1ce73bce9dda7fdbd29
ui->graphLayout->addWidget(scrollArea,1);
ui->graphLayout->setSpacing(0);
ui->graphLayout->setMargin(0);
ui->graphLayout->setContentsMargins(0,0,0,0);
scrollArea->setWidgetResizable(true);
scrollArea->setAutoFillBackground(false);
scrollArea->setAutoFillBackground(true);
GraphLayout=new QWidget(scrollArea);
GraphLayout->setAutoFillBackground(false);
GraphLayout->setAutoFillBackground(true);
GraphLayout->setPalette(p);
GraphLayout->setBackgroundRole(QPalette::Window);
scrollArea->setWidget(GraphLayout);
splitter=new QVBoxLayout(GraphLayout);
@ -1123,16 +1133,6 @@ void Daily::on_treeWidget_itemSelectionChanged()
double st=(d.addSecs(-120)).toMSecsSinceEpoch();
double et=(d.addSecs(120)).toMSecsSinceEpoch();
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); */
}
}

View File

@ -73,6 +73,9 @@
<height>16777215</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="tabPosition">
<enum>QTabWidget::North</enum>
</property>