当前位置: 首页>>代码示例>>C++>>正文


C++ RefreshItem函数代码示例

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


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

示例1: switch

void CDirstatDoc::RefreshAfterUserDefinedCleanup(const USERDEFINEDCLEANUP *udc, CItem *item)
{
    switch (udc->refreshPolicy)
    {
    case RP_NO_REFRESH:
        break;

    case RP_REFRESH_THIS_ENTRY:
        {
            RefreshItem(item);
        }
        break;

    case RP_REFRESH_THIS_ENTRYS_PARENT:
        {
            RefreshItem(NULL == item->GetParent() ? item : item->GetParent());
        }
        break;

    // case RP_ASSUME_ENTRY_HAS_BEEN_DELETED:
    // Feature not implemented.
    // break;

    default:
        ASSERT(0);
    }
}
开发者ID:JDuverge,项目名称:windirstat,代码行数:27,代码来源:dirstatdoc.cpp

示例2: FindItem

void browsers::topedlay_list::defaultLayer(word newl, word oldl) {
   wxListItem info;
   // first remove the icon from the previous default layer
   long ID = FindItem(-1, oldl);
   info.SetId(ID);info.SetColumn(2);
   if ( GetItem(info) ) {
      info.SetMask(wxLIST_MASK_IMAGE);info.SetImage(-1);
      SetItem(info);
   }
   info.SetColumn(0);
   if ( GetItem(info) ) {
      info.SetFont(_llfont_normal);
      SetItem(info);
   }   
   RefreshItem(ID);
   // Now attach the Icon to the current default layer
   ID = FindItem(-1, newl);
   info.SetId(ID);info.SetColumn(2);
   if ( GetItem(info) ) {
      info.SetMask(wxLIST_MASK_IMAGE);info.SetImage(0);
      SetItem(info);
   }   
   info.SetColumn(0);
   if ( GetItem(info) ) {
      info.SetFont(_llfont_bold);
      SetItem(info);
   }
   RefreshItem(ID);
}
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:29,代码来源:browsers.cpp

示例3: RDAddLog

void MainWidget::addData()
{
  QString logname;
  QString svcname;
  RDSqlQuery *q;
  QString sql;
  std::vector<QString> newlogs;
  RDAddLog *log;

  if(rda->user()->createLog()) {
    log=new RDAddLog(&logname,&svcname,NULL,tr("Add Log"),this);
    if(log->exec()!=0) {
      delete log;
      return;
    }
    delete log;
    sql=QString("insert into LOGS set ")+
      "NAME=\""+RDEscapeString(logname)+"\","+
      "TYPE=0,"+
      "DESCRIPTION=\""+RDEscapeString(logname)+" log\","+
#ifdef WIN32
      "ORIGIN_USER=\""+RDEscapeString(RD_USER_LOGIN_NAME)+"\","+
#else
      "ORIGIN_USER=\""+RDEscapeString(rda->ripc()->user())+"\","+
#endif  // WIN32
      "ORIGIN_DATETIME=now(),"+
      "LINK_DATETIME=now(),"+
      "SERVICE=\""+RDEscapeString(svcname)+"\"";
    q=new RDSqlQuery(sql);
    if(!q->isActive()) {
      QMessageBox::warning(this,tr("Log Exists"),tr("Log Already Exists!"));
      delete q;
      return;
    }
    delete q;
    RDCreateLogTable(RDLog::tableName(logname));
    EditLog *editlog=new EditLog(logname,&log_filter,&log_group,&log_schedcode,
				 &log_clipboard,&newlogs,this);
    editlog->exec();
    delete editlog;
    ListListViewItem *item=new ListListViewItem(log_log_list);
    item->setText(1,logname);
    RefreshItem(item);
    log_log_list->setSelected(item,true);
    log_log_list->ensureItemVisible((Q3ListViewItem *)item);
    for(unsigned i=0;i<newlogs.size();i++) {
      item=new ListListViewItem(log_log_list);
      item->setText(1,newlogs[i]);
      RefreshItem(item);
    }
  }
}
开发者ID:WMFO,项目名称:rivendell,代码行数:52,代码来源:rdlogedit.cpp

示例4: AddEncoder

void ListEncoders::addData()
{
  QString name;
  QString sql;
  RDSqlQuery *q;
  RDSqlQuery *q1;

  AddEncoder *ad=new AddEncoder(&name,list_stationname,this);
  if(ad->exec()==0) {
    sql=QString().sprintf("select ID from ENCODERS \
                           where (NAME=\"%s\")&&(STATION_NAME=\"%s\")",
			  (const char *)RDEscapeString(name),
			  (const char *)RDEscapeString(list_stationname));
    q=new RDSqlQuery(sql);
    if(q->first()) {
      EditEncoder *ee=new EditEncoder(q->value(0).toInt());
      if(ee->exec()==0) {
	RDListViewItem *item=new RDListViewItem(list_list_view);
	item->setId(q->value(0).toInt());
	item->setText(0,name);
	RefreshItem(item);
	list_list_view->ensureItemVisible(item);
      }
      else {
	sql=QString().sprintf("delete from ENCODERS \
                              where (NAME=\"%s\")&&(STATION_NAME=\"%s\")",
			      (const char *)RDEscapeString(name),
			      (const char *)RDEscapeString(list_stationname));
	q1=new RDSqlQuery(sql);
	delete q1;
      }
      delete ee;
    }
开发者ID:radio-helsinki-graz,项目名称:rivendell,代码行数:33,代码来源:list_encoders.cpp

示例5: if

void cChar::glowHalo(P_ITEM pi)
{
	if (pi->glow != INVALID_SERIAL)
	{
		P_ITEM pHalo=FindItemBySerial(pi->glow);
		if (!pHalo) return;
		
		pHalo->layer=pi->layer; // copy layer information of the glowing item to the invisible light emitting object
		
		if(pHalo->layer==0 && pi->isInWorld()) // unequipped -> light source coords = item coords
		{
			pHalo->dir=29;
			pHalo->pos.x=pi->pos.x;
			pHalo->pos.y=pi->pos.y;
			pHalo->pos.z=pi->pos.z;
		} else if (pHalo->layer==0 && !pi->isInWorld()) // euqipped -> light source coords = players coords
		{
			pHalo->pos.x=this->pos.x;
			pHalo->pos.y=this->pos.y;
			pHalo->pos.z=this->pos.z+4;
			pHalo->dir=99; // gives no light in backpacks
		} else
		{
			pHalo->pos.x=this->pos.x;
			pHalo->pos.y=this->pos.y;
			pHalo->pos.z=this->pos.z+4;
			pHalo->dir=29;
		}
		RefreshItem(pHalo);//AntiChrist
	}
}
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:31,代码来源:chars.cpp

示例6: GetScreen

void SCH_EDIT_FRAME::OrientComponent( COMPONENT_ORIENTATION_T aOrientation )
{
    SCH_SCREEN*    screen = GetScreen();
    SCH_ITEM*      item = screen->GetCurItem();
    SCH_COMPONENT* component = (SCH_COMPONENT*) item;

    GetCanvas()->MoveCursorToCrossHair();

    if( item->GetFlags() == 0 )
        SetUndoItem( item );

    component->SetOrientation( aOrientation );

    m_canvas->CrossHairOn( );

    if( item->GetFlags() == 0 )
    {
        addCurrentItemToScreen();
        SchematicCleanUp();
    }

    TestDanglingEnds();

    RefreshItem( item );

    if( item->GetFlags() == 0 )
        OnModify();
}
开发者ID:johnbeard,项目名称:kicad,代码行数:28,代码来源:getpart.cpp

示例7: while

void ListLog::logInsertedData(int line)
{
    bool appended=false;

    if(line>=list_log->size()) {
        line=list_log->size()-1;
    }
    if(line>=list_log->size()-1) {
        appended=true;
    }
    int count;
    RDListViewItem *item=GetItem(line+1);
    while(item!=NULL) {
        if((count=item->text(15).toInt())>=0) {
            item->setText(15,QString().sprintf("%d",count+1));
        }
        item=(RDListViewItem *)item->nextSibling();
    }
    item=new RDListViewItem(list_log_list);
    list_log->logLine(line)->setListViewItem(item);
    RefreshItem(item,line);
    if(appended) {
        if((item=(RDListViewItem *)list_log_list->findItem("-2",13))!=NULL) {
            list_log_list->ensureItemVisible(item);
        }
    }
}
开发者ID:radio-helsinki-graz,项目名称:rivendell,代码行数:27,代码来源:list_log.cpp

示例8: wxCHECK_RET

void wxCheckListBox::Toggle(unsigned int uiIndex)
{
    wxCHECK_RET( IsValid(uiIndex), wxT("bad wxCheckListBox index") );

    GetItem(uiIndex)->Toggle();
    RefreshItem(uiIndex);
}
开发者ID:AdmiralCurtiss,项目名称:pcsx2,代码行数:7,代码来源:checklst.cpp

示例9: AddItem

static void AddItem(DEBUG_INFO *dbg, VARINFO *var,
                    int cursoreip, WATCHDATA *ptr)
{
    WATCHINFO *x = MatchItem(var, ptr);
    if (x)
    {
        x->marked = FALSE;
        FreeVarInfo(var);
    }
    else
    {
        HTREEITEM previous = 0;
        if (ptr->watchinfo_count >= ptr->watchinfo_max)
        {
            if (ptr->watchinfo_max >= 128)
            {
                ExtendedMessageBox("Watch Error", MB_SETFOREGROUND |
                                   MB_SYSTEMMODAL,
                                   "There are too many items in the watch window\nNot adding the current selection");
                return ;
            }
            ptr->watchinfo_max += 64;
            ptr->watchinfo_list = realloc(ptr->watchinfo_list, ptr->watchinfo_max *sizeof
                                          (WATCHINFO));
        }
        if (ptr->watchinfo_count)
            previous = ptr->watchinfo_list[ptr->watchinfo_count - 1].info->hTreeItem;
        memset(&ptr->watchinfo_list[ptr->watchinfo_count], 0, sizeof(ptr->watchinfo_list[0]));
        ptr->watchinfo_list[ptr->watchinfo_count].info = var;
        ptr->watchinfo_list[ptr->watchinfo_count].dbg_info = dbg;
        ptr->watchinfo_list[ptr->watchinfo_count++].cursoreip = cursoreip;
        RefreshItem(ptr, &ptr->watchinfo_list[ptr->watchinfo_count - 1], var->address, NULL, TRUE);
        InsertSubTree(0, previous, var, ptr->watchinfo_count - 1, ptr);
    }
}
开发者ID:bencz,项目名称:OrangeC,代码行数:35,代码来源:dbgwatch.c

示例10: GetIndexFromData

void BattleListCtrl::UpdateBattle( IBattle& battle )
{
    int index = GetIndexFromData( &battle );

    RefreshItem( index );
    MarkDirtySort();
}
开发者ID:tulipe7,项目名称:springlobby,代码行数:7,代码来源:battlelistctrl.cpp

示例11: RDCutDialog

void ListCasts::addCartData()
{
  QString cutname;
  RDCutDialog *cd=new RDCutDialog(&cutname,rdstation_conf,cast_system,
				  &cast_filter,&cast_group,&cast_schedcode,
				  cast_ripc->user());
  if(cd->exec()!=0) {
    delete cd;
    return;
  }
  delete cd;
  RDFeed::Error err;
  unsigned cast_id=list_feed->postCut(cast_user,rdstation_conf,cutname,&err,
				      config->logXloadDebugData(),config);
  if(err!=RDFeed::ErrorOk) {
    QMessageBox::warning(this,tr("Posting Error"),RDFeed::errorString(err));
    return;
  }
  EditCast *edit_cast=new EditCast(cast_id,this);
  edit_cast->exec();
  RDListViewItem *item=new RDListViewItem(list_casts_view);
  item->setId(cast_id);
  RefreshItem(item);
  list_casts_view->setSelected(item,true);
  list_casts_view->ensureItemVisible(item);
  delete edit_cast;
}
开发者ID:WMTH,项目名称:rivendell,代码行数:27,代码来源:list_casts.cpp

示例12: RDSqlQuery

void MainWidget::RefreshList()
{
  RDSqlQuery *q;
  QString sql;
  ListListViewItem *item;

  log_log_list->clear(); // Note: clear here, in case user has no perms.

  sql=QString("select NAME from LOGS where ")+
    "(TYPE=0)&&"+
    "(LOG_EXISTS=\"Y\")";

  if(log_service_box->currentItem()!=0) {
    sql+="&&(SERVICE=\""+RDEscapeString(log_service_box->currentText())+"\")";
  }
  QString filter=log_filter_edit->text();
  if(!filter.isEmpty()) {
    sql+="&&((NAME like \"%%"+RDEscapeString(filter)+"%%\")||";
    sql+="(DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\")||";
    sql+="(SERVICE like \"%%"+RDEscapeString(filter)+"%%\"))";
  }
  if(log_recent_check->isChecked()) {
    sql+=QString().sprintf("order by ORIGIN_DATETIME desc limit %d",
			   RDLOGEDIT_LIMIT_QUAN);
  }
  q=new RDSqlQuery(sql);
  while(q->next()) {
    item=new ListListViewItem(log_log_list);
    item->setText(1,q->value(0).toString());
    RefreshItem(item);
  }
  delete q;
}
开发者ID:WMFO,项目名称:rivendell,代码行数:33,代码来源:rdlogedit.cpp

示例13: wxCHECK_RET

void wxListBox::SetString(int n, const wxString& s)
{
    wxCHECK_RET( !IsSorted(), _T("can't set string in sorted listbox") );

    (*m_strings)[n] = s;

    if ( HasHorzScrollbar() )
    {
        // we need to update m_maxWidth as changing the string may cause the
        // horz scrollbar [dis]appear
        wxCoord width;

        GetTextExtent(s, &width, NULL);

        // it might have increased if the new string is long
        if ( width > m_maxWidth )
        {
            m_maxWidth = width;
            m_maxWidthItem = n;
            m_updateScrollbarX = true;
        }
        // or also decreased if the old string was the longest one
        else if ( n == m_maxWidthItem )
        {
            RefreshHorzScrollbar();
        }
    }

    RefreshItem(n);
}
开发者ID:project-renard-survey,项目名称:chandler,代码行数:30,代码来源:listbox.cpp

示例14: AddItem

void AddItem(DEBUG_INFO *dbg, VARINFO *var, 
             int cursoreip, int page)
{
    WATCHINFO *x = MatchItem(var, page);
    if (x)
    {
        FreeVarInfo(var);
    }
    else
    {
        HTREEITEM previous = 0;
        if (watchinfo_count[page] >= watchinfo_max[page])
        {
            if (watchinfo_max[page] >= 128)
            {
                ExtendedMessageBox("Watch Error", MB_SETFOREGROUND |
                    MB_SYSTEMMODAL, 
                    "There are too many items in the watch window\nNot adding the current selection");
                return ;
            }
            watchinfo_max[page] += 64;
            watchinfo_list[page] = realloc(watchinfo_list[page], watchinfo_max[page] *sizeof
                (WATCHINFO));
        }
        if (watchinfo_count[page])
            previous = watchinfo_list[page][watchinfo_count[page] - 1].info->hTreeItem;
        memset(&watchinfo_list[page][watchinfo_count[page]], 0, sizeof(watchinfo_list[page][0]));
        watchinfo_list[page][watchinfo_count[page]].info = var;
        watchinfo_list[page][watchinfo_count[page]].dbg_info = dbg;
        watchinfo_list[page][watchinfo_count[page]++].cursoreip = cursoreip;
        RefreshItem(&watchinfo_list[page][watchinfo_count[page] - 1], var->address, NULL);
        InsertSubTree(0, previous, var, watchinfo_count[page] - 1, page);
    }
}
开发者ID:doniexun,项目名称:OrangeC,代码行数:34,代码来源:dbgwatch.c

示例15: RefreshItem

void NickDataViewCtrl::UserUpdated(const User& user)
{

	if (ContainsItem(user)) {
		RefreshItem(user);
	}
	DoUsersFilter();
}
开发者ID:OursDesCavernes,项目名称:springlobby,代码行数:8,代码来源:nickdataviewctrl.cpp


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