ICQSecure::ICQSecure(QWidget *parent, ICQClient *client) : ICQSecureBase(parent) { m_client = client; connect(this, SIGNAL(raise(QWidget*)), topLevelWidget(), SLOT(raisePage(QWidget*))); connect(chkHideIP, SIGNAL(toggled(bool)), this, SLOT(hideIpToggled(bool))); setListView(lstVisible); setListView(lstInvisible); fill(); }
ICQSecure::ICQSecure(QWidget *parent, ICQClient *client) : QWidget( parent) { setupUi( this); m_client = client; connect(chkHideIP, SIGNAL(toggled(bool)), this, SLOT(hideIpToggled(bool))); setListView(lstVisible); setListView(lstInvisible); fill(); connect(lstVisible, SIGNAL(deleteItem(Q3ListViewItem*)), this, SLOT(deleteVisibleItem(Q3ListViewItem*))); connect(lstInvisible, SIGNAL(deleteItem(Q3ListViewItem*)), this, SLOT(deleteInvisibleItem(Q3ListViewItem*))); }
void MenuBoxManager::setBoxWithList(Vector<ImageInfoParser*> imgInfo) { if(_vButton.size() > 0) { log("ButtonVector has data will be remove"); _vButton.clear(); } if(getChildByTag(TAG_MENUBOXLIST)) { getChildByTag(TAG_MENUBOXLIST)->removeFromParent(); } for(int i = 0 ; i < imgInfo.size() ; i++) { ImageInfoParser* info = static_cast<ImageInfoParser*>(imgInfo.at(i)); auto button = ui::Button::create("Main_BoxUp-hd.png", "Main_BoxDown-hd.png", "Main_BoxDown-hd.png"); // button->setTitleText("text"); button->setTag(TAG_MAIN_BOX + info->getidx()->intValue()); button->addTouchEventListener([&](Ref* sender, ui::Widget::TouchEventType type) { switch (type) { case ui::Widget::TouchEventType::BEGAN: break; case ui::Widget::TouchEventType::ENDED: buttonCallBack(sender); break; default: break; } }); setTypeTitle(button, info->gettitle()->getCString()); setTypeInfo(button, __String::createWithFormat("%s / %s",info->getspace()->getCString(),info->getair()->getCString())->getCString()); setPrice(button, __String::createWithFormat("%s", info->getprice()->getCString())->intValue()); setImageWithName(button, __String::createWithFormat("%s", info->getimgName()->getCString())->getCString()); _vButton.pushBack(button); } setListView(); }
void EntryWidgetKeyword::reset( BibTeX::Entry *entry ) { BibTeX::EntryField * field = entry->getField( BibTeX::EntryField::ftKeywords ); BibTeX::KeywordContainer *keywordContainer = NULL; if ( field != NULL && ( keywordContainer = dynamic_cast<BibTeX::KeywordContainer*>( field->value()->items.first() ) ) != NULL ) for ( QValueList<BibTeX::Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it ) m_usedKeywords.append(( *it )->text() ); m_fileKeywords = m_bibtexfile->getAllValuesAsStringList( BibTeX::EntryField::ftKeywords ); KBibTeX::Settings * settings = KBibTeX::Settings::self(); m_globalKeywords = settings->keyword_GlobalList; m_availableKeywords = QStringList( m_globalKeywords ); for ( QStringList::Iterator it = m_fileKeywords.begin(); it != m_fileKeywords.end(); ++it ) if ( !m_availableKeywords.contains( *it ) ) m_availableKeywords.append( *it ); for ( QStringList::Iterator it = m_usedKeywords.begin(); it != m_usedKeywords.end(); ++it ) if ( !m_availableKeywords.contains( *it ) ) m_availableKeywords.append( *it ); setListView(); }
LRESULT goCreateMaintion_EIO_2(HWND hWnd, UINT msgCode, WPARAM wParam, LPARAM lParam) { int i; HIMAGELIST hSmall; HICON hIcon; LVCOLUMN lvcol; LVITEM item; char contentAddress[5]; int nItemCount; char* content[]={"0=","1=","2=","3=","4=","5=","6=","7=","8=","9=","10=","11=","12=","13=","14=","15="}; char * caption [] ={"BIT ADDRESS","DATA","CONTENT"}; char * temp="0"; //创建自动加工参数窗口菜单 for(i=0;i<1;i++) { CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, maintion_EIO_2MenuBtns[i].szTitle, maintion_EIO_2MenuBtns[i].lStyle, maintion_EIO_2MenuBtns[i].x, maintion_EIO_2MenuBtns[i].y, maintion_EIO_2MenuBtns[i].cx, maintion_EIO_2MenuBtns[i].cy, hWnd, (HMENU)maintion_EIO_2MenuBtns[i].nID, hInst, NULL ); } //创建自动窗口菜单 for(i=1;i<dim(maintion_EIO_2MenuBtns);i++){ CreateWindowEx(maintion_EIO_2MenuBtns[i].dwExStyle, maintion_EIO_2MenuBtns[i].szClass, maintion_EIO_2MenuBtns[i].szTitle, maintion_EIO_2MenuBtns[i].lStyle, maintion_EIO_2MenuBtns[i].x, maintion_EIO_2MenuBtns[i].y, maintion_EIO_2MenuBtns[i].cx, maintion_EIO_2MenuBtns[i].cy, hWnd, (HMENU)maintion_EIO_2MenuBtns[i].nID, hInst, NULL ); } ZeroMemory(&lvcol, sizeof(LV_COLUMN)); ListView_SetTextBkColor(GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID),RGB(255,255,255)); lvcol.iOrder=2; lvcol.iSubItem = 2; lvcol.pszText = caption[2]; lvcol.cx = 300; lvcol.fmt = LVCFMT_CENTER; lvcol.mask = LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM|LVCF_ORDER; lvcol.cchTextMax = 60; SendMessage (GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID), LVM_INSERTCOLUMN, 0, (LPARAM)&lvcol); lvcol.iOrder=0; lvcol.iSubItem = 1; lvcol.pszText = caption[0]; lvcol.cx = 100; lvcol.fmt = LVCFMT_CENTER; lvcol.mask = LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM|LVCF_ORDER; lvcol.cchTextMax = 60; SendMessage (GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID), LVM_INSERTCOLUMN, 0, (LPARAM)&lvcol); lvcol.iOrder=1; lvcol.iSubItem = 0; lvcol.pszText = caption[1]; lvcol.cx = 50; lvcol.fmt = LVCFMT_CENTER; lvcol.mask = LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM|LVCF_ORDER; lvcol.cchTextMax = 60; SendMessage (GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID), LVM_INSERTCOLUMN, 0, (LPARAM)&lvcol); ListView_SetExtendedListViewStyle(GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID),LVS_EX_GRIDLINES |LVS_EX_HEADERDRAGDROP |LVS_EX_FULLROWSELECT ); SendMessage (GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID), LVM_DELETEALLITEMS, 0, 0); for(i=0;i<16;i++) { ZeroMemory(&item, sizeof(LV_ITEM)); nItemCount = ListView_GetItemCount(GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID)); item.iItem = nItemCount; item.mask = LVIF_TEXT; item.cchTextMax =5; item.pszText = (char *)malloc(5); if(item.pszText == NULL) { MessageBox(hWnd,"can not malloc item.pszText goCreateAutoParam functiotn",NULL,NULL); } SendMessage(GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID),LVM_INSERTITEM,0,(LPARAM)&item); item.iSubItem = 1; strcpy(item.pszText,content[i]); SendMessage(GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID),LVM_SETITEM,0,(LPARAM)&item); item.mask = LVIF_TEXT; item.cchTextMax =2; item.pszText = (char *)malloc(2); if(item.pszText == NULL) { MessageBox(hWnd,"can not malloc item.pszText goCreateAutoParam functiotn",NULL,NULL); } item.iSubItem = 0; strcpy(item.pszText,temp); SendMessage(GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID),LVM_SETITEM,0,(LPARAM)&item); item.mask = LVIF_TEXT; item.cchTextMax =30; item.pszText = (char *)malloc(30); if(item.pszText == NULL) { MessageBox(hWnd,"can not malloc item.pszText goCreateAutoParam functiotn",NULL,NULL); } item.iSubItem = 2; strcpy(item.pszText,temp); SendMessage(GetDlgItem(hWnd,maintion_EIO_2MenuBtns[0].nID),LVM_SETITEM,0,(LPARAM)&item); } // Create the ImageList hSmall = ImageList_Create(1,28,ILC_MASK, 1, 1); // Add two icons to ImageList hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1)); ImageList_AddIcon(hSmall, hIcon); DestroyIcon(hIcon); // Assign ImageList to List View ListView_SetImageList(GetDlgItem(hWnd,IDW_MAINTION_EIO_2_LV), hSmall, LVSIL_STATE); isActivity_EIO_2=0; EIO_2.EIO=82; for(i=0;i<16;i++)EIO_2.Bit_Address[i]=0; setListViewEIO(EIO_2,GetDlgItem(hWnd,IDW_MAINTION_EIO_2_LV)); setListView(EIO_2,GetDlgItem(hWnd,IDW_MAINTION_EIO_2_LV)); itoa(EIO_2.EIO,contentAddress,10); SetWindowText(GetDlgItem(hWnd,IDW_MAINTION_EIO_2_NUM),contentAddress); return 0; }
StructureParser::StructureParser( QTreeWidget * t ) : QXmlDefaultHandler() { setListView( t ); }