コード例 #1
0
ファイル: keyboard_applet.cpp プロジェクト: KDE/kde-workspace
void KeyboardApplet::destroy()
{
    xEventNotifier.stop();
    disconnect(&xEventNotifier, SIGNAL(layoutMapChanged()), this, SLOT(layoutChanged()));
    disconnect(&xEventNotifier, SIGNAL(layoutChanged()), this, SLOT(layoutChanged()));
    Applet::destroy();
}
コード例 #2
0
ファイル: x11_helper.cpp プロジェクト: ypid/ktouch
bool XEventNotifier::processXkbEvents(XEvent* event)
{
	if( XEventNotifier::isGroupSwitchEvent(event) ) {
		emit(layoutChanged());
	}
	else if( XEventNotifier::isLayoutSwitchEvent(event) ) {
		emit(layoutMapChanged());
	}
	return true;
}
コード例 #3
0
ファイル: keyboard_applet.cpp プロジェクト: KDE/kde-workspace
void KeyboardApplet::init()
{
    Applet::init();

    readConfig();
    connect(&xEventNotifier, SIGNAL(layoutChanged()), this, SLOT(layoutChanged()));
    connect(&xEventNotifier, SIGNAL(layoutMapChanged()), this, SLOT(layoutChanged()));
    xEventNotifier.start();

    layoutChanged();
}
コード例 #4
0
bool XEventNotifier::processXkbEvents(xcb_generic_event_t* event)
{
	_xkb_event *xkbevt = reinterpret_cast<_xkb_event *>(event);
	if( XEventNotifier::isGroupSwitchEvent(xkbevt) ) {
//		kDebug() << "group switch event";
		emit(layoutChanged());
	}
	else if( XEventNotifier::isLayoutSwitchEvent(xkbevt) ) {
//		kDebug() << "layout switch event";
		emit(layoutMapChanged());
	}
	return true;
}