/* Pass in a schema name and a table name. If schema name is blank, it will be ignored. If there is a table name to set, data widget mappings will be set as well. */ void formControl::setTable(QString s, QString t) { if (t.length()) { QString tableName=""; if (s.length()) tableName=s + "."; tableName+=t; if (_model.tableName() != tableName) { _model.setTable(tableName); setDataWidgetMapper(&_model); _search->setEnabled(true); _searchText->setEnabled(true); } } else { _search->setEnabled(false); _searchText->setEnabled(false); } }
/* Pass in a schema name and a table name. If schema name is blank, it will be ignored. If there is a table name to set, data widget mappings will be set as well. */ void ScreenControl::setTable(QString s, QString t) { if (t.length()) { QString tablename=""; if (s.length()) tablename=s + "."; tablename+=t; if (_model->tableName() != tablename) { _model->setTable(tablename,_keyColumns); setDataWidgetMapper(_model); _search->setEnabled(true); _searchText->setEnabled(true); emit newModel(_model); } } else { _search->setEnabled(false); _searchText->setEnabled(false); } }