Changeset 222 in flair-src for trunk/tools/FlairGCS/src/DataRemote.cpp
- Timestamp:
- Feb 26, 2018, 9:36:16 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/DataRemote.cpp
r67 r222 29 29 menu->addSeparator(); 30 30 31 b= menu->addAction("auto refresh");32 b->setCheckable(true);33 b->setChecked(auto_refresh);31 autoRefresh = menu->addAction("auto refresh"); 32 autoRefresh->setCheckable(true); 33 autoRefresh->setChecked(auto_refresh); 34 34 35 c= menu->addAction(QString("set refresh rate (%1ms)")35 setRefreshRate = menu->addAction(QString("set refresh rate (%1ms)") 36 36 .arg((uint16_t)(qRound(refresh_rate * 1000)))); 37 c->setEnabled(auto_refresh);38 menu->addSeparator();37 setRefreshRate->setEnabled(auto_refresh); 38 /* menu->addSeparator(); 39 39 40 d = menu->addAction("log"); 41 d->setCheckable(true); 42 d->setChecked(is_logging); 40 log = menu->addAction("log"); 41 log->setCheckable(true); 42 log->setChecked(is_logging); 43 */ 43 44 } 44 45 45 46 QAction *DataRemote::execmenu(QWidget *parent, QMenu *menu, QPoint point) { 46 QAction * z;47 QAction *action; 47 48 48 z= menu->exec(point);49 action = menu->exec(point); 49 50 50 51 // auto_refresh=b->isChecked(); 51 52 52 if ( z == b) {53 SendPeriod(RefreshRate_ms(), b->isChecked());53 if (action == autoRefresh) { 54 SendPeriod(RefreshRate_ms(), autoRefresh->isChecked()); 54 55 } 55 56 56 if ( z == c) {57 if (action == setRefreshRate) { 57 58 bool ok; 58 59 // uint16_t time = QInputDialog::getInt(this, QString("Set refresh rate … … 64 65 if (ok == true && time != qRound(refresh_rate * 1000)) { 65 66 // refresh_rate=time/1000.; 66 SendPeriod(time, b->isChecked());67 SendPeriod(time, autoRefresh->isChecked()); 67 68 } 68 69 } 69 70 return z;70 71 return action; 71 72 } 72 73
Note:
See TracChangeset
for help on using the changeset viewer.