X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmainwindow.cpp;h=2f7504b7d929fbab4702f5afed843475af57b38b;hb=b75769f2af8f3245ff1bc628d9b3a5aecd030967;hp=56c4b6962fbddf6ed1c97429d11978e2fe7d3027;hpb=5f02fb58a131038e91fa1250ae4865e27bcb94a2;p=qcpufreq diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 56c4b69..2f7504b 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -47,11 +47,17 @@ MainWindow::MainWindow(QWidget *parent) : scene = new QGraphicsScene(); orientationChanged(); + //create the refresh timer + refreshTimer = new QTimer(); + //refresh UI every 10 seconds + refreshTimer->start( 10000 ); + //connect signals and slots connect( ui->actionAbout, SIGNAL(triggered()), this, SLOT(about()) ); connect( ui->freq_adjust, SIGNAL(valueChanged(int)), this, SLOT(adjustFreq()) ); connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged())); connect( ui->sr_btn, SIGNAL(clicked()), this, SLOT(setSmartReflex()) ); + connect(refreshTimer, SIGNAL(timeout()), this, SLOT(refresh())); }