本文整理汇总了C++中sigc::connection::disconnect方法的典型用法代码示例。如果您正苦于以下问题:C++ connection::disconnect方法的具体用法?C++ connection::disconnect怎么用?C++ connection::disconnect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sigc::connection
的用法示例。
在下文中一共展示了connection::disconnect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mesh_toolbox_watch_ec
static void mesh_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
{
static sigc::connection c_selection_changed;
static sigc::connection c_selection_modified;
static sigc::connection c_subselection_changed;
static sigc::connection c_defs_release;
static sigc::connection c_defs_modified;
if (SP_IS_MESH_CONTEXT(ec)) {
// connect to selection modified and changed signals
Inkscape::Selection *selection = desktop->getSelection();
SPDocument *document = desktop->getDocument();
c_selection_changed = selection->connectChanged(sigc::bind(sigc::ptr_fun(&ms_tb_selection_changed), holder));
c_selection_modified = selection->connectModified(sigc::bind(sigc::ptr_fun(&ms_tb_selection_modified), holder));
c_subselection_changed = desktop->connectToolSubselectionChanged(sigc::bind(sigc::ptr_fun(&ms_drag_selection_changed), holder));
c_defs_release = document->getDefs()->connectRelease(sigc::bind<1>(sigc::ptr_fun(&ms_defs_release), holder));
c_defs_modified = document->getDefs()->connectModified(sigc::bind<2>(sigc::ptr_fun(&ms_defs_modified), holder));
ms_tb_selection_changed(selection, holder);
} else {
if (c_selection_changed)
c_selection_changed.disconnect();
if (c_selection_modified)
c_selection_modified.disconnect();
if (c_subselection_changed)
c_subselection_changed.disconnect();
if (c_defs_release)
c_defs_release.disconnect();
if (c_defs_modified)
c_defs_modified.disconnect();
}
}
示例2:
~WindowVXPrivate()
{
shState->texPool().release(base.tex);
cursorRectCon.disconnect();
toneCon.disconnect();
prepareCon.disconnect();
}
示例3: ClearFocus
void Screen::ClearFocus()
{
if (!focusedWidget) return;
_focusedWidgetOnDelete.disconnect();
focusedWidget = 0;
SDL_EnableKeyRepeat(0, 0); // disable key repeat
}
示例4: stopSimulationRequested
void stopSimulationRequested()
{
if (runner.isRunning())
runner.interrupt();
if (!progressTimer.empty())
progressTimer.disconnect();
updateProgressBar();
}
示例5: close
virtual bool close()
{
monitorOutput.close();
m_timer.disconnect();
fprintf(stdout,"done...\n");
yarp::os::exit(1);
return true;
}
示例6: updateSrcRectCon
void updateSrcRectCon()
{
/* Cut old connection */
srcRectCon.disconnect();
/* Create new one */
srcRectCon = srcRect->valueChanged.connect
(sigc::mem_fun(this, &SpritePrivate::onSrcRectChange));
}
示例7: SetFocused
void Screen::SetFocused(Widget *w)
{
if (focusedWidget) {
_focusedWidgetOnDelete.disconnect();
}
_focusedWidgetOnDelete = w->onDelete.connect(sigc::ptr_fun(&Screen::OnDeleteFocusedWidget));
focusedWidget = w;
}
示例8: if
void
Simple::animate_toggled()
{
static sigc::connection timer;
bool active = m_animate.get_active();
if (active && !timer.connected())
timer = Glib::signal_timeout().connect(sigc::mem_fun(*this, &Simple::animate_step), ANIMATE_FRAME_DELAY);
else if (!active && timer.connected())
timer.disconnect();
}
示例9:
static void box3d_toolbox_check_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
{
static sigc::connection changed;
if (SP_IS_BOX3D_CONTEXT(ec)) {
changed = sp_desktop_selection(desktop)->connectChanged(sigc::bind(sigc::ptr_fun(box3d_toolbox_selection_changed), holder));
box3d_toolbox_selection_changed(sp_desktop_selection(desktop), holder);
} else {
if (changed)
changed.disconnect();
}
}
示例10: arc_toolbox_check_ec
static void arc_toolbox_check_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
{
static sigc::connection changed;
if (SP_IS_ARC_CONTEXT(ec)) {
changed = desktop->getSelection()->connectChanged(sigc::bind(sigc::ptr_fun(sp_arc_toolbox_selection_changed), holder));
sp_arc_toolbox_selection_changed(desktop->getSelection(), holder);
} else {
if (changed)
changed.disconnect();
}
}
示例11: on_thread_back_clicked
void on_thread_back_clicked() {
///To be run when the back button is clicked while viewing a thread
boardView();
Gtk::TreeView *threadlist = 0;
pWebKitView = WEBKIT_WEB_VIEW (webkit_web_view_new ());
Gtk::ScrolledWindow *imgview = 0;
builder->get_widget("scrolledwindow3", imgview);
imgview->set_visible(true);
imgview->show();
gtk_container_add (GTK_CONTAINER (imgview->gobj()), GTK_WIDGET (pWebKitView));
webkit_web_view_load_uri(pWebKitView, "about:blank");
webkit_web_view_set_zoom_level(pWebKitView, true);
gtk_widget_set_can_focus(GTK_WIDGET(pWebKitView), true);
gtk_widget_show(GTK_WIDGET(pWebKitView));
builder->get_widget("treeview2", threadlist);
Glib::RefPtr<Gtk::TreeSelection> thread_selection = threadlist->get_selection();
thread_selection->signal_changed().connect(sigc::bind<Glib::RefPtr<Gtk::TreeSelection>, WebKitWebView*>(sigc::ptr_fun(&on_selection_changed), thread_selection, pWebKitView));
POST_CLICK_CONNECT.disconnect();
POST_REFRESH_CONNECT.disconnect();
}
示例12: gradient_toolbox_check_ec
/**
* Checks the current tool and connects gradient aux toolbox signals if it happens to be the gradient tool.
* Called every time the current tool changes by signal emission.
*/
static void gradient_toolbox_check_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
{
static sigc::connection connChanged;
static sigc::connection connModified;
static sigc::connection connSubselectionChanged;
static sigc::connection connDefsRelease;
static sigc::connection connDefsModified;
if (SP_IS_GRADIENT_CONTEXT(ec)) {
Inkscape::Selection *selection = sp_desktop_selection(desktop);
SPDocument *document = sp_desktop_document(desktop);
// connect to selection modified and changed signals
connChanged = selection->connectChanged(sigc::bind(sigc::ptr_fun(&gr_tb_selection_changed), holder));
connModified = selection->connectModified(sigc::bind(sigc::ptr_fun(&gr_tb_selection_modified), holder));
connSubselectionChanged = desktop->connectToolSubselectionChanged(sigc::bind(sigc::ptr_fun(&gr_drag_selection_changed), holder));
// Is this necessary? Couldn't hurt.
gr_tb_selection_changed(selection, holder);
// connect to release and modified signals of the defs (i.e. when someone changes gradient)
connDefsRelease = document->getDefs()->connectRelease(sigc::bind<1>(sigc::ptr_fun(&gr_defs_release), GTK_WIDGET(holder)));
connDefsModified = document->getDefs()->connectModified(sigc::bind<2>(sigc::ptr_fun(&gr_defs_modified), GTK_WIDGET(holder)));
} else {
if (connChanged)
connChanged.disconnect();
if (connModified)
connModified.disconnect();
if (connSubselectionChanged)
connSubselectionChanged.disconnect();
if (connDefsRelease)
connDefsRelease.disconnect();
if (connDefsModified)
connDefsModified.disconnect();
}
}
示例13: rect_toolbox_watch_ec
static void rect_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
{
static sigc::connection changed;
// use of dynamic_cast<> seems wrong here -- we just need to check the current tool
if (dynamic_cast<Inkscape::UI::Tools::RectTool *>(ec)) {
Inkscape::Selection *sel = desktop->getSelection();
changed = sel->connectChanged(sigc::bind(sigc::ptr_fun(sp_rect_toolbox_selection_changed), holder));
// Synthesize an emission to trigger the update
sp_rect_toolbox_selection_changed(sel, holder);
} else {
if (changed) {
changed.disconnect();
purge_repr_listener(NULL, holder);
}
}
}
示例14:
~ViewportPrivate()
{
rectCon.disconnect();
}
示例15:
~PlanePrivate()
{
prepareCon.disconnect();
}