void UASRawStatusView::showEvent(QShowEvent *event) { Q_UNUSED(event) //Check every 2 seconds to see if we need an update updateTableTimerTick(); m_updateTimer->start(500); m_tableRefreshTimer->start(2000); }
UASRawStatusView::UASRawStatusView(QWidget *parent) : QWidget(parent) { ui.setupUi(this); ui.tableWidget->setColumnCount(2); ui.tableWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); ui.tableWidget->setShowGrid(false); ui.tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); QTimer *timer = new QTimer(this); connect(timer,SIGNAL(timeout()),this,SLOT(updateTableTimerTick())); // FIXME reinstate once fixed. //timer->start(2000); }
UASRawStatusView::UASRawStatusView(QWidget *parent) : QWidget(parent) { m_uas = 0; ui.setupUi(this); ui.tableWidget->setColumnCount(2); ui.tableWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); ui.tableWidget->setShowGrid(false); ui.tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); m_tableRefreshTimer = new QTimer(this); connect(m_tableRefreshTimer,SIGNAL(timeout()),this,SLOT(updateTableTimerTick())); m_updateTimer = new QTimer(this); connect(m_updateTimer,SIGNAL(timeout()),this,SLOT(updateTimerTick())); // FIXME reinstate once fixed. //timer->start(2000); connect(UASManager::instance(),SIGNAL(activeUASSet(UASInterface*)),this,SLOT(activeUASSet(UASInterface*))); activeUASSet(UASManager::instance()->getActiveUAS()); }