Пример #1
0
void SettersGettersModel::GetValue(wxVariant& variant, const wxDataViewItem& item, unsigned int col) const
{
    SettersGettersModel_Item* node = reinterpret_cast<SettersGettersModel_Item*>(item.m_pItem);
    if ( node && node->GetData().size() > col ) {
        variant = node->GetData().at(col);
    }
}
Пример #2
0
bool SettersGettersModel::SetValue(const wxVariant& variant, const wxDataViewItem& item, unsigned int col)
{
    SettersGettersModel_Item* node = reinterpret_cast<SettersGettersModel_Item*>(item.m_pItem);
    if ( node && node->GetData().size() > col ) {
        node->GetData().at(col) = variant;
    }
    return true;
}
Пример #3
0
wxVector<wxVariant> SettersGettersModel::GetItemColumnsData(const wxDataViewItem& item) const
{
    if ( !item.IsOk() )
        return wxVector<wxVariant>();

    SettersGettersModel_Item* node = reinterpret_cast<SettersGettersModel_Item*>(item.GetID());
    if ( !node ) {
        return wxVector<wxVariant>();
    }
    return node->GetData();
}