当前位置: 首页>>代码示例>>C++>>正文


C++ signal::emit方法代码示例

本文整理汇总了C++中sigc::signal::emit方法的典型用法代码示例。如果您正苦于以下问题:C++ signal::emit方法的具体用法?C++ signal::emit怎么用?C++ signal::emit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sigc::signal的用法示例。


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

示例1: on_limits_changed

      void on_limits_changed()
      {
	magnet::gtk::forceNumericEntry(_minValue);
	try { _min = boost::lexical_cast<GLfloat>(_minValue.get_text()); } catch(...) {}
	magnet::gtk::forceNumericEntry(_maxValue);
	try { _max = boost::lexical_cast<GLfloat>(_maxValue.get_text()); } catch(...) {}
	_signal_changed.emit();
      }
开发者ID:armando-2011,项目名称:DynamO,代码行数:8,代码来源:colorMapSelector.hpp

示例2:

/**
 * Respond to the text box changing.
 *
 * This function responds to the box changing by grabbing the value
 * from the text box and putting it in the parameter.
 */
void
ParamComboBoxEntry::changed (void)
{
    Glib::ustring data = this->get_active_text();
    _pref->set(data.c_str(), _doc, _node);
    if (_changeSignal != NULL) {
        _changeSignal->emit();
    }
}
开发者ID:AakashDabas,项目名称:inkscape,代码行数:15,代码来源:enum.cpp

示例3:

/** \brief  A function to respond to the value_changed signal from the
            adjustment.

    This function just grabs the value from the adjustment and writes
    it to the parameter.  Very simple, but yet beautiful.
*/
void
ParamFloatAdjustment::val_changed (void)
{
    //std::cout << "Value Changed to: " << this->get_value() << std::endl;
    _pref->set(this->get_value(), _doc, _node);
    if (_changeSignal != NULL) {
        _changeSignal->emit();
    }
    return;
}
开发者ID:loveq369,项目名称:DoonSketch,代码行数:16,代码来源:float.cpp

示例4:

/** \brief  Respond to the selected radiobutton changing

    This function responds to the radiobutton selection changing by grabbing the value
    from the text box and putting it in the parameter.
*/
void
ParamRadioButtonWdg::changed (void)
{
    if (this->get_active()) {
        Glib::ustring data = this->get_label();
        _pref->set(data.c_str(), _doc, _node);
    }
    if (_changeSignal != NULL) {
        _changeSignal->emit();
    }
}
开发者ID:wdmchaft,项目名称:DoonSketch,代码行数:16,代码来源:radiobutton.cpp

示例5: setControlSize

void ControlManagerImpl::setControlSize(int size, bool force)
{
    if ((size < 1) || (size > 7)) {
        g_warning("Illegal logical size set: %d", size);
    } else if (force || (size != _size)) {
        _size = size;

        for (std::vector<SPCanvasItem *>::iterator it = _itemList.begin(); it != _itemList.end(); ++it)
        {
            if (*it) {
                updateItem(*it);
            }
        }

        _sizeChangedSignal.emit();
    }
}
开发者ID:Drooids,项目名称:inkscape,代码行数:17,代码来源:control-manager.cpp

示例6: operator

 template<class... Args> XBT_ALWAYS_INLINE
 R operator()(Args&&... args) const
 {
   return sig_.emit(std::forward<Args>(args)...);
 }
开发者ID:adegomme,项目名称:simgrid,代码行数:5,代码来源:signal.hpp

示例7: context_switch

static int context_switch(int a, int b)
{
    ContextSwitch.emit(a, b);
    return 0;
}
开发者ID:9cat,项目名称:cyphesis,代码行数:5,代码来源:Interactive.cpp

示例8: gotCommand

void Interactive::gotCommand(char * cmd)
{
    CmdLine.emit(cmd);
}
开发者ID:9cat,项目名称:cyphesis,代码行数:4,代码来源:Interactive.cpp

示例9: sleep

void
Transmitter::run(void)
{
    sleep(2);
    m_slot.emit(m_origin); // Emit the signal
}
开发者ID:petesh,项目名称:sigc--2.0-example,代码行数:6,代码来源:example3.cpp

示例10: on_combobox_changed

      void on_combobox_changed()
      {
	::Gtk::TreeModel::iterator iter = _comboBox.get_active();
	if (iter) _mode = ((*iter)[m_Columns.m_col_id]);
	_signal_changed.emit();
      }
开发者ID:armando-2011,项目名称:DynamO,代码行数:6,代码来源:colorMapSelector.hpp

示例11: OnClickCancel

	void OnClickCancel() {
		onClickCancel.emit();
	}
开发者ID:johnuk89,项目名称:pioneer,代码行数:3,代码来源:GameMenuView.cpp

示例12: OnClickAction

	void OnClickAction() {
		onClickAction.emit(m_tentry->GetText());
	}
开发者ID:johnuk89,项目名称:pioneer,代码行数:3,代码来源:GameMenuView.cpp

示例13: h

WindowSettings::WindowSettings(Context* context)
        : Fl_Window(650, 300, _("Settings"))
{
    ctx = this->context = context;
    this->shouldSync = false;

    tab_selector = new Fl_Hold_Browser(10, 10, 200, h() - 20);
    tab_selector->color(context->configuration->background());
    tab_selector->color2(context->configuration->foreground());
    tab_selector->textcolor(context->configuration->textcolor());
    tab_selector->add(_("General"));
    tab_selector->add(_("Directories"));
    tab_selector->add(_("Network"));
#ifdef WIN32
    tab_selector->add(_("Language"));
#endif

    // TAB GENERAL
    tabs[0] = new Fl_Group(215, 10, w() - 225, h() - 20, _("General"));
    tabs[0]->labelsize(16);
    tabs[0]->align(FL_ALIGN_INSIDE | FL_ALIGN_TOP);
    tabs[0]->box(FL_UP_FRAME);
    tabs[0]->begin();

    button_lyrics = new KSP_Check_Button(220, 40, 120, 16,_("Display Lyrics"));
    button_lyrics->value(context->configuration->shouldFetchLyrics());
    button_lyrics->callback([](Fl_Widget*, void*) {
        bool lyrics = ctx->configuration->shouldFetchLyrics();
        ctx->configuration->shouldFetchLyrics(!lyrics);
        button_lyrics->value(!lyrics);
    });

    button_scroll_title = new KSP_Check_Button(220, 65, 120, 16, _("Scroll Title"));
    button_scroll_title->value(context->configuration->shouldScrollTitle());
    button_scroll_title->callback([](Fl_Widget*, void*) {
        bool scroll = ctx->configuration->shouldScrollTitle();
        ctx->configuration->shouldScrollTitle(!scroll);
        button_scroll_title->value(!scroll);
        if (scroll) SignalResetWindowTitle.emit();
    });

    button_background_color = new Fl_Button(220, 100, 16, 16, _("Background Color"));
    button_background_color->box(FL_DOWN_BOX);
    button_background_color->labelsize(12);
    button_background_color->clear_visible_focus();
    button_background_color->align(FL_ALIGN_RIGHT);
    button_background_color->color(context->configuration->background());
    button_background_color->callback([](Fl_Widget*, void*) {
        Fl_Color c = edit_color(button_background_color->color());
        ctx->configuration->background(c);
        SignalUpdateColors.emit();
    });

    button_selection_color = new Fl_Button(220, 125, 16, 16, _("Selection Color"));
    button_selection_color->box(FL_DOWN_BOX);
    button_selection_color->labelsize(12);
    button_selection_color->clear_visible_focus();
    button_selection_color->align(FL_ALIGN_RIGHT);
    button_selection_color->color(context->configuration->foreground());
    button_selection_color->callback([](Fl_Widget*, void*) {
        Fl_Color c = edit_color(button_selection_color->color());
        ctx->configuration->foreground(c);
        SignalUpdateColors.emit();
    });

    button_text_color = new Fl_Button(220, 150, 16, 16, _("Text Color"));
    button_text_color->box(FL_DOWN_BOX);
    button_text_color->labelsize(12);
    button_text_color->clear_visible_focus();
    button_text_color->align(FL_ALIGN_RIGHT);
    button_text_color->color(context->configuration->textcolor());
    button_text_color->callback([](Fl_Widget*, void*) {
        Fl_Color c = edit_color(button_text_color->color());
        ctx->configuration->textcolor(c);
        SignalUpdateColors.emit();
    });

    Fl_Button* button_default_colors = new Fl_Button(220, 175, 0, 22, _("Default Colors"));
    button_default_colors->labelsize(12);
    util_adjust_width(button_default_colors, 10);
    button_default_colors->clear_visible_focus();
    button_default_colors->callback([](Fl_Widget*, void*) {
        ctx->configuration->background(DEFAULT_BACKGROUND_COLOR);
        ctx->configuration->foreground(DEFAULT_FOREGROUND_COLOR);
        ctx->configuration->textcolor(DEFAULT_SELECTION_COLOR);
        SignalUpdateColors.emit();
    });

    tabs[0]->end();

    // TAB DIRECTORIES
    tabs[1] = new Fl_Group(215, 10, w() - 225, h() - 20, _("Directories"));
    tabs[1]->labelsize(16);
    tabs[1]->align(FL_ALIGN_INSIDE | FL_ALIGN_TOP);
    tabs[1]->box(FL_UP_FRAME);
    tabs[1]->begin();

    browser_directories = new Fl_Select_Browser(220, 40, w() - 235, 160, 0);
    browser_directories->type(FL_HOLD_BROWSER);
    browser_directories->color(context->configuration->background());
//.........这里部分代码省略.........
开发者ID:andreldm,项目名称:kissplayer,代码行数:101,代码来源:window_settings.cpp


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