MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { qRegisterMetaType<StateForTimestep>("StateForTimestep&"); ui->setupUi(this); modelController = new FieldModelController(); udpServer = new UdpServer(); modeManager = new ModeManager(); recorder = new Recorder(); player = new RecordPlayer(); connect(udpServer, SIGNAL(messageRecieved(QString)),modelController, SLOT(updateState(QString))); connect(modelController, SIGNAL(updateScene(StateForTimestep&)), modeManager, SLOT(on_updateScene_live(StateForTimestep&))); connect(modeManager, SIGNAL(updateScene(StateForTimestep&)), ui->rosoFieldWdgt, SLOT(on_updateScene(StateForTimestep&))); connect(modelController,SIGNAL(updateScene(StateForTimestep&)), recorder, SLOT(on_updateScene(StateForTimestep&))); connect(recorder, SIGNAL(recordsUpdated()), this, SLOT(on_recordsUpdated())); connect(player,SIGNAL(updateScene(StateForTimestep&)), modeManager, SLOT(on_updateScene_replay(StateForTimestep&))); connect(player, SIGNAL(recordPlayingFinished()),this,SLOT(on_player_finished())); ui->record_ListView->setModel(&recordListModel); on_liveMode_radioButton_toggled(true); ui->record_ListView->setSelectionMode(QListView::SingleSelection); }
void QTaskIO::checkUpdated(const QUniqueId &) { emit recordsUpdated(); }
void QTaskIO::checkRemoved(const QList<QUniqueId> &) { emit recordsUpdated(); }
void QAppointmentIO::checkUpdated(const QUniqueId &id) { Q_UNUSED(id); emit recordsUpdated(); }
void QAppointmentIO::checkRemoved(const QList<QUniqueId> &ids) { Q_UNUSED(ids); emit recordsUpdated(); }
void QAppointmentIO::ensureDataCurrent(bool force) { Q_UNUSED(force); emit recordsUpdated(); }