void ShortcutLineEdit::focusInEvent(QFocusEvent *e) { // Select the contents so that they are replaced on the next edit selectAll(); emit focusChanged(false); QLineEdit::focusInEvent(e); }
bool QgsFocusWatcher::eventFilter( QObject *, QEvent *event ) { switch ( event->type() ) { case QEvent::FocusIn: emit focusChanged( true ); emit focusIn(); break; case QEvent::FocusOut: emit focusChanged( false ); emit focusOut(); break; default: break; } return false; }
void Plugin::setFocused(ViewerPtr viewer, const bool focused) { if ( mIsFocused != focused ) { mIsFocused = focused; focusChanged(viewer); } }
void InputContextModule::setFocusWidget(QWidget *widget) { m_focusWidget = widget; if (!m_focusWidget) setVisible(false); emit focusChanged(); }
void GfxCanvas::setFocused(GfxCanvasItem *f) { if(_focused == f) return; if(_focused) _focused->focusOut(); _focused = f; if(_focused) _focused->focusIn(); emit focusChanged(f); }
void WebApplicationWindow::notifyAppAboutFocusState(bool focus) { qDebug() << "DEBUG: We become" << (focus ? "focused" : "unfocused"); QString action = focus ? "stageActivated" : "stageDeactivated"; emit focusChanged(); if (mTrustScope == TrustScopeSystem) executeScript(QString("if (window.Mojo && Mojo.%1) Mojo.%1()").arg(action)); mApplication->changeActivityFocus(focus); }
//============================================================================== // Focus In Event //============================================================================== void FileListWidget::focusInEvent(QFocusEvent* aEvent) { QQuickWidget::focusInEvent(aEvent); // Check If Focused if (!focused) { //qDebug() << "FileListWidget::focusInEvent"; // Set Focused focused = true; // Emit focus Changed Signal emit focusChanged(focused); // Grab Keyboard - Not Sure WHY THE F**K Do I have to do this for some time now X ( grabKeyboard(); } }
//============================================================================== // Focus Out Event //============================================================================== void FileListWidget::focusOutEvent(QFocusEvent* aEvent) { QQuickWidget::focusOutEvent(aEvent); // Check If Focused if (focused) { //qDebug() << "FileListWidget::focusOutEvent"; // Set Focused focused = false; // Emit focus Changed Signal emit focusChanged(focused); // Release Keyboard releaseKeyboard(); } }
void MInputContextConnection::updateWidgetInformation( unsigned int connectionId, const QMap<QString, QVariant> &stateInfo, bool handleFocusChange) { QMap<QString, QVariant> oldState = widgetState; widgetState = stateInfo; #ifndef Q_WS_WIN if (handleFocusChange) { Q_EMIT focusChanged(winId()); } #endif Q_EMIT widgetStateChanged(connectionId, widgetState, oldState, handleFocusChange); }
QIListView::QIListView (QWidget *aParent /* = 0 */) :QListView (aParent) { /* Track if the application lost the focus */ #if MAC_LEOPARD_STYLE connect (QCoreApplication::instance(), SIGNAL (focusChanged (QWidget *, QWidget *)), this, SLOT (focusChanged (QWidget *, QWidget *))); /* 1 pixel line frame */ setMidLineWidth (1); setLineWidth (0); setFrameShape (QFrame::Box); focusChanged (NULL, qApp->focusWidget()); /* Nesty hack to disable the focus rect on the list view. This interface * may change at any time! */ static_cast<QMacStyle *> (style())->setFocusRectPolicy (this, QMacStyle::FocusDisabled); #endif /* MAC_LEOPARD_STYLE */ }
void eWidget::setFocus(eWidget *newfocus) { if (parent && parent->parent) return getTLW()->setFocus(newfocus); if (focus == newfocus) return; if (focus) focus->event(eWidgetEvent(eWidgetEvent::lostFocus)); focus=newfocus; if (focus) focus->event(eWidgetEvent(eWidgetEvent::gotFocus)); _focusList.setCurrent(focus); /* emit */ focusChanged(focus); }
void Item::setFocus(bool enabled) { unsigned state = m_state; if (enabled) m_state |= HasFocus; else m_state &= ~HasFocus; if (m_state != state) { assert(window()); if (enabled) { if (window()->m_focusItem) window()->m_focusItem->setFocus(false); window()->m_focusItem = this; } else { if (window()->m_focusItem == this) window()->m_focusItem = nullptr; } focusChanged(); } }
QStyleItem::QStyleItem(QDeclarativeItem *parent) : QDeclarativeItem(parent), m_dummywidget(0), m_styleoption(0), m_type(Undefined), m_sunken(false), m_raised(false), m_active(true), m_selected(false), m_focus(false), m_on(false), m_horizontal(true), m_sharedWidget(false), m_minimum(0), m_maximum(100), m_value(0), m_paintMargins(0) { setFlag(QGraphicsItem::ItemHasNoContents, false); setCacheMode(QGraphicsItem::DeviceCoordinateCache); setSmooth(true); connect(this, SIGNAL(infoChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(onChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(selectedChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(activeChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(textChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(activeChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(raisedChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(sunkenChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(hoverChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(maximumChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(minimumChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(valueChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(horizontalChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(activeControlChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(focusChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(activeControlChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(elementTypeChanged()), this, SLOT(updateItem())); }
int Board::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: pauseChecked((*reinterpret_cast< bool(*)>(_a[1]))); break; case 1: pauseAvailable((*reinterpret_cast< bool(*)>(_a[1]))); break; case 2: finished((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< int(*)>(_a[4]))); break; case 3: newGame(); break; case 4: loadGame(); break; case 5: saveGame(); break; case 6: pauseGame((*reinterpret_cast< bool(*)>(_a[1]))); break; case 7: loadSettings(); break; case 8: focusChanged(); break; case 9: updateStatusMessage(); break; case 10: move(); break; default: ; } _id -= 11; } return _id; }
void NMainWindow::changeEvent(QEvent *event) { QWidget::changeEvent(event); emit focusChanged(isActiveWindow()); if (windowFlags() & Qt::FramelessWindowHint) { setAttribute(Qt::WA_Hover, true); return; } if (event->type() == QEvent::WindowStateChange) { QWindowStateChangeEvent *stateEvent = static_cast<QWindowStateChangeEvent *>(event); if (stateEvent->oldState() == Qt::WindowNoState && isMaximized()) { if (!m_unmaximizedSize.isValid()) { m_unmaximizedPos = pos(); m_unmaximizedSize = size(); } } else if (!isMaximized() && !isMinimized() && !m_isFullScreen) { m_unmaximizedSize = QSize(); m_unmaximizedPos = QPoint(); } } }
void LauncherView::focusInEvent(QFocusEvent* event) { QDeclarativeView::focusInEvent(event); Q_EMIT focusChanged(true); }
void CalendarTreeView::focusOutEvent ( QFocusEvent * event ) { //kDebug(planDbg()); TreeViewBase::focusInEvent( event ); emit focusChanged(); }
void LauncherView::focusOutEvent(QFocusEvent* event) { QDeclarativeView::focusOutEvent(event); Q_EMIT focusChanged(false); }
void CalendarTreeView::focusOutEvent ( QFocusEvent * event ) { //debugPlan; TreeViewBase::focusInEvent( event ); emit focusChanged(); }
void DocumentEditor::focusOutEvent(QFocusEvent *event_) { ScintillaExt::focusOutEvent(event_); emit focusChanged(false); event_->accept(); }
bool ptGraphicsSceneEmitter::ConnectFocusChanged(const QObject* receiver, const char *method) { ptGraphicsSceneEmitter* Instance = GetInstance(); return Instance->connect(Instance, SIGNAL(focusChanged()), receiver, method); }
int eWidget::eventHandler(const eWidgetEvent &evt) { switch (evt.type) { case eWidgetEvent::childChangedHelpText: /* emit */ focusChanged(focus); // faked focusChanged Signal to the Statusbar break; case eWidgetEvent::evtAction: if (evt.action == shortcut && isVisible()) (shortcutFocusWidget?shortcutFocusWidget:this)-> event(eWidgetEvent(eWidgetEvent::evtShortcut)); else if (evt.action == &i_focusActions->up) focusNext(focusDirPrev); else if (evt.action == &i_focusActions->down) focusNext(focusDirNext); else if (evt.action == &i_focusActions->left) focusNext(focusDirPrev); else if (evt.action == &i_focusActions->right) focusNext(focusDirNext); else if (evt.action == &i_cursorActions->help) { int wasvisible=state&stateShow; if (wasvisible) hide(); /* emit */ showHelp( &actionHelpList, helpID ); if (wasvisible) show(); } else return 0; return 1; case eWidgetEvent::evtKey: { eActionPrioritySet prio; findAction(prio, *evt.key, this); if (focus && (focus != this)) focus->findAction(prio, *evt.key, focus); for (actionMapList::iterator i = globalActions.begin(); i != globalActions.end(); ++i) { const std::set<eString> &styles=eActionMapList::getInstance()->getCurrentStyles(); for (std::set<eString>::const_iterator si(styles.begin()); si != styles.end(); ++si) (*i)->findAction(prio, *evt.key, 0, *si); } for (eActionPrioritySet::iterator i(prio.begin()); i != prio.end(); ++i) { if (i->first) { if (((eWidget*)i->first)->event(eWidgetEvent(eWidgetEvent::evtAction, i->second))) break; } else { (const_cast<eAction*>(i->second))->handler(); // only useful for global actions break; } } if (focus) { /* Action not found, try to use old Keyhandle */ int c = evt.key->producer->getKeyCompatibleCode(*evt.key); if (c != -1) { if (evt.key->flags & eRCKey::flagBreak) focus->keyUp(c); else focus->keyDown(c); } } return 1; break; } case eWidgetEvent::gotFocus: gotFocus(); break; case eWidgetEvent::lostFocus: lostFocus(); break; case eWidgetEvent::changedSize: case eWidgetEvent::changedFont: case eWidgetEvent::changedPosition: case eWidgetEvent::changedPixmap: invalidate(); break; case eWidgetEvent::evtShortcut: setFocus(this); break; case eWidgetEvent::wantClose: /* if (in_loop==0) eFatal("attempt to close non-execing widget");*/ if (in_loop==1) // nur wenn das ne echte loop ist { in_loop=-1; eApp->exit_loop(); } result=evt.parameter; break; default: break; } return 0; }
void ShortcutLineEdit::focusOutEvent(QFocusEvent *e) { emit focusChanged(true); QLineEdit::focusOutEvent(e); }
void CodeEdit::focusInEvent(QFocusEvent *event) { QPlainTextEdit::focusInEvent(event); emit focusChanged(true); }
void CodeEdit::focusOutEvent(QFocusEvent *event) { QPlainTextEdit::focusOutEvent(event); emit focusChanged(false); }
void QTextEditPlus::focusInEvent(QFocusEvent *e) { emit(focusChanged(true)); QLineEdit::focusInEvent(e); }
void Camera::resetCapabilities() { QtCamDevice *dev = device(); delete m_zoom; m_zoom = new Zoom(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_zoom, SLOT(prepareForDeviceChange())); emit zoomChanged(); delete m_flash; m_flash = new Flash(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_flash, SLOT(prepareForDeviceChange())); emit flashChanged(); delete m_scene; m_scene = new Scene(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_scene, SLOT(prepareForDeviceChange())); emit sceneChanged(); delete m_evComp; m_evComp = new EvComp(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_evComp, SLOT(prepareForDeviceChange())); emit evCompChanged(); delete m_whiteBalance; m_whiteBalance = new WhiteBalance(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_whiteBalance, SLOT(prepareForDeviceChange())); emit whiteBalanceChanged(); delete m_colorTone; m_colorTone = new ColorTone(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_colorTone, SLOT(prepareForDeviceChange())); emit colorToneChanged(); delete m_iso; m_iso = new Iso(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_iso, SLOT(prepareForDeviceChange())); emit isoChanged(); delete m_exposure; m_exposure = new Exposure(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_exposure, SLOT(prepareForDeviceChange())); emit exposureChanged(); delete m_aperture; m_aperture = new Aperture(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_aperture, SLOT(prepareForDeviceChange())); emit apertureChanged(); delete m_noiseReduction; m_noiseReduction = new NoiseReduction(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_noiseReduction, SLOT(prepareForDeviceChange())); emit noiseReductionChanged(); delete m_flickerReduction; m_flickerReduction = new FlickerReduction(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_flickerReduction, SLOT(prepareForDeviceChange())); emit flickerReductionChanged(); delete m_focus; m_focus = new Focus(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_focus, SLOT(prepareForDeviceChange())); emit focusChanged(); delete m_autoFocus; m_autoFocus = new AutoFocus(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_autoFocus, SLOT(prepareForDeviceChange())); emit autoFocusChanged(); delete m_roi; m_roi = new Roi(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_roi, SLOT(prepareForDeviceChange())); emit roiChanged(); delete m_videoMute; m_videoMute = new VideoMute(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_videoMute, SLOT(prepareForDeviceChange())); emit videoMuteChanged(); delete m_videoTorch; m_videoTorch = new VideoTorch(dev, this); QObject::connect(this, SIGNAL(prepareForDeviceChange()), m_videoTorch, SLOT(prepareForDeviceChange())); emit videoTorchChanged(); }
void KNCollectionView::focusOutEvent(QFocusEvent *e) { QListView::focusOutEvent(e); emit focusChanged(e); }
void QTextEditPlus::focusOutEvent(QFocusEvent *e) { emit(focusChanged(false)); QLineEdit::focusOutEvent(e); }