Esempio n. 1
0
ReportTableContig::ReportTableContig(const string &projectPath, const string &tableFilename, int columnFilter)
: ReportTableBase(projectPath, tableFilename)
{
  // set the filter column
  setFilterColumn(columnFilter);
  // define view (cluster list)
  defineView();
  // set sort column
  setIdColumn(0);
}
Esempio n. 2
0
	RelationalCollection::RelationalCollection(QObject *parent):
		QSqlTableModel(parent),
		m_read_only(false),
		m_last_insert_row_id(-1),
		m_add_only_with_fitler(true),
		m_display_mode(CollectionDisplay::All) {

//		setEditStrategy(QSqlTableModel::OnManualSubmit);
		setEditStrategy(QSqlTableModel::OnFieldChange); // Works.

		setIdColumn(0);

		connect(this, SIGNAL(modelReset()), this, SIGNAL(modelChanged()));
		connect(this, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SIGNAL(modelChanged()));
		connect(this, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), this, SIGNAL(modelChanged()));
		connect(this, SIGNAL(rowsInserted(const QModelIndex&, int, int)), this, SIGNAL(modelChanged()));

	}