add method to easily remove fields from table

This commit is contained in:
Peinthor Rene
2013-03-22 15:51:44 +01:00
parent f4187521ee
commit f75b361581
2 changed files with 12 additions and 0 deletions

View File

@@ -68,6 +68,17 @@ void Table::addField(const FieldPtr& f)
m_fields.append(FieldPtr(f));
}
bool Table::removeField(const QString& sFieldName)
{
int index = findField(sFieldName);
if( index != -1)
{
m_fields.remove(index);
return true;
}
return false;
}
void Table::setFields(const FieldVector &fields)
{
clear();