本文整理汇总了C++中UserTab类的典型用法代码示例。如果您正苦于以下问题:C++ UserTab类的具体用法?C++ UserTab怎么用?C++ UserTab使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UserTab类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: selectTab
void UserTabBar::mousePressEvent(QMouseEvent *e)
{
if (e->button() == RightButton){
QTab *t = selectTab(e->pos());
if (t == NULL) return;
UserTab *tab = static_cast<UserTab*>(t);
EventMenuProcess eMenu(MenuContact, (void*)tab->wnd()->id());
eMenu.process();
QPopupMenu *menu = eMenu.menu();
if (menu)
menu->popup(e->globalPos());
return;
}
if (e->button() == MidButton){
//Close tab on middle button pressed
QTab *t = selectTab(e->pos());
if (t == NULL) return;
UserTab *tab = static_cast<UserTab*>(t);
Command cmd;
cmd->id = CmdClose;
cmd->param = (void*)tab->wnd()->id();
EventCommandExec(cmd).process();
}
QTabBar::mousePressEvent(e);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:26,代码来源:container.cpp
示例2: tabList
bool UserTabBar::isBold(UserWnd *wnd)
{
QList<QTab> *tList = tabList();
for (QTab *t = tList->first(); t; t = tList->next()){
UserTab *tab = static_cast<UserTab*>(t);
if (tab->wnd() == wnd)
return tab->isBold();
}
return false;
}
开发者ID:,项目名称:,代码行数:10,代码来源:
示例3: layoutTabs
UserWnd *UserTabBar::wnd(unsigned id)
{
layoutTabs();
QList<QTab> *tList = tabList();
for (QTab *t = tList->first(); t; t = tList->next()){
UserTab *tab = static_cast<UserTab*>(t);
if (tab->wnd()->id() == id)
return tab->wnd();
}
return NULL;
}
开发者ID:,项目名称:,代码行数:11,代码来源:
示例4: count
list<UserWnd*> UserTabBar::windows()
{
list<UserWnd*> res;
unsigned n = count();
for (unsigned i = 0; n > 0; i++){
UserTab *t = static_cast<UserTab*>(tab(i));
if (t == NULL)
continue;
res.push_back(t->wnd());
n--;
}
return res;
}
开发者ID:,项目名称:,代码行数:13,代码来源:
示例5: selectTab
void UserTabBar::mousePressEvent(QMouseEvent *e)
{
if (e->button() == RightButton){
QTab *t = selectTab(e->pos());
if (t == NULL) return;
UserTab *tab = static_cast<UserTab*>(t);
ProcessMenuParam mp;
mp.id = MenuContact;
mp.param = (void*)(tab->wnd()->id());
mp.key = 0;
Event eMenu(EventProcessMenu, &mp);
QPopupMenu *menu = (QPopupMenu*)eMenu.process();
if (menu)
menu->popup(e->globalPos());
return;
}
QTabBar::mousePressEvent(e);
}
开发者ID:,项目名称:,代码行数:18,代码来源:
注:本文中的UserTab类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论