本文整理汇总了C++中FillList函数的典型用法代码示例。如果您正苦于以下问题:C++ FillList函数的具体用法?C++ FillList怎么用?C++ FillList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FillList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: qDebug
void MarketListWidget::on_addButton_clicked()
{
if(!ui->listWidget->currentIndex().isValid()){
QMessageBox::critical(this,"Nada seleccionado","Seleccione un item de la lista para modificar",QMessageBox::Ok);
return;
}
QListWidgetItem *item = ui->listWidget->currentItem();
int amount = ui->spinBox->value();
QSqlQuery query;
int id = item->data(Qt::UserRole).toInt();
if(ui->spinBox->value()>0){
query.prepare("UPDATE MarketList SET amount=? WHERE food_id=?");
query.addBindValue(amount);
query.addBindValue(id);
if(query.exec()){
qDebug()<<"updated market list item properly";
FillList();
}else{
qDebug()<<"failed to update market list item";
}
}else{
query.prepare("DELETE FROM MarketList WHERE food_id=?");
query.addBindValue(id);
if(query.exec()){
qDebug()<<"deleted market list item properly";
FillList();
}else{
qDebug()<<"failed to delete market list item";
}
}
}
示例2: BKCurrentWindow_au
int BKCurrentWindow_au(WndAndHandle * pItem)
{
if(IsInHidedWndList(pItem))
{
return 0;
}
wchar_t * cTitle = new wchar_t[2048],cPID[20];
memset(cTitle,0,2048 * sizeof(wchar_t));
memset(cPID,0,20 * sizeof(wchar_t));
FillList();
swprintf(cPID,L"%X",pItem->lPID);
wcscpy(cTitle,pItem->cWndTitle);
ConstructBKSW_au(cPID,cTitle);
delete [] cTitle;
HideSelected(&sBKSel_con,1,1);
WndAndHandle * pHidedItem = new WndAndHandle;
memset(pHidedItem,0,sizeof(WndAndHandle));
pHidedItem->lPID = pItem->lPID;
g_HidedWndList.push_back(pHidedItem);
Switch2BKTab();
FillList();
return 1;
}
示例3: FillList
void ezQtDataDirsDlg::on_ButtonUp_clicked()
{
ezMath::Swap(m_Config.m_DataDirs[m_iSelection - 1], m_Config.m_DataDirs[m_iSelection]);
--m_iSelection;
FillList();
}
示例4: QLatin1String
void ezQtDataDirsDlg::on_ButtonAdd_clicked()
{
static QString sPreviousFolder;
if (sPreviousFolder.isEmpty())
{
sPreviousFolder = QString::fromUtf8(ezToolsProject::GetSingleton()->GetProjectFile().GetData());
}
QString sFolder = QFileDialog::getExistingDirectory(this, QLatin1String("Select Directory"), sPreviousFolder,
QFileDialog::Option::ShowDirsOnly | QFileDialog::Option::DontResolveSymlinks);
if (sFolder.isEmpty())
return;
sPreviousFolder = sFolder;
ezStringBuilder sRootPath = ezFileSystem::GetSdkRootDirectory();
ezStringBuilder sRelPath = sFolder.toUtf8().data();
sRelPath.MakeRelativeTo(sRootPath);
sRelPath.Prepend(">sdk/");
sRelPath.MakeCleanPath();
ezApplicationFileSystemConfig::DataDirConfig dd;
dd.m_sDataDirSpecialPath = sRelPath;
dd.m_bWritable = false;
m_Config.m_DataDirs.PushBack(dd);
m_iSelection = m_Config.m_DataDirs.GetCount() - 1;
FillList();
}
示例5: lookup_widget
void ShortcutsListDlg::OnContextChanged()
{
//filter list to show only selected context
GtkWidget *combobox4 = lookup_widget(m_pDialog, "combobox4");
int nCtx = gtk_combo_box_get_active (GTK_COMBO_BOX(combobox4));
FillList(nCtx);
}
示例6: switch
void CLryEDBQryView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
CListCtrl *ListCtrl = (CListCtrl *)&GetListCtrl();
CLryEDBQryDoc *pDoc = (CLryEDBQryDoc *)GetDocument();
CLryEDBQryDoc::CRowObj *rowInfo;
int i;
switch(lHint)
{
case 0:
FillList(); //填写表格
break;
case 1:
try
{
i = pDoc->Rs->AbsolutePosition-1;
ListCtrl->EnsureVisible(i,TRUE);
}
catch(_com_error &e)
{
dump_com_error(e);
}
break;
case 2:
rowInfo = (CLryEDBQryDoc::CRowObj*)pHint;
ListCtrl->DeleteItem(rowInfo->RowNO);
ListCtrl->Update(rowInfo->RowNO);
break;
default:
break;
}
}
示例7: XRCCTRL
void PluginsConfigurationDlg::OnUninstall(wxCommandEvent& /*event*/)
{
wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
if (list->GetSelectedItemCount() == 0)
return;
wxBusyCursor busy;
long sel = -1;
wxString failure;
while (true)
{
sel = list->GetNextItem(sel, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (sel == -1)
break;
const PluginElement* elem = (const PluginElement*)list->GetItemData(sel);
if (elem && elem->plugin)
{
if (!Manager::Get()->GetPluginManager()->UninstallPlugin(elem->plugin))
failure << elem->info.title << _T('\n');
}
}
FillList();
if (!failure.IsEmpty())
cbMessageBox(_("One or more plugins were not un-installed successfully:\n\n") + failure, _("Warning"), wxICON_WARNING, this);
}
示例8: Q_snprintf
void CDialog_PPEPrecache::OnFileSelected( KeyValues *pKV )
{
const char *pathIn = pKV->GetString( "fullpath" );
if ( Q_strlen( pathIn ) <= 1 )
return;
char tmp[MAX_PATH*4];
if ( !g_pFullFileSystem->FullPathToRelativePath( pathIn, tmp, sizeof( tmp ) ) )
Q_snprintf( tmp, sizeof(tmp), "%s", pathIn );
CPostProcessingCache::PPE_Error error = GetPPCache()->LoadPostProcessingEffect( tmp, false );
if ( error != CPostProcessingCache::PPE_OKAY )
{
PromptSimple *prompt = new PromptSimple( this, "Error" );
prompt->MoveToCenterOfScreen();
switch ( error )
{
case CPostProcessingCache::PPE_INVALID_INPUT:
prompt->SetText( "Unable to load file." );
break;
case CPostProcessingCache::PPE_INVALID_GRAPH_TYPE:
prompt->SetText( "This file is not a post processing graph!" );
break;
case CPostProcessingCache::PPE_GRAPH_NOT_VALID:
prompt->SetText( "This graph is not valid, open the file and fix it!" );
break;
}
prompt->AddButton( "Ok" );
}
else if ( pEditorRoot->GetSafeFlowgraph()->GetFlowgraphType() == CNodeView::FLOWGRAPH_POSTPROC )
pEditorRoot->GetSafeFlowgraph()->UpdatePPECache();
FillList();
}
示例9: FillList
BOOL CBCGPGridFilterListDlg::OnInitDialog()
{
CBCGPDialog::OnInitDialog();
CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout();
if (pLayout != NULL)
{
pLayout->AddAnchor(IDC_BCGBARRES_FILTER_SEARCH, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeHorz);
pLayout->AddAnchor(IDC_BCGBARRES_FILTER_LIST, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeBoth);
pLayout->AddAnchor(IDOK, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone);
pLayout->AddAnchor(IDCANCEL, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone);
}
CString strPrompt;
{
CBCGPLocalResource locaRes;
strPrompt.LoadString(IDS_BCGBARRES_SEARCH_PROMPT);
m_strSelectAll.LoadString(IDS_BCGBARRES_SELECT_ALL);
}
m_wndEdit.EnableSearchMode(TRUE, strPrompt);
FillList();
m_wndEdit.SetFocus();
return FALSE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例10: BWindow
PyeManagerWindow::PyeManagerWindow(BHandler* returnHandler, Proxy* theProxy) :
BWindow(BRect(200, 200, 415, 500), "Payee Manager",
B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE)
{
this->returnHandler = returnHandler;
this->theProxy = theProxy;
pyeS = theProxy->GetPyeS();
BRect frame = Frame();
frame.OffsetTo(0, 0);
BView* backdrop = new BView(frame, "backview", B_FOLLOW_ALL_SIDES, B_WILL_DRAW);
backdrop->SetViewColor(222, 222, 222);
AddChild(backdrop);
lv = new BListView(BRect(10, 10, frame.Width() - 10 - 15, frame.Height() - 70),
"PyeManagerLV");
backdrop->AddChild(new BScrollView("scrolllv", lv,
B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true));
FillList();
BButton* b = new BButton(BRect(10, frame.bottom - 60, 100, frame.bottom - 40),
"NewB", "New...", new BMessage(PyeManagerWindowNewMSG));
backdrop->AddChild(b);
b = new BButton(BRect(110, frame.bottom - 60, 200, frame.bottom - 40),
"RenameB", "Rename...", new BMessage(PyeManagerWindowRenameMSG));
backdrop->AddChild(b);
b = new BButton(BRect(10, frame.bottom - 30, 100, frame.bottom - 10),
"DeleteB", "Delete...", new BMessage(PyeManagerWindowDeleteMSG));
backdrop->AddChild(b);
b = new BButton(BRect(110, frame.bottom - 30, 200, frame.bottom - 10),
"CloseB", "Close", new BMessage(PyeManagerWindowCloseMSG));
backdrop->AddChild(b);
}
示例11: m_List
IncrementalSelectListDlg::IncrementalSelectListDlg(wxWindow* parent, const IncrementalSelectIterator& iterator,
const wxString& caption, const wxString& message)
: m_List(nullptr),
m_Text(nullptr),
m_Iterator(iterator)
{
wxXmlResource::Get()->LoadObject(this, parent, _T("dlgIncrementalSelectList"),_T("wxScrollingDialog"));
if (!caption.IsEmpty())
SetTitle(caption);
if (!message.IsEmpty())
XRCCTRL(*this, "lblMessage", wxStaticText)->SetLabel(message);
m_Text = XRCCTRL(*this, "txtSearch", wxTextCtrl);
m_List = XRCCTRL(*this, "lstItems", wxListBox);
SetSize(GetPosition().x - 90, GetPosition().y - 70, 500, 300);
m_Text->Connect( wxEVT_KEY_DOWN,
(wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction)
&IncrementalSelectListDlg::OnKeyDown,
nullptr, this );
m_List->Connect( wxEVT_KEY_DOWN,
(wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction)
&IncrementalSelectListDlg::OnKeyDown,
nullptr, this );
FillList();
}
示例12: CBaseDiag
CDialog_RendertargetList::CDialog_RendertargetList( Panel *parent ) : CBaseDiag( parent, NULL, "_rt_list" )
{
SetSizeable( false );
SetVisible( true );
SetMouseInputEnabled( true );
SetKeyBoardInputEnabled( true );
Activate();
m_pList_RT = new PanelListPanel( this, "rtlist" );
m_pList_RT->SetNumColumns( 2 );
m_pList_RT->SetFirstColumnWidth( 200 );
FillList();
LoadControlSettings( "shadereditorui/vgui/dialog_rendertarget_list.res" );
SetTitle( "Rendertarget manager", true );
DoModal();
SetDeleteSelfOnClose( true );
MoveToCenterOfScreen();
}
示例13: lock
void CPasteFunctionDialog::PostInit()
{
fCellView = fOwner->GetCellView();
BAutolock lock(this);
if (!lock.IsLocked())
THROW((errLockWindow));
fList = (BListView *)FindView("list");
fList->SetInvocationMessage(new BMessage(msg_OK));
fList->SetSelectionMessage(new BMessage(msg_FuncChanged));
// fList->SetFont(be_plain_font);
fFuncDescription = (BTextView *)FindView("desc");
BMenuField *mf = dynamic_cast<BMenuField *>(FindView("group"));
fMenu = mf->Menu();
fMenu->AddItem(new BMenuItem("All", new BMessage(msg_MenuChanged)));
fMenu->AddSeparatorItem();
fMenu->AddItem(new BMenuItem("Cell", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Date-Time", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Financial", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Math", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Statistical", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Text", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Logical", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Engineering", new BMessage(msg_MenuChanged)));
fMenu->AddItem(new BMenuItem("Plugins", new BMessage(msg_MenuChanged)));
fMenu->FindItem("All")->SetMarked(true);
FillList();
Show();
} /* CPasteFunctionDialog::CPasteFunctionDialog */
示例14: FillList
void CDamage::OnTextChangedComboElements(LPCTSTR text, short index)
{
// TODO: Add your control notification handler code here
CRCombo* combo;
combo=GETDLGITEM(IDC_COMBO_ELEMENTS);
int comboindex = combo->GetIndex();
//DEADCODE RDH 16/05/00 if (comboindex==0)
groupnum=internalUIDList[comboindex];
//DEADCODE RDH 16/05/00 else
//DEADCODE RDH 16/05/00 {
//DEADCODE RDH 16/05/00 internalUIDList
//DEADCODE RDH 16/05/00 info_itemS* p;
//DEADCODE RDH 16/05/00 UniqueIDBand band;
//DEADCODE RDH 16/05/00 for (int i=BritAAASiteBAND;i<WorldStuff::PITEMTABLESIZE;i++)
//DEADCODE RDH 16/05/00 if ( ((p=Persons2::ConvertPtrUID(UniqueID(i)))!=NULL)
//DEADCODE RDH 16/05/00 && (p->SGT==wavenum && p->shape.Evaluate()!=EMPTY)
//DEADCODE RDH 16/05/00 && (band=Persons2::getbandfromUID(UniqueID(i)))!=0
//DEADCODE RDH 16/05/00 && band!=LandscapeBAND
//DEADCODE RDH 16/05/00 )
//DEADCODE RDH 16/05/00 if (--comboindex==0)
//DEADCODE RDH 16/05/00 groupnum=i;
//DEADCODE RDH 16/05/00 }
m_pView->m_mapdlg.ResetIcon(UniqueID(groupnum));
FillList();
}
示例15: fd
void PluginsConfigurationDlg::OnInstall(wxCommandEvent& /*event*/)
{
wxFileDialog fd(this,
_("Select plugin to install"),
wxEmptyString, wxEmptyString,
_T("Code::Blocks Plugins (*.cbplugin)|*.cbplugin"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | compatibility::wxHideReadonly);
if (fd.ShowModal() != wxID_OK)
return;
wxBusyCursor busy;
wxArrayString paths;
fd.GetPaths(paths);
// install in global or user dirs?
bool globalInstall = XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->GetValue();
bool confirm = XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->GetValue();
wxString failure;
for (size_t i = 0; i < paths.GetCount(); ++i)
{
if (!Manager::Get()->GetPluginManager()->InstallPlugin(paths[i], globalInstall, confirm))
failure << paths[i] << _T('\n');
}
FillList();
if (!failure.IsEmpty())
cbMessageBox(_("One or more plugins were not installed successfully:\n\n") + failure, _("Warning"), wxICON_WARNING, this);
}