您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxDataViewItem函数代码示例

51自学网 2021-06-03 10:09:06
  C++
这篇教程C++ wxDataViewItem函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wxDataViewItem函数的典型用法代码示例。如果您正苦于以下问题:C++ wxDataViewItem函数的具体用法?C++ wxDataViewItem怎么用?C++ wxDataViewItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wxDataViewItem函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: wxDataViewItem

wxDataViewItem vvStampsModel::AddItem(	const wxString& sName,	unsigned int    uCount,	bool            bChecked	){	// check if this item already exists	stlDataItemMap::iterator it = this->mcDataItems.find(sName);	if (it != this->mcDataItems.end())	{		return wxDataViewItem();	}	// add the item	DataItem cItem;	cItem.sName    = sName;	cItem.uCount   = uCount;	cItem.bChecked = bChecked;	it = this->mcDataItems.insert(it, stlDataItemMap::value_type(sName, cItem));		// create a wxDataViewItem from it	wxDataViewItem cViewItem = this->ConvertDataItem(it);	// notify anyone that cares about the new item	this->ItemAdded(wxDataViewItem(), cViewItem);	// return the new item	return cViewItem;}
开发者ID:refaqtor,项目名称:sourcegear_veracity_clone,代码行数:29,


示例2: wxDataViewItem

unsigned int MyMusicTreeModel::GetChildren( const wxDataViewItem &parent,                                            wxDataViewItemArray &array ) const{    MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) parent.GetID();    if (!node)    {        array.Add( wxDataViewItem( (void*) m_root ) );        return 1;    }    if (node == m_classical)    {        MyMusicTreeModel *model = (MyMusicTreeModel*)(const MyMusicTreeModel*) this;        model->m_classicalMusicIsKnownToControl = true;    }    if (node->GetChildCount() == 0)    {        return 0;    }    unsigned int count = node->GetChildren().GetCount();    for (unsigned int pos = 0; pos < count; pos++)    {        MyMusicTreeModelNode *child = node->GetChildren().Item( pos );        array.Add( wxDataViewItem( (void*) child ) );    }    return count;}
开发者ID:EmptyChaos,项目名称:wxWidgets,代码行数:30,


示例3: wxDataViewItem

wxDataViewItem FunctionsModel::GetParent(const wxDataViewItem& item) const{    FunctionsModel_Item* node = reinterpret_cast<FunctionsModel_Item*>(item.m_pItem);    if ( node ) {        return wxDataViewItem(node->GetParent());    }    return wxDataViewItem(NULL);}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:8,


示例4: wxDataViewItem

wxDataViewItem CScoptViewResultsModel::GetParent(const wxDataViewItem& item) const{    CScoptViewResultsModel_Item* node = reinterpret_cast<CScoptViewResultsModel_Item*>(item.m_pItem);    if ( node ) {        return wxDataViewItem(node->GetParent());    }    return wxDataViewItem(NULL);}
开发者ID:HTshandou,项目名称:codelite,代码行数:8,


示例5: wxDataViewItem

wxDataViewItem StaleFilesModel::GetParent(const wxDataViewItem& item) const{    StaleFilesModel_Item* node = reinterpret_cast<StaleFilesModel_Item*>(item.m_pItem);    if ( node ) {        return wxDataViewItem(node->GetParent());    }    return wxDataViewItem(NULL);}
开发者ID:HTshandou,项目名称:codelite,代码行数:8,


示例6: if

void MemCheckOutputView::ShowPageView(size_t page){    // CL_DEBUG1(PLUGIN_PREFIX("MemCheckOutputView::ShowPage()"));    if(page < 1)        m_currentPage = 1;    else if(page > m_pageMax)        m_currentPage = m_pageMax;    else        m_currentPage = page;    if(m_currentPage == 0)        m_textCtrlPageNumber->Clear();    else        pageValidator.TransferToWindow(); // it sets m_textCtrlPageNumber    m_currentPageIsEmptyView = true;    m_currentItem = wxDataViewItem(0);    m_onValueChangedLocked = false;    m_markedErrorsCount = 0;    m_dataViewCtrlErrorsModel->Clear();    if(m_totalErrorsView == 0) return;    ErrorList& errorList = m_plugin->GetProcessor()->GetErrors();    long iStart = (long)(m_currentPage - 1) * m_plugin->GetSettings()->GetResultPageSize();    long iStop =        (long)std::min(m_totalErrorsView - 1, m_currentPage * m_plugin->GetSettings()->GetResultPageSize() - 1);    // CL_DEBUG1(PLUGIN_PREFIX("start - stop = %lu - %lu", iStart, iStop));    m_currentPageIsEmptyView = (iStop - iStart) < 0;    // this should never happen if m_totalErrorsView > 0, but...    if(m_currentPageIsEmptyView) return;    wxWindowDisabler disableAll;    wxBusyInfo wait(wxT(BUSY_MESSAGE));    m_mgr->GetTheApp()->Yield();    unsigned int flags = 0;    if(m_plugin->GetSettings()->GetOmitNonWorkspace()) flags |= MC_IT_OMIT_NONWORKSPACE;    if(m_plugin->GetSettings()->GetOmitDuplications()) flags |= MC_IT_OMIT_DUPLICATIONS;    if(m_plugin->GetSettings()->GetOmitSuppressed()) flags |= MC_IT_OMIT_SUPPRESSED;    size_t i = 0;    MemCheckIterTools::ErrorListIterator it = MemCheckIterTools::Factory(errorList, m_workspacePath, flags);    for(; i < iStart && it != errorList.end(); ++i, ++it)        ; // skipping item before start    // CL_DEBUG1(PLUGIN_PREFIX("items skiped"));    m_mgr->GetTheApp()->Yield();    for(; i <= iStop; ++i, ++it) {        if(it == errorList.end()) {            CL_WARNING(PLUGIN_PREFIX("Some items skiped. Total errors count mismatches the iterator."));            break;        }        AddTree(wxDataViewItem(0), *it); // CL_DEBUG1(PLUGIN_PREFIX("adding %lu", i));        if(!(i % WAIT_UPDATE_PER_ITEMS)) m_mgr->GetTheApp()->Yield();    }}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:57,


示例7: wxDataViewItem

wxDataViewItem GNC::GUI::AcquisitionTableModel::GetParent( const wxDataViewItem &item ) const{        if (!item.IsOk()) {                return wxDataViewItem(0);        }        //if it's a study...        AcquisitionNode* pNode = (AcquisitionNode*)(item.GetID());        return wxDataViewItem( (void*) pNode->GetParent() );}
开发者ID:151706061,项目名称:ginkgocadx,代码行数:9,


示例8: wxDataViewItem

wxDataViewItem TreeListModel::GetParent(const wxDataViewItem& item) const{    if ( IsEmpty() ) {        return wxDataViewItem(NULL);    }        TreeListModel_Item* node = reinterpret_cast<TreeListModel_Item*>(item.m_pItem);    if ( node ) {        return wxDataViewItem(node->GetParent());    }    return wxDataViewItem(NULL);}
开发者ID:wuqiong4945,项目名称:memu,代码行数:12,


示例9: wxDataViewItem

wxDataViewItem LLDBBreakpointModel::GetParent(const wxDataViewItem& item) const{    if ( IsEmpty() ) {        return wxDataViewItem(NULL);    }        LLDBBreakpointModel_Item* node = reinterpret_cast<LLDBBreakpointModel_Item*>(item.m_pItem);    if ( node ) {        return wxDataViewItem(node->GetParent());    }    return wxDataViewItem(NULL);}
开发者ID:05storm26,项目名称:codelite,代码行数:12,


示例10: wxDataViewItem

wxDataViewItem MemCheckDVCErrorsModel::GetParent(const wxDataViewItem& item) const{    if ( IsEmpty() ) {        return wxDataViewItem(NULL);    }        MemCheckDVCErrorsModel_Item* node = reinterpret_cast<MemCheckDVCErrorsModel_Item*>(item.m_pItem);    if ( node ) {        return wxDataViewItem(node->GetParent());    }    return wxDataViewItem(NULL);}
开发者ID:05storm26,项目名称:codelite,代码行数:12,


示例11: GetParent

	virtual wxDataViewItem GetParent(const wxDataViewItem &item) const	{		// the invisible root node has no parent		if (!item.IsOk())			return wxDataViewItem(0);		ReplayProvider* provider = (ReplayProvider*)item.GetID();		if (provider == m_root)			return wxDataViewItem(0);		return wxDataViewItem((void*)provider->GetParent());	}
开发者ID:TcT2k,项目名称:RLReplayManager,代码行数:13,


示例12: CancelCommand

void GNC::GUI::AcquisitionTableModel::ClearResults(){        CancelCommand();        wxDataViewItemArray toDeleteList;        for (TMapIndex::iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {                toDeleteList.push_back(wxDataViewItem((*it).second));        }        //then delete studies Nodes...        ItemsDeleted(wxDataViewItem(0), toDeleteList);        //delete all and reload again...        ClearStudyMap();}
开发者ID:151706061,项目名称:ginkgocadx,代码行数:14,


示例13: wxDataViewItem

wxDataViewItem MyMusicTreeModel::GetParent( const wxDataViewItem &item ) const{    // the invisible root node has no parent    if (!item.IsOk())        return wxDataViewItem(0);    MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) item.GetID();    // "MyMusic" also has no parent    if (node == m_root)        return wxDataViewItem(0);    return wxDataViewItem( (void*) node->GetParent() );}
开发者ID:euler0,项目名称:Helium,代码行数:14,


示例14: wxDataViewItem

void DIALOG_LIB_EDIT_PIN_TABLE::DataViewModel::Refresh(){#ifdef REASSOCIATE_HACK    m_Widget->AssociateModel( this );#else    std::queue<wxDataViewItem> todo;    todo.push( wxDataViewItem() );    while( !todo.empty() )    {        wxDataViewItem current = todo.front();        wxDataViewItemArray items;        GetChildren( current, items );        ItemsAdded( current, items );        for( wxDataViewItemArray::const_iterator i = items.begin(); i != items.end(); ++i )        {            if( IsContainer( *i ) )                todo.push( *i );        }        todo.pop();    }#endif}
开发者ID:BTR1,项目名称:kicad-source-mirror,代码行数:27,


示例15: wxDataViewTreeCtrl

/* ActionSpecialTreeView::ActionSpecialTreeView * ActionSpecialTreeView class constructor *******************************************************************/ActionSpecialTreeView::ActionSpecialTreeView(wxWindow* parent) : wxDataViewTreeCtrl(parent, -1){	parent_dialog = NULL;	// Create root item	root = wxDataViewItem(0);	// Add 'None'	item_none = AppendItem(root, "0: None");	// Populate tree	vector<as_t> specials = theGameConfiguration->allActionSpecials();	std::sort(specials.begin(), specials.end());	for (unsigned a = 0; a < specials.size(); a++)	{		AppendItem(getGroup(specials[a].special->getGroup()),		           S_FMT("%d: %s", specials[a].number, specials[a].special->getName()), -1);	}	// Bind events	Bind(wxEVT_DATAVIEW_ITEM_START_EDITING, &ActionSpecialTreeView::onItemEdit, this);	Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, &ActionSpecialTreeView::onItemActivated, this);	Expand(root);	SetMinSize(wxSize(-1, 200));}
开发者ID:jonrimmer,项目名称:SLADE,代码行数:29,


示例16: WXUNUSED

wxDataViewItem vvStampsModel::GetParent(	const wxDataViewItem& WXUNUSED(cItem)	) const{	// every item's parent is the invisible root	return wxDataViewItem(NULL);}
开发者ID:refaqtor,项目名称:sourcegear_veracity_clone,代码行数:7,


示例17: SpecialPresetTreeView

	SpecialPresetTreeView(wxWindow* parent) :		wxDataViewTreeCtrl{ parent, -1 },		root_{ wxDataViewItem(nullptr) },		parent_dialog_{ nullptr }	{		// Computing the minimum width of the tree is slightly complicated, since		// wx doesn't expose it to us directly		wxClientDC dc(this);		dc.SetFont(GetFont());		wxSize textsize;		// Populate tree		addPresets(Game::customSpecialPresets(), textsize, dc);				// User custom presets		addPresets(Game::configuration().specialPresets(), textsize, dc);	// From game configuration		wxDataViewCtrl::Expand(root_);		// Bind events		Bind(wxEVT_DATAVIEW_ITEM_START_EDITING, [&](wxDataViewEvent& e) { e.Veto(); });		Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, [&](wxDataViewEvent& e)		{			if (GetChildCount(e.GetItem()) > 0)			{				// Expand if group node				Expand(e.GetItem());				e.Skip();			}			else if (parent_dialog_)				parent_dialog_->EndModal(wxID_OK);		});		// 64 is an arbitrary fudge factor -- should be at least the width of a		// scrollbar plus the expand icons plus any extra padding		int min_width = textsize.GetWidth() + GetIndent() + UI::scalePx(64);		wxWindowBase::SetMinSize(wxSize(min_width, UI::scalePx(200)));	}
开发者ID:Talon1024,项目名称:SLADE,代码行数:35,


示例18: AddFunctionsImplBaseDlg

AddFunctionsImpDlg::AddFunctionsImpDlg(wxWindow* parent, const TagEntryPtrVector_t &tags, const wxString &targetFile)    : AddFunctionsImplBaseDlg(parent){    unsigned int colCount = m_dataviewModel->GetColCount();    m_dataviewModel = new MyAddFunctionsModel();    m_dataviewModel->SetColCount( colCount );    m_dataview->AssociateModel( m_dataviewModel.get() );    m_tags.insert(m_tags.end(), tags.begin(), tags.end());    for(size_t i=0; i<m_tags.size(); ++i) {        wxVector<wxVariant> cols;        cols.push_back(true);        cols.push_back( m_tags.at(i)->GetDisplayName() );        // keep the implementation as the client data        wxString body;        TagEntryPtr tag = m_tags.at(i);        tag->SetSignature( TagsManagerST::Get()->NormalizeFunctionSig( tag->GetSignature(), Normalize_Func_Name ) );        body << TagsManagerST::Get()->FormatFunction(tag, FunctionFormat_Impl);        body << wxT("/n");        m_dataviewModel->AppendItem( wxDataViewItem(0), cols, new wxStringClientData(body) );    }    m_filePicker->SetPath( targetFile );    WindowAttrManager::Load(this, "AddFunctionsImpDlg", NULL);}
开发者ID:HTshandou,项目名称:codelite,代码行数:26,


示例19: GetItemData

unsigned int vvStampsControl::GetItemData(	stlItemDataList* pItems,	vvNullable<bool> nbChecked	) const{	if (this->mpDataModel == NULL)	{		return 0u;	}	// run through all the items in the control	unsigned int uCount = 0u;	wxDataViewItemArray cChildren;	this->mpDataModel->GetChildren(wxDataViewItem(), cChildren);	for (wxDataViewItemArray::iterator it = cChildren.begin(); it != cChildren.end(); ++it)	{		// get the item's data		ItemData cData;		this->GetItemData(*it, cData);		// check if the item matches our criteria		if (nbChecked.IsNull() || nbChecked.GetValue() == cData.bChecked)		{			if (pItems != NULL)			{				pItems->push_back(cData);			}			++uCount;		}	}	return uCount;}
开发者ID:refaqtor,项目名称:sourcegear_veracity_clone,代码行数:33,


示例20: GetColumnByName

void MemCheckOutputView::OnMarkedErrorsToClip(wxCommandEvent& event){    wxDataViewEvent* menuEvent = dynamic_cast<wxDataViewEvent*>(event.GetEventUserData());    if(!menuEvent) return;    wxString text;    wxVariant variant;    wxDataViewItemArray items;    m_dataViewCtrlErrorsModel->GetChildren(wxDataViewItem(0), items);    int supColumn = GetColumnByName(_("Suppress"));    if(supColumn == wxNOT_FOUND) {        return;    }    MemCheckErrorReferrer* errorRef;    for(wxDataViewItemArray::iterator it = items.begin(); it != items.end(); ++it) {        m_dataViewCtrlErrorsModel->GetValue(variant, *it, supColumn);        if(variant.GetBool()) {            errorRef = dynamic_cast<MemCheckErrorReferrer*>(m_dataViewCtrlErrorsModel->GetClientObject(*it));            text.Append(errorRef->Get().toString());            text.Append(wxT("/n/n"));        }    }    text.Trim();    if(wxTheClipboard->Open()) {        wxTheClipboard->SetData(new wxTextDataObject(text));        wxTheClipboard->Close();    }}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:29,


示例21: findParentNode

wxDataViewItem GraphTreeModel::findParentIter(const scene::INodePtr& node) const{	// Find the parent's GraphTreeNode	const GraphTreeNodePtr& nodePtr = findParentNode(node);	// Return an empty iterator if not found	return (nodePtr != NULL) ? nodePtr->getIter() : wxDataViewItem();}
开发者ID:nbohr1more,项目名称:DarkRadiant,代码行数:8,


示例22: GetChildren

    virtual unsigned int    GetChildren( wxDataViewItemArray& aItems ) const    {        /// @todo C++11        for( std::list<Pin*>::const_iterator i = m_Members.begin(); i != m_Members.end(); ++i )            aItems.push_back( wxDataViewItem( *i ) );        return aItems.size();    }
开发者ID:BTR1,项目名称:kicad-source-mirror,代码行数:8,


示例23: ToDVI

    wxDataViewItem ToDVI(Node* node) const    {        // Our root item must be represented as NULL at wxDVC level to map to        // its own invisible root.        if ( !node->GetParent() )            return wxDataViewItem();        return ToNonRootDVI(node);    }
开发者ID:iokto,项目名称:newton-dynamics,代码行数:9,


示例24: DoInsertItem

wxDataViewItem TreeListModel::InsertItem(const wxDataViewItem& insertBeforeMe, const wxVector<wxVariant>& data, wxClientData *clientData){    wxDataViewItem ch = DoInsertItem(insertBeforeMe, data, false, clientData);    if ( ch.IsOk() ) {        TreeListModel_Item* node = reinterpret_cast<TreeListModel_Item*>(ch.GetID());        ItemAdded(wxDataViewItem(node->GetParent()), ch);    }    return ch;}
开发者ID:wuqiong4945,项目名称:memu,代码行数:9,


示例25: OnUnmarkAllErrors

void MemCheckOutputView::OnUnmarkAllErrors(wxCommandEvent& event){    wxDataViewItemArray items;    m_dataViewCtrlErrorsModel->GetChildren(wxDataViewItem(0), items);    for(wxDataViewItemArray::iterator it = items.begin(); it != items.end(); ++it) {        MarkTree(*it, false);    }}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:9,


示例26: GetCustomRendererPtr

void wxDataViewCtrl::FinishCustomItemEditing(){  if (GetCustomRendererItem().IsOk())  {    GetCustomRendererPtr()->FinishEditing();    SetCustomRendererItem(wxDataViewItem());    SetCustomRendererPtr (NULL);  }}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:9,


示例27: DeleteItem

void CScoptViewResultsModel::Clear(){    wxVector<CScoptViewResultsModel_Item*> roots = m_data;    wxVector<CScoptViewResultsModel_Item*>::iterator iter = roots.begin();    for(; iter != roots.end(); ++iter) {        DeleteItem( wxDataViewItem(*iter) );    }    Cleared();}
开发者ID:HTshandou,项目名称:codelite,代码行数:9,


示例28: ExpandAll

void MemCheckOutputView::OnExpandAll(wxCommandEvent& event){    // CL_DEBUG1(PLUGIN_PREFIX("MemCheckOutputView::OnExpandAll()"));    m_notebookOutputView->ChangeSelection(m_notebookOutputView->FindPage(m_panelErrors));    // not implemented in wxDVC :(    // m_dataViewCtrlErrors->ExpandAll();    ExpandAll(wxDataViewItem(0));}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:9,


示例29: DeleteItem

void StaleFilesModel::Clear(){    wxVector<StaleFilesModel_Item*> roots = m_data;    wxVector<StaleFilesModel_Item*>::iterator iter = roots.begin();    for(; iter != roots.end(); ++iter) {        DeleteItem( wxDataViewItem(*iter) );    }    Cleared();}
开发者ID:HTshandou,项目名称:codelite,代码行数:9,



注:本文中的wxDataViewItem函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wxDateTime函数代码示例
C++ wxDataViewEventHandler函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。