From 030c165ed0d31f6f907c1acecfd5c43a51846b71 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Tue, 20 Dec 2011 15:51:22 +1000 Subject: [PATCH] Slightly more pointless fun --- Graphs/gGraphView.cpp | 149 +++++++++++++++++++++++++++++++----------- Graphs/gGraphView.h | 3 + 2 files changed, 114 insertions(+), 38 deletions(-) diff --git a/Graphs/gGraphView.cpp b/Graphs/gGraphView.cpp index bb9a93ee..a33ff5fe 100644 --- a/Graphs/gGraphView.cpp +++ b/Graphs/gGraphView.cpp @@ -1824,7 +1824,26 @@ gGraphView::gGraphView(QWidget *parent, gGraphView * shared) : //redrawtimer->setInterval(80); //redrawtimer->start(); connect(redrawtimer,SIGNAL(timeout()),SLOT(repaint())); + QImage *image=new QImage(":/icons/oximeter.png"); + images.push_back(image); + + image=new QImage(":/docs/sheep.png"); + images.push_back(image); + + image=new QImage(":/icons/sdcard.png"); + images.push_back(image); + + image=new QImage(":/icons/preferences.png"); + images.push_back(image); + + image=new QImage(":/icons/overview.png"); + images.push_back(image); + + image=new QImage(":/icons/edit-find.png"); + images.push_back(image); + } + gGraphView::~gGraphView() { #ifdef ENABLE_THREADED_DRAWING @@ -1849,6 +1868,9 @@ gGraphView::~gGraphView() disconnect(timer,0,0,0); timer->stop(); delete timer; + for (int i=0;iisVisible()) + renderSomethingFun(); } @@ -2360,7 +2433,7 @@ void gGraphView::paintGL() //glDisable(GL_TEXTURE_2D); //glDisable(GL_DEPTH_TEST); if (something_fun && !numgraphs && this->isVisible()) { - renderSomethingFun(); + // renderSomethingFun(); redrawtimer->setInterval(25); redrawtimer->setSingleShot(true); diff --git a/Graphs/gGraphView.h b/Graphs/gGraphView.h index 2f118e38..31ccd989 100644 --- a/Graphs/gGraphView.h +++ b/Graphs/gGraphView.h @@ -904,6 +904,9 @@ protected: qint64 m_minx,m_maxx; float print_scaleX,print_scaleY; + + QVector images; + QVector texid; signals: