本文整理汇总了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();
}
示例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();
}
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例6: operator
template<class... Args> XBT_ALWAYS_INLINE
R operator()(Args&&... args) const
{
return sig_.emit(std::forward<Args>(args)...);
}
示例7: context_switch
static int context_switch(int a, int b)
{
ContextSwitch.emit(a, b);
return 0;
}
示例8: gotCommand
void Interactive::gotCommand(char * cmd)
{
CmdLine.emit(cmd);
}
示例9: sleep
void
Transmitter::run(void)
{
sleep(2);
m_slot.emit(m_origin); // Emit the signal
}
示例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();
}
示例11: OnClickCancel
void OnClickCancel() {
onClickCancel.emit();
}
示例12: OnClickAction
void OnClickAction() {
onClickAction.emit(m_tentry->GetText());
}
示例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());
//.........这里部分代码省略.........