Implementation of setMultipleRows for custom tables.

git-svn-id: http://yate.null.ro/svn/yate/trunk@2243 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-09-29 09:20:59 +00:00
parent 3f42f160c2
commit 2df3a30388
2 changed files with 17 additions and 0 deletions

View File

@ -1022,6 +1022,21 @@ bool QtWindow::addTableRow(const String& name, const String& item,
return true;
}
// Insert or update multiple rows in a single operation
bool QtWindow::setMultipleRows(const String& name, const NamedList& data, const String& prefix)
{
XDebug(QtDriver::self(),DebugAll,"QtWindow(%s) setMultipleRows('%s',%p,'%s') [%p]",
m_id.c_str(),name.c_str(),&data,prefix.c_str(),this);
TableWidget tbl(this,name);
if (!tbl.valid())
return false;
QtTable* custom = tbl.customTable();
return custom && custom->setMultipleRows(data,prefix);
}
// Insert a row into a table owned by this window
bool QtWindow::insertTableRow(const String& name, const String& item,
const String& before, const NamedList* data)

View File

@ -289,6 +289,8 @@ public:
virtual bool addTableRow(const String& name, const String& item, const NamedList* data = 0, bool atStart = false);
virtual bool setMultipleRows(const String& name, const NamedList& data, const String& prefix);
/**
* Insert a row into a table owned by this window
* @param name Name of the element