/* Resize rows and columns */
tableWidget->resizeColumnsToContents();
tableWidget->resizeRowsToContents();
+
+ /* make read only */
+ int rcnt = tableWidget->rowCount();
+ int ccnt = tableWidget->columnCount();
+ for(int r=0; r < rcnt; r++) {
+ for(int c=0; c < ccnt; c++) {
+ QTableWidgetItem* item = tableWidget->item(r, c);
+ item->setFlags(Qt::ItemFlags(item->flags() & (~Qt::ItemIsEditable)));
+ }
+ }
}
/*
/* Resize rows and columns */
tableWidget->resizeColumnsToContents();
tableWidget->resizeRowsToContents();
+
+ /* make read only */
+ int rcnt = tableWidget->rowCount();
+ int ccnt = tableWidget->columnCount();
+ for(int r=0; r < rcnt; r++) {
+ for(int c=0; c < ccnt; c++) {
+ QTableWidgetItem* item = tableWidget->item(r, c);
+ item->setFlags(Qt::ItemFlags(item->flags() & (~Qt::ItemIsEditable)));
+ }
+ }
}
/*
tr("The Jobs query returned no results.\n"
"Press OK to continue?"), QMessageBox::Ok );
}
+
+ /* make read only */
+ int rcnt = mp_tableWidget->rowCount();
+ int ccnt = mp_tableWidget->columnCount();
+ for(int r=0; r < rcnt; r++) {
+ for(int c=0; c < ccnt; c++) {
+ QTableWidgetItem* item = mp_tableWidget->item(r, c);
+ item->setFlags(Qt::ItemFlags(item->flags() & (~Qt::ItemIsEditable)));
+ }
+ }
}
void JobList::prepareFilterWidgets()
/* Resize rows and columns */
tableWidget->resizeColumnsToContents();
tableWidget->resizeRowsToContents();
+
+ /* make read only */
+ int rcnt = tableWidget->rowCount();
+ int ccnt = tableWidget->columnCount();
+ for(int r=0; r < rcnt; r++) {
+ for(int c=0; c < ccnt; c++) {
+ QTableWidgetItem* item = tableWidget->item(r, c);
+ item->setFlags(Qt::ItemFlags(item->flags() & (~Qt::ItemIsEditable)));
+ }
+ }
}
/*
(void)index;
job_defs.job_name = jobCombo->currentText();
- if (m_console->get_job_defaults(job_defs)) {
+ if (m_console->get_job_defaults(m_conn, job_defs)) {
filesetCombo->setCurrentIndex(filesetCombo->findText(job_defs.fileset_name, Qt::MatchExactly));
clientCombo->setCurrentIndex(clientCombo->findText(job_defs.client_name, Qt::MatchExactly));
poolCombo->setCurrentIndex(poolCombo->findText(tr("Any"), Qt::MatchExactly));
" AND JobId=\'" + jobId + "\'";
if (mainWin->m_sqlDebug) { Pmsg1(000, "query = %s\n", query.toUtf8().data()); }
QStringList results;
- if (m_console->sql_cmd(query, results)) {
+ if (m_console->sql_cmd(m_conn, query, results)) {
QString field;
/* Iterate through the lines of results, there should only be one. */