本文整理汇总了C++中FillList函数的典型用法代码示例。如果您正苦于以下问题:C++ FillList函数的具体用法?C++ FillList怎么用?C++ FillList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FillList函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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";
}
}
}
开发者ID:jesusgp22,项目名称:Icemart,代码行数:32,代码来源:marketlistwidget.cpp
示例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;
}
开发者ID:bodanrenko93,项目名称:hidedragon,代码行数:35,代码来源:hd3.cpp
示例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();
}
开发者ID:ezEngine,项目名称:ezEngine,代码行数:7,代码来源:DataDirsDlg.cpp
示例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();
}
开发者ID:ezEngine,项目名称:ezEngine,代码行数:32,代码来源:DataDirsDlg.cpp
示例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);
}
开发者ID:ellysh,项目名称:notecase,代码行数:7,代码来源:ShortcutsListDlg.cpp
示例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;
}
}
开发者ID:eseawind,项目名称:CoalQualityTestSystem,代码行数:34,代码来源:LryEDBQryView.cpp
示例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);
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:28,代码来源:pluginsconfigurationdlg.cpp
示例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();
}
开发者ID:Biohazard90,项目名称:source-shader-editor,代码行数:35,代码来源:vdialogppeffectprecache.cpp
示例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
}
开发者ID:iclosure,项目名称:jframework,代码行数:30,代码来源:BCGPGridFilterMenu.cpp
示例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);
}
开发者ID:HaikuArchives,项目名称:Finance,代码行数:35,代码来源:PyeManagerWindow.cpp
示例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();
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:28,代码来源:incrementalselectlistdlg.cpp
示例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();
}
开发者ID:Biohazard90,项目名称:source-shader-editor,代码行数:26,代码来源:vdialogrtlist.cpp
示例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 */
开发者ID:ModeenF,项目名称:OpenSumIt,代码行数:35,代码来源:PasteFunctionDialog.cpp
示例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();
}
开发者ID:gondur,项目名称:BOB_Src,代码行数:25,代码来源:DAMAGE.CPP
示例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);
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:30,代码来源:pluginsconfigurationdlg.cpp
示例16: FillTree
//=========================================================
// 세 번째 프로퍼티 페이지에 대한 코드
BOOL CMyPage3::OnInitDialog()
{
CPropertyPage::OnInitDialog();
FillTree();
FillList();
return TRUE;
}
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:10,代码来源:PAGE.CPP
示例17: FillList
void KSceneEditorAISetDialog::OnBnClickedButtonNew()
{
if(!m_pDocLogical)
return;
DWORD dwID;
m_pDocLogical->NewOneAISet(dwID,"New AI Set");
FillList();
}
开发者ID:viticm,项目名称:pap2,代码行数:8,代码来源:KSceneEditorAISetDialog.cpp
示例18: FillList
void GymnastSelectionList::Init(QQmlApplicationEngine &p_qEngine)
{
QQmlContext* pComboContext = p_qEngine.rootContext();
pComboContext->setContextProperty("gymnastRegisteredModel", &m_cCbbModel);
// move after mySQL read-out
FillList();
}
开发者ID:Caleg74,项目名称:MemorialGander,代码行数:8,代码来源:gymnastselectionlist.cpp
示例19: OpenFiledialog
void CDialog_PPEPrecache::OnCommand( const char *cmd )
{
if ( !Q_stricmp( "add_effect", cmd ) )
{
OpenFiledialog();
}
else if ( Q_stristr( cmd, "del_effect_" ) == cmd )
{
const char *pszIdStart = cmd + 11;
const int index = atoi( pszIdStart );
Assert( index >= 0 && index < GetPPCache()->GetNumPostProcessingEffects() );
GetPPCache()->DeletePostProcessingEffect( index );
FillList();
}
else if ( Q_stristr( cmd, "movedown_effect_" ) == cmd )
{
const char *pszIdStart = cmd + 16;
const int index = atoi( pszIdStart );
Assert( index >= 0 && index < GetPPCache()->GetNumPostProcessingEffects() );
GetPPCache()->MoveEffectAlongList( index, false );
FillList();
}
else if ( Q_stristr( cmd, "moveup_effect_" ) == cmd )
{
const char *pszIdStart = cmd + 14;
const int index = atoi( pszIdStart );
Assert( index >= 0 && index < GetPPCache()->GetNumPostProcessingEffects() );
GetPPCache()->MoveEffectAlongList( index, true );
FillList();
}
else
{
GetPPCache()->SavePrecacheFile();
BaseClass::OnCommand( cmd );
}
}
开发者ID:Biohazard90,项目名称:source-shader-editor,代码行数:46,代码来源:vdialogppeffectprecache.cpp
示例20: QWidget
MarketListWidget::MarketListWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::MarketListWidget)
{
ui->setupUi(this);
ui->listBackground->setStyleSheet("#listBackground {background-image: url(:/res/notebook.png);}");
FillList();
}
开发者ID:jesusgp22,项目名称:Icemart,代码行数:8,代码来源:marketlistwidget.cpp
注:本文中的FillList函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论