• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ eCmd函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中eCmd函数的典型用法代码示例。如果您正苦于以下问题:C++ eCmd函数的具体用法?C++ eCmd怎么用?C++ eCmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了eCmd函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Plugin

WeatherPlugin::WeatherPlugin(unsigned base, bool bInit, Buffer *config)
        : Plugin(base)
{
    load_data(weatherData, &data, config);
    BarWeather = registerType();
    CmdWeather = registerType();
    EventWeather = registerType();
    m_icons = getIcons()->addIconSet("icons/weather.jisp", true);
    Event eBar(EventToolbarCreate, (void*)BarWeather);
    eBar.process();
    Command cmd;
    cmd->id = CmdWeather;
    cmd->text = I18N_NOOP("Not connected");
    cmd->icon = "weather";
    cmd->bar_id = BarWeather;
    cmd->bar_grp = 0x1000;
    cmd->flags = BTN_PICT | BTN_DIV;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();
    m_bar = NULL;
    if (!bInit){
        showBar();
        if (m_bar)
            m_bar->show();
    }
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:26,代码来源:weather.cpp


示例2: Plugin

ActionPlugin::ActionPlugin(unsigned base)
        : Plugin(base), EventReceiver(HighPriority)
{
    plugin = this;

    action_data_id = getContacts()->registerUserData(info.title, actionUserData);
    CmdAction = registerType();

    Command cmd;
    cmd->id		 = action_data_id + 1;
    cmd->text	 = I18N_NOOP("&Action");
    cmd->icon	 = "run";
    cmd->param	 = (void*)getActionSetup;
    Event e(EventAddPreferences, cmd);
    e.process();

    cmd->id		 = CmdAction;
    cmd->text	 = "_";
    cmd->icon	 = NULL;
    cmd->flags	 = COMMAND_CHECK_STATE;
    cmd->menu_id = MenuContact;
    cmd->menu_grp = 0xC000;
    cmd->param	 = NULL;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    Event ePlugin(EventGetPluginInfo, (void*)"_core");
    pluginInfo *info = (pluginInfo*)(ePlugin.process());
    core = static_cast<CorePlugin*>(info->plugin);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:30,代码来源:action.cpp


示例3: QTreeWidget

ListView::ListView(QWidget *parent, const char *name)
        : QTreeWidget(parent)
{
    m_menuId = MenuListView;
    if (!s_bInit){
        s_bInit = true;
        Event eMenu(EventMenuCreate, (void*)MenuListView);
        eMenu.process();

	setFocusPolicy( Qt::StrongFocus);
        Command cmd;
        cmd->id			= CmdListDelete;
        cmd->text		= I18N_NOOP("&Delete");
        cmd->icon		= "remove";
        cmd->accel		= "Del";
        cmd->menu_id	= MenuListView;
        cmd->menu_grp	= 0x1000;
        cmd->flags		= COMMAND_DEFAULT;

        Event eCmd(EventCommandCreate, cmd);
        eCmd.process();
    }
    m_bAcceptDrop = false;
    viewport()->setAcceptDrops(true);
    m_pressedItem = NULL;
    m_expandingColumn = -1;
    verticalScrollBar()->installEventFilter(this);
    connect(header(), SIGNAL(sizeChange(int,int,int)), this, SLOT(sizeChange(int,int,int)));
    m_resizeTimer = new QTimer(this);
    connect(m_resizeTimer, SIGNAL(timeout()), this, SLOT(adjustColumn()));
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:31,代码来源:listview.cpp


示例4: eCmd

DockPlugin::~DockPlugin()
{
    Event eCmd(EventCommandRemove, (void*)CmdToggle);
    eCmd.process();

    Event eMenu(EventMenuRemove, (void*)DockMenu);
    eMenu.process();
    if (dock)
        delete dock;
    free_data(dockData, &data);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:11,代码来源:dock.cpp


示例5: clear

ActionPlugin::~ActionPlugin()
{
    clear();
    for (list<Exec*>::iterator it = m_exec.begin(); it != m_exec.end(); ++it)
        delete *it;
    m_exec.clear();
    Event eCmd(EventCommandRemove, (void*)CmdAction);
    eCmd.process();
    unsigned long id = action_data_id + 1;
    Event(EventRemovePreferences, (void*)id).process();
    getContacts()->unregisterUserData(action_data_id);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:12,代码来源:action.cpp


示例6: Plugin

LiveJournalPlugin::LiveJournalPlugin(unsigned base)
    : Plugin(base)
{
    m_protocol = new LiveJournalProtocol(this);

    Event eMenu(EventMenuCreate, (void*)MenuWeb);
    eMenu.process();

    Command cmd;
    cmd->id			 = CmdMenuWeb;
    cmd->text		 = "_";
    cmd->menu_id	 = MenuWeb;
    cmd->menu_grp	 = 0x1000;
    cmd->flags		 = COMMAND_CHECK_STATE;
    Event eCmd(EventCommandCreate, cmd);
    eCmd.process();

    cmd->id			 = MessageJournal;
    cmd->text		 = I18N_NOOP("LiveJournal &post");
    cmd->icon		 = "LiveJournal";
    cmd->accel		 = "Ctrl+P";
    cmd->menu_grp	 = 0x3080;
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defJournalMessage;
    Event eMsg(EventCreateMessageType, cmd);
    eMsg.process();

    cmd->id			 = CmdMenuWeb;
    cmd->text		 = I18N_NOOP("LiveJournal &WWW");
    cmd->icon		 = NULL;
    cmd->accel		 = NULL;
    cmd->menu_grp	 = 0x3090;
    cmd->popup_id	 = MenuWeb;
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defWWWJournalMessage;
    eMsg.process();

    cmd->id			 = MessageUpdated;
    cmd->text		 = I18N_NOOP("Friends updated");
    cmd->icon		 = "LiveJournal_upd";
    cmd->accel		 = NULL;
    cmd->menu_grp	 = 0;
    cmd->popup_id	 = 0;
    cmd->flags		 = COMMAND_DEFAULT;
    cmd->param		 = &defUpdatedMessage;
    eMsg.process();

    Event ePlugin(EventGetPluginInfo, (void*)"_core");
    pluginInfo *info = (pluginInfo*)(ePlugin.process());
    core = static_cast<CorePlugin*>(info->plugin);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:51,代码来源:livejournal.cpp


示例7: number

void WeatherPlugin::updateButton()
{
    if ((getTime() == 0) || (m_bar == NULL))
        return;
    weather_icon = "weather";
    weather_icon += number(getIcon());
    Command cmd;
    cmd->id      = CmdWeather;
    cmd->text    = I18N_NOOP("Not connected");
    cmd->icon    = weather_icon.c_str();
    cmd->bar_id  = BarWeather;
    cmd->bar_grp = 0x1000;
    cmd->flags   = BTN_PICT | BTN_DIV;
    Event eCmd(EventCommandChange, cmd);
    eCmd.process();

    QString text = unquoteText(getButtonText());
    QString tip = getTipText();
    QString ftip = getForecastText();
    text = replace(text);
    tip  = replace(tip);
    if (getForecast())
        tip = QString("<table><tr><td>") + tip + "</td><td>";
    unsigned n = (getForecast() + 1) / 2;
    if (n < 3)
        n = getForecast();
    for (m_day = 1; m_day <= getForecast(); m_day++){
        tip += forecastReplace(ftip);
        if (--n == 0){
            tip += "</td><td>";
            n = (getForecast() + 1) / 2;
        }
    }
    if (getForecast())
        tip += "</td></tr></table>";
    tip += "<br>\nWeather data provided by weather.com";
    tip += QChar((unsigned short)174);
    Command cmdw;
    cmdw->id	= CmdWeather;
    cmdw->param	= m_bar;
    Event e(EventCommandWidget, cmdw);
    CToolButton *btn = (CToolButton*)e.process();
    if (btn == NULL)
        return;
    btn->setTextLabel(text);
    btn->repaint();
    QToolTip::add(btn, tip);
}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:48,代码来源:weather.cpp



注:本文中的eCmd函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ eDebug函数代码示例发布时间:2022-05-30
下一篇:
C++ e1函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap