int QmaxLineEdit::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QLineEdit::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: focussed((*reinterpret_cast< bool(*)>(_a[1]))); break; case 1: focussed((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } _id -= 2; } return _id; }
void AuthorEditor::focusInEvent(QFocusEvent *e) { QLineEdit::focusInEvent(e); setStyleSheet(activeColor); this->setCursor(Qt::ArrowCursor); emit(focussed(true)); }
void WFormWidget::setEmptyText(const WString& emptyText) { emptyText_ = emptyText; WApplication* app = WApplication::instance(); const WEnvironment& env = app->environment(); if (env.ajax()) { if (!emptyText_.empty()) { if (!flags_.test(BIT_JS_OBJECT)) defineJavaScript(); else updateEmptyText(); if (!removeEmptyText_) { removeEmptyText_ = new JSlot(this); focussed().connect(*removeEmptyText_); blurred().connect(*removeEmptyText_); keyWentDown().connect(*removeEmptyText_); std::string jsFunction = "function(obj, event) {" """jQuery.data(" + jsRef() + ", 'obj').applyEmptyText();" "}"; removeEmptyText_->setJavaScript(jsFunction); } } else { delete removeEmptyText_; removeEmptyText_ = 0; } } else { setToolTip(emptyText); } }
void WLineEdit::defineJavaScript() { if (javaScriptDefined_) return; javaScriptDefined_ = true; WApplication *app = WApplication::instance(); LOAD_JAVASCRIPT(app, "js/WLineEdit.js", "WLineEdit", wtjs1); std::u32string space; space += spaceChar_; std::string jsObj = "new " WT_CLASS ".WLineEdit(" + app->javaScriptClass() + "," + jsRef() + "," + WWebWidget::jsStringLiteral(mask_) + "," + WWebWidget::jsStringLiteral(raw_) + "," + WWebWidget::jsStringLiteral(displayContent_) + "," + WWebWidget::jsStringLiteral(case_) + "," + WWebWidget::jsStringLiteral(space) + "," + (inputMaskFlags_.test(InputMaskFlag::KeepMaskWhileBlurred) ? "0x1" : "0x0") + ");"; setJavaScriptMember(" WLineEdit", jsObj); #ifdef WT_CNOR EventSignalBase& b = mouseMoved(); EventSignalBase& c = keyWentDown(); #endif connectJavaScript(keyWentDown(), "keyDown"); connectJavaScript(keyPressed(), "keyPressed"); connectJavaScript(focussed(), "focussed"); connectJavaScript(blurred(), "blurred"); connectJavaScript(clicked(), "clicked"); }
//******************************************************* //* Focus event. The editor has lost focus //******************************************************* void TagEditorNewTag::focusOutEvent(QFocusEvent *e) { this->setCursor(Qt::PointingHandCursor); QLineEdit::focusOutEvent(e); setStyleSheet(inactiveColor); emit(focussed(false)); }
//******************************************************* //* Focus event. The editor has gained focus //******************************************************* void TagEditorNewTag::focusInEvent(QFocusEvent *e) { this->setCursor(Qt::ArrowCursor); QLineEdit::focusInEvent(e); setStyleSheet(activeColor); emit(focussed(true)); }
// Focus is lost. Set the colors back and check for text changed void NTitleEditor::focusOutEvent(QFocusEvent *e) { QLineEdit::focusOutEvent(e); setStyleSheet(inactiveColor); titleChanged(cleanupTitle(text())); emit(focussed(false)); }
// Intercepts focus events void GraphicsCanvas::focusInEvent(QFocusEvent *pEvent) { QWidget::focusInEvent(pEvent); if (this->hasFocus()) Q_EMIT focussed(this); }
void AuthorEditor::focusOutEvent(QFocusEvent *e) { QLineEdit::focusOutEvent(e); this->setCursor(Qt::PointingHandCursor); setStyleSheet(inactiveColor); textModified(text()); emit(focussed(false)); }
//******************************************************* //* Focus event. The editor has lost focus //******************************************************* void TagEditorNewTag::focusOutEvent(QFocusEvent *e) { QLOG_TRACE_IN() << typeid(*this).name(); this->setCursor(Qt::PointingHandCursor); QLineEdit::focusOutEvent(e); setStyleSheet(inactiveColor); emit(focussed(false)); QLOG_TRACE_OUT() << typeid(*this).name(); }
//******************************************************* //* Focus event. The editor has gained focus //******************************************************* void TagEditorNewTag::focusInEvent(QFocusEvent *e) { QLOG_TRACE_IN() << typeid(*this).name(); this->setCursor(Qt::ArrowCursor); QLineEdit::focusInEvent(e); setStyleSheet(activeColor); emit(focussed(true)); QLOG_TRACE_OUT() << typeid(*this).name(); }
void masterPanelCell::focusOutEvent(QFocusEvent *e) { QLineEdit::focusOutEvent(e); if(myType==0) emit(focussed(false)); }
void masterPanelCell::focusInEvent(QFocusEvent *e) { QLineEdit::focusInEvent(e); if(myType==0) emit(focussed(true)); }
// We now have focus. Change the appearance void NTitleEditor::focusInEvent(QFocusEvent *e) { QLineEdit::focusInEvent(e); setStyleSheet(activeColor); emit(focussed(true)); }