void OfflineLocalisationDialog::MakeLayout() { this->setWindowTitle("Offline Localisation"); QVBoxLayout *buttonsLayout = new QVBoxLayout(); QPushButton *openFileButton = new QPushButton("&Open Log..."); connect(openFileButton,SIGNAL(clicked()), this, SLOT(OpenLogFiles())); buttonsLayout->addWidget(openFileButton); QPushButton *runSimulationButton = new QPushButton("&Run simulation"); connect(runSimulationButton,SIGNAL(clicked()), this, SLOT(BeginSimulation())); buttonsLayout->addWidget(runSimulationButton); QPushButton *saveLogButton = new QPushButton("Save &Log..."); saveLogButton->setEnabled(false); connect(m_offline_loc,SIGNAL(SimDataChanged(bool)), saveLogButton, SLOT(setEnabled(bool))); connect(saveLogButton,SIGNAL(clicked()), this, SLOT(SaveAsLocalisationLog())); buttonsLayout->addWidget(saveLogButton); QPushButton *saveReportButton = new QPushButton("Save Report..."); saveReportButton->setEnabled(false); connect(m_offline_loc,SIGNAL(SimDataChanged(bool)), saveReportButton, SLOT(setEnabled(bool))); //connect(runSimulationButton,SIGNAL(pressed()), this, SLOT(BeginSimulation())); buttonsLayout->addWidget(saveReportButton); QVBoxLayout *displayLayout = new QVBoxLayout(); QLabel *fileLabel = new QLabel("Log files"); displayLayout->addWidget(fileLabel); m_fileListDisplay = new QTextBrowser(this); m_fileListDisplay->setWordWrapMode(QTextOption::NoWrap); displayLayout->addWidget(m_fileListDisplay); QHBoxLayout *overallLayout = new QHBoxLayout(); overallLayout->addLayout(buttonsLayout); overallLayout->addLayout(displayLayout,1); m_progressBar = new QProgressDialog("Runing localisation...","Cancel",0, m_offline_loc->NumberOfLogFrames(),this); m_progressBar->setWindowModality(Qt::WindowModal); m_progressBar->setValue(0); m_progressBar->setMinimumDuration(100); connect(m_offline_loc, SIGNAL(updateProgress(int,int)), this, SLOT(DiplayProgress(int,int))); connect(m_offline_loc, SIGNAL(finished()), this, SLOT(CompleteSimulation())); connect(m_progressBar, SIGNAL(canceled()), this, SLOT(CancelProgress())); connect(m_reader, SIGNAL(OpenLogFilesChanged(std::vector<QFileInfo>)), this, SLOT(SetOpenFileList(std::vector<QFileInfo>))); setLayout(overallLayout); }
// ----------------------------------------------------------------------------- // CSmlActiveContactSuiteProgressCallback::~CSmlActiveContactSuiteProgressCallback() // Destructor. // ----------------------------------------------------------------------------- // CSmlActiveContactSuiteProgressCallback::~CSmlActiveContactSuiteProgressCallback() { Cancel(); if ( iRequesting ) { CancelProgress(); } delete iBuf; iBuf = NULL; }