TrackerOutputViewer::TrackerOutputViewer(QWidget *parent) : QWidget(parent), ui(new Ui::TrackerOutputViewer) { ui->setupUi(this); connect(this->ui->tracker_output_sync_to_session, SIGNAL(toggled(bool)), this, SLOT(sync_to_dialog(bool))); connect(this->ui->tracker_output_session_id_combobox, SIGNAL(currentIndexChanged(QString)), this, SLOT(updateTreeView(QString))); connect(this->ui->tracker_output_prev_session, SIGNAL(clicked()), this, SLOT(prev_output())); connect(this->ui->tracker_output_next_session, SIGNAL(clicked()), this, SLOT(next_output())); // Disable the close, minimize, maximize buttons QWidget::setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint); }
void backTracking (const string& s, vector<vector<int> >&prev, int index, vector<string>& output){ for (int i=0; i<prev[index].size(); ++i){ int prev_index = prev[index][i]; vector<string> prev_output(0); if (prev_index != 0) backTracking (s, prev, prev_index, prev_output); else prev_output = vector<string> (1, ""); for (int j=0; j<prev_output.size(); ++j){ if (prev_index != 0) output.push_back(prev_output[j]+" "+s.substr(prev_index,index-prev_index)); else output.push_back(s.substr(prev_index,index-prev_index)); } } }