本文整理汇总了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);
}
}
示例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);
}
示例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);
}
}
}
示例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;
}
示例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
}
}
示例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();
}
示例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);
}
}
}
示例8: wxCHECK_RET
void wxCheckListBox::Toggle(unsigned int uiIndex)
{
wxCHECK_RET( IsValid(uiIndex), wxT("bad wxCheckListBox index") );
GetItem(uiIndex)->Toggle();
RefreshItem(uiIndex);
}
示例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);
}
}
示例10: GetIndexFromData
void BattleListCtrl::UpdateBattle( IBattle& battle )
{
int index = GetIndexFromData( &battle );
RefreshItem( index );
MarkDirtySort();
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
}
示例15: RefreshItem
void NickDataViewCtrl::UserUpdated(const User& user)
{
if (ContainsItem(user)) {
RefreshItem(user);
}
DoUsersFilter();
}