void FindToolBar::openFindToolBar(OpenFlags flags) { installEventFilters(); FindToolBarPlaceHolder *holder = findToolBarPlaceHolder(); if (!holder) return; FindToolBarPlaceHolder *previousHolder = FindToolBarPlaceHolder::getCurrent(); if (previousHolder != holder) { if (previousHolder) previousHolder->setWidget(0); holder->setWidget(this); FindToolBarPlaceHolder::setCurrent(holder); } m_currentDocumentFind->acceptCandidate(); holder->setVisible(true); setVisible(true); // We do not want to change the text when we currently have the focus and user presses the // find shortcut // if (!focus || !toolBarHasFocus()) { if (flags & UpdateFindText) { QString text = m_currentDocumentFind->currentFindString(); if (!text.isEmpty()) setFindText(text); } if (flags & UpdateFocusAndSelect) setFocus(); if (flags & UpdateFindScope) m_currentDocumentFind->defineFindScope(); if (flags & UpdateHighlight) m_currentDocumentFind->highlightAll(getFindText(), effectiveFindFlags()); if (flags & UpdateFocusAndSelect) selectFindText(); }
FrmMinorStrata::FrmMinorStrata(RoleDef* inRoleDef, Sample* inSample, RuleChecker* ruleCheckerPtr, QWidget *parent, Qt::WFlags flags): PreviewTab(1, inRoleDef, inSample,tr("Stratum"), ruleCheckerPtr, parent, flags){ setupUi(this); installEventFilters(); viewMinorStrata=0; tRefMinorStrata=0; buttonGroup=0; mapper1=0; connect(pushNext, SIGNAL(clicked()), this, SLOT(next())); connect(pushPrevious, SIGNAL(clicked()), this, SLOT(goBack())); connect(toolButton, SIGNAL(clicked()), this, SLOT(onShowFrameDetails())); connect(this, SIGNAL(hideFrameDetails(bool)), this, SLOT(onHideFrameDetails())); initModels(); initUI(); initMappers(); }
FrmTrip::FrmTrip(RoleDef* inRoleDef, Sample* inSample, DateModel* inTDateTime, RuleChecker* ruleCheckerPtr, QWidget *parent, Qt::WFlags flags): PreviewTab(5,inRoleDef,inSample,inTDateTime,tr("Fishing Trip"), ruleCheckerPtr, parent, flags){ setupUi(this); blockCustomDateCtrls(); installEventFilters(); connect(pushNext, SIGNAL(clicked()), this, SLOT(next())); connect(pushPrevious, SIGNAL(clicked()), this, SLOT(goBack())); connect(this, SIGNAL(blockCatchUISignals(const bool)), catchInputCtrl, SIGNAL(blockWidgetsSignals(const bool))); tTrips=0; tRefGears=0; tTripGears=0; tRefZones=0; tTripZones=0; viewTrips=0; mapper1=0; multiModelI=0; multiModelI2=0; mapperStartDt=0; mapperEndDt=0; nullDelegate=0; initModels(); initUI(); initMappers(); }
FrmCell::FrmCell(RoleDef* inRoleDef, Sample* inSample, RuleChecker* ruleCheckerPtr, QWidget *parent, Qt::WFlags flags): PreviewTab(2, inRoleDef,inSample,tr("Cell"), ruleCheckerPtr, parent, flags){ setupUi(this); installEventFilters(); connect(pushNext, SIGNAL(clicked()), this, SLOT(next())); connect(pushPrevious, SIGNAL(clicked()), this, SLOT(goBack())); connect(toolButton, SIGNAL(clicked()), this, SLOT(onShowFrameDetails())); connect(this, SIGNAL(hideFrameDetails(bool)), this, SLOT(onHideFrameDetails())); tSampCell=0; viewCell=0; mapper1=0; initModels(); initUI(); }
void TextInfo::installEventFilters() { if(!m_doc) { return; } QList<KTextEditor::View*> views = m_doc->views(); for(QList<KTextEditor::View*>::iterator i = views.begin(); i != views.end(); ++i) { installEventFilters(*i); } }
KTextEditor::View* TextInfo::createView(QWidget *parent, const char* /* name */) { if(!m_doc) { return NULL; } KTextEditor::View *view = m_doc->createView(parent); installEventFilters(view); installSignalConnections(view); registerCodeCompletionModels(view); connect(view, SIGNAL(destroyed(QObject*)), this, SLOT(slotViewDestroyed(QObject*))); return view; }
void QDesignerToolBar::doInsertWidget( const QPoint &p ) { if ( formWindow != MainWindow::self->formWindow() ) return; calcIndicatorPos( p ); QWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE ); installEventFilters( w ); MainWindow::self->formWindow()->insertWidget( w, TRUE ); QDesignerAction *a = new QDesignerAction( w, parent() ); int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; if ( !insertAnchor ) index = 0; AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( tr( "Add Widget '%1' to Toolbar '%2'" ). arg( w->name() ).arg( caption() ), formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); MainWindow::self->resetTool(); }
FrmCatch::FrmCatch(RoleDef* inRoleDef, Sample* inSample, DateModel* inTDateTime, RuleChecker* ruleCheckerPtr, QWidget *parent, Qt::WFlags flags): PreviewTab(7, inRoleDef,inSample,inTDateTime,tr("Catch"), ruleCheckerPtr,parent, flags) { setupUi(this); installEventFilters(); connect(pushPrevious, SIGNAL(clicked()), this, SLOT(goBack())); connect(this, SIGNAL(blockCatchUISignals(const bool)), catchInputCtrl, SIGNAL(blockWidgetsSignals(const bool))); tCatch=0; viewCatch=0; mapper1=0; nullDelegate=0; initModels(); initUI(); initMappers(); }
void TextInfo::setDocument(KTextEditor::Document *doc) { KILE_DEBUG_MAIN << "===void TextInfo::setDoc(KTextEditor::Document *doc)==="; if(m_doc == doc) { return; } detach(); if(doc) { m_doc = doc; m_documentContents.clear(); connect(m_doc, SIGNAL(documentNameChanged(KTextEditor::Document*)), this, SLOT(slotFileNameChanged())); connect(m_doc, SIGNAL(documentUrlChanged(KTextEditor::Document*)), this, SLOT(slotFileNameChanged())); connect(m_doc, SIGNAL(completed()), this, SLOT(slotCompleted())); connect(m_doc, SIGNAL(modifiedChanged(KTextEditor::Document*)), this, SLOT(makeDirtyIfModified())); // this could be a KatePart bug, and as "work-around" we manually set the highlighting mode again connect(m_doc, SIGNAL(completed()), this, SLOT(activateDefaultMode())); setMode(m_defaultMode); installEventFilters(); registerCodeCompletionModels(); } }