Changeset 9859cac


Ignore:
Timestamp:
01/26/10 10:58:46 (12 years ago)
Author:
hanzes <hanzes@…>
Branches:
master, qt5
Children:
01df23f
Parents:
893e6a9
Message:

NowTreeView? refresh modified

Location:
src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r893e6a9 r9859cac  
    1515#include <QDialog>
    1616#include <QMessageBox>
     17#include <QTimer>
    1718#include "ui_about.h"
    1819#include "eventdialog.h"
     
    9596        nowTreeView->setModel(new EventModel());
    9697        nowTreeView->setItemDelegate(new Delegate(nowTreeView));
     98
     99        // NOW View refresh timer
     100    QTimer *timer = new QTimer( this );
     101    connect( timer, SIGNAL(timeout()), SLOT(timerUpdateNowView()) );
     102    timer->start( 30000); // 30 seconds timer
    97103
    98104    // ROOMS View
     
    384390}
    385391
     392void MainWindow::timerUpdateNowView()
     393{
     394        QWidget * pCurrentWidget = tabWidget->widget(tabWidget->currentIndex());
     395
     396        if( pCurrentWidget != NULL )
     397        {
     398                if( pCurrentWidget == tab )
     399                    updateNowView();
     400        }
     401}
  • src/gui/mainwindow.h

    r893e6a9 r9859cac  
    3333    void tabHasChanged(int aIndex);
    3434    void eventHasChanged(int aEventId);
     35    void timerUpdateNowView();
    3536private:
    3637    SqlEngine *mSqlEngine;
Note: See TracChangeset for help on using the changeset viewer.