diff options
Diffstat (limited to 'kexi/main/keximainwindowimpl.cpp')
-rw-r--r-- | kexi/main/keximainwindowimpl.cpp | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index a2cf0e0c..795ddd53 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -242,7 +242,7 @@ KexiMainWindowImpl::KexiMainWindowImpl() d->config = kapp->config(); if ( !initialGeometrySet() ) { - int scnum = TQApplication::desktop()->screenNumber(tqparentWidget()); + int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); d->config->setGroup("MainWindow"); TQSize s ( d->config->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()), 700 ), @@ -348,7 +348,7 @@ KexiMainWindowImpl::KexiMainWindowImpl() m_pTaskBar->setCaption(i18n("Task Bar")); //js TODO: move this to KMDIlib // if (!userMode()) { - tqinvalidateActions(); + invalidateActions(); d->timer.singleShot(0,this,TQT_SLOT(slotLastActions())); // } @@ -1112,13 +1112,13 @@ void KexiMainWindowImpl::initActions() acat->addAction("scriptpart_create", Kexi::NoActionCategory); } -void KexiMainWindowImpl::tqinvalidateActions() +void KexiMainWindowImpl::invalidateActions() { - tqinvalidateProjectWideActions(); - tqinvalidateSharedActions(); + invalidateProjectWideActions(); + invalidateSharedActions(); } -void KexiMainWindowImpl::tqinvalidateSharedActions(TQObject *o) +void KexiMainWindowImpl::invalidateSharedActions(TQObject *o) { //TODO: enabling is more complex... /* d->action_edit_cut->setEnabled(true); @@ -1127,21 +1127,21 @@ void KexiMainWindowImpl::tqinvalidateSharedActions(TQObject *o) if (!o) o = TQT_TQOBJECT(focusWindow()); - KexiSharedActionHost::tqinvalidateSharedActions(o); + KexiSharedActionHost::invalidateSharedActions(o); } -void KexiMainWindowImpl::tqinvalidateSharedActions() +void KexiMainWindowImpl::invalidateSharedActions() { - tqinvalidateSharedActions(0); + invalidateSharedActions(0); } // unused, I think -void KexiMainWindowImpl::tqinvalidateSharedActionsLater() +void KexiMainWindowImpl::invalidateSharedActionsLater() { - TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(tqinvalidateSharedActions())); + TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(invalidateSharedActions())); } -void KexiMainWindowImpl::tqinvalidateProjectWideActions() +void KexiMainWindowImpl::invalidateProjectWideActions() { // stateChanged("project_opened",d->prj ? StateNoReverse : StateReverse); @@ -1234,7 +1234,7 @@ void KexiMainWindowImpl::tqinvalidateProjectWideActions() d->propEditorTabWidget->setEnabled(d->prj); } -void KexiMainWindowImpl::tqinvalidateViewModeActions() +void KexiMainWindowImpl::invalidateViewModeActions() { if (d->curDialog) { //update toggle action @@ -1341,7 +1341,7 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData) initNavigator(); Kexi::recentProjects().addProjectData( newProjectData ); updateReadOnlyState(); - tqinvalidateActions(); + invalidateActions(); // d->disableErrorMessages = true; enableMessages( false ); @@ -1556,8 +1556,8 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater() d->updatePropEditorVisibility(d->curDialog ? d->curDialog->currentViewMode() : 0); #if defined(KDOCKWIDGET_P) if (d->propEditor) { - KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget(); - KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); + KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); if(ds) ds->setSeparatorPosInPercent(d->config->readNumEntry("RightDockPosition", 80/* % */)); } @@ -1579,8 +1579,8 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater() d->restoreNavigatorWidth(); #ifndef PROPEDITOR_VISIBILITY_CHANGES -// KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget(); -// KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); +// KDockWidget *dw = (KDockWidget *)d->nav->parentWidget(); +// KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); // const int pos = ds->separatorPos(); //if (!d->curDialog || d->curDialog->currentViewMode()==Kexi::DataViewMode) @@ -1624,8 +1624,8 @@ tristate KexiMainWindowImpl::closeProject() #if defined(KDOCKWIDGET_P) //remember docks position - will be used on storeSettings() if (d->propEditor) { - KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget(); - KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); + KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); if (ds) d->propEditorDockSeparatorPos = ds->separatorPosInPercent(); } @@ -1635,14 +1635,14 @@ tristate KexiMainWindowImpl::closeProject() if (d->propEditor) { if (d->openedDialogsCount() == 0) makeWidgetDockVisible(d->propEditorTabWidget); - KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget(); - KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); + KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); if(ds) ds->setSeparatorPosInPercent(80); } - KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget(); - KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); + KDockWidget *dw = (KDockWidget *)d->nav->parentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); int dwWidth = dw->width(); if (ds) { if (d->openedDialogsCount()!=0 && d->propEditorTabWidget && d->propEditorTabWidget->isVisible()) @@ -1691,7 +1691,7 @@ tristate KexiMainWindowImpl::closeProject() // Kexi::partManager().unloadAllParts(); updateReadOnlyState(); - tqinvalidateActions(); + invalidateActions(); // if (!userMode()) updateAppCaption(); @@ -1772,15 +1772,15 @@ void KexiMainWindowImpl::initNavigator() d->forceHideProjectNavigatorOnCreation = false; } - tqinvalidateActions(); + invalidateActions(); } void KexiMainWindowImpl::slotLastActions() { #if defined(KDOCKWIDGET_P) if (mdiMode()==KMdi::ChildframeMode || mdiMode()==KMdi::TabPageMode) { -// KDockWidget *dw = (KDockWidget *)d->propEditor->tqparentWidget(); - //KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); +// KDockWidget *dw = (KDockWidget *)d->propEditor->parentWidget(); + //KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); // Q_UNUSED(ds); //1 ds->resize(ds->width()*3, ds->height()); //1 ds->setSeparatorPos(30, true); @@ -1813,9 +1813,9 @@ void KexiMainWindowImpl::initPropertyEditor() d->propEditorTabWidget->setFont(f); if (mdiMode()==KMdi::ChildframeMode || mdiMode()==KMdi::TabPageMode) { - KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget(); + KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget(); #if defined(KDOCKWIDGET_P) - KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); // ds->setKeepSize(true); makeWidgetDockVisible(d->propEditorTabWidget); // ds->show(); @@ -2070,7 +2070,7 @@ KexiMainWindowImpl::restoreSettings() if ( !initialGeometrySet() ) { // Default size // int restoredWidth, restoredHeight; - int scnum = TQApplication::desktop()->screenNumber(tqparentWidget()); + int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); //#if KDE_IS_VERSION(3,1,90) // restoredWidth = KGlobalSettings::screenGeometry(scnum).width(); @@ -2134,11 +2134,11 @@ KexiMainWindowImpl::storeSettings() d->propEditorDockSeparatorPos = 80; if (d->nav && d->navDockSeparatorPos >= 0 && d->navDockSeparatorPos <= 100) { d->config->setGroup("MainWindow"); - //KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget(); + //KDockWidget *dw = (KDockWidget *)d->nav->parentWidget(); //int w = dw->width(); //int ww = width(); //int d1 = (100 * dw->width()) / width() + 1; - //KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); + //KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); //int d2 = ds->separatorPosInPercent(); if (d->wasAutoOpen && d->dialogExistedBeforeCloseProject) { #ifdef TQ_WS_WIN @@ -2440,7 +2440,7 @@ void KexiMainWindowImpl::activeWindowChanged(KMdiChildView *v) d->curDialog->selectedView()->propertySetSwitched(); if (dialogChanged) { -// tqinvalidateSharedActions(); +// invalidateSharedActions(); //update property editor's contents... // if ((KexiPropertyBuffer*)d->propBuffer!=d->curDialog->propertyBuffer()) { // propertyBufferSwitched();//d->curDialog); @@ -2457,8 +2457,8 @@ void KexiMainWindowImpl::activeWindowChanged(KMdiChildView *v) } // if (!d->curDialog.isNull()) // d->last_checked_mode = d->actions_for_view_modes[ d->curDialog->currentViewMode() ]; - tqinvalidateViewModeActions(); - tqinvalidateActions(); + invalidateViewModeActions(); + invalidateActions(); d->updateFindDialogContents(); if (dlg) dlg->setFocus(); @@ -2648,7 +2648,7 @@ KexiMainWindowImpl::createBlankProject() initNavigator(); Kexi::recentProjects().addProjectData( new_data ); - tqinvalidateActions(); + invalidateActions(); updateAppCaption(); return true; } @@ -2873,7 +2873,7 @@ KexiMainWindowImpl::slotProjectSave() return; saveObject( d->curDialog ); updateAppCaption(); - tqinvalidateActions(); + invalidateActions(); } void @@ -2992,8 +2992,8 @@ void KexiMainWindowImpl::slotViewPropertyEditor() d->block_KMdiMainFrm_eventFilter=false; /*#if defined(KDOCKWIDGET_P) - KDockWidget *dw = (KDockWidget *)d->propEditor->tqparentWidget(); - KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); + KDockWidget *dw = (KDockWidget *)d->propEditor->parentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); ds->setSeparatorPos(80,true);//d->config->readNumEntry("RightDockPosition", 80), true); #endif*/ } @@ -3038,8 +3038,8 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode) d->curDialogViewGUIClient=viewClient; //remember d->updatePropEditorVisibility(viewMode); - tqinvalidateProjectWideActions(); - tqinvalidateSharedActions(); + invalidateProjectWideActions(); + invalidateSharedActions(); d->updateFindDialogContents(); return true; } @@ -3060,7 +3060,7 @@ void KexiMainWindowImpl::slotViewTextMode() switchToViewMode(Kexi::TextViewMode); } -void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool tqlayoutTaskBar) +void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool layoutTaskBar) { if (d->insideCloseDialog && dynamic_cast<KexiDialogBase *>(pWnd)) { d->windowsToClose.append(dynamic_cast<KexiDialogBase *>(pWnd)); @@ -3075,7 +3075,7 @@ void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool tqlayoutTaskBar) } } */ - closeDialog(dynamic_cast<KexiDialogBase *>(pWnd), tqlayoutTaskBar); + closeDialog(dynamic_cast<KexiDialogBase *>(pWnd), layoutTaskBar); } tristate KexiMainWindowImpl::getNewObjectInfo( @@ -3187,7 +3187,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const TQString& me //item id changed to final one: update association in dialogs' dictionary // d->dialogs.take(oldItemID); d->updateDialogId(dlg, oldItemID); - tqinvalidateProjectWideActions(); + invalidateProjectWideActions(); return true; } @@ -3196,7 +3196,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg) return closeDialog(dlg, true); } -tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool tqlayoutTaskBar, bool doNotSaveChanges) +tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar, bool doNotSaveChanges) { if (!dlg) return true; @@ -3338,7 +3338,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool tqlayoutTaskB const bool isInMaximizedChildFrmMode = this->isInMaximizedChildFrmMode(); - KMdiMainFrm::closeWindow(dlg, tqlayoutTaskBar); + KMdiMainFrm::closeWindow(dlg, layoutTaskBar); //focus navigator if nothing else available if (d->openedDialogsCount()==0) { @@ -3348,7 +3348,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool tqlayoutTaskB d->updatePropEditorVisibility(0); } - tqinvalidateActions(); + invalidateActions(); d->insideCloseDialog = false; if (!d->windowsToClose.isEmpty()) //continue 'close all' closeDialog(d->windowsToClose.take(0), true); @@ -3395,7 +3395,7 @@ void KexiMainWindowImpl::attachWindow(KMdiChildView *pWnd, bool /*bShow*/, bool TQWidget* KexiMainWindowImpl::findWindow(TQWidget *w) { while (w && !acceptsSharedActions(TQT_TQOBJECT(w))) - w = w->tqparentWidget(); + w = w->parentWidget(); return w; } @@ -3452,24 +3452,24 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) if (!d->focus_before_popup.isNull()) { d->focus_before_popup->setFocus(); d->focus_before_popup=0; - tqinvalidateSharedActions(); + invalidateSharedActions(); } else { if (focus_w) { focus_w->setFocus(); - tqinvalidateSharedActions(); + invalidateSharedActions(); } } } return false; } - /*! On mouse click on the findow, make sure it's focused and actions are tqinvalidated */ + /*! On mouse click on the findow, make sure it's focused and actions are invalidated */ if (e->type()==TQEvent::MouseButtonPress) { TQWidget *w = findWindow(TQT_TQWIDGET(obj)); KexiVDebug << "MouseButtonPress EVENT " << (w ? w->name() : 0) << endl; if (w) { w->setFocus(); - tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog)); + invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); } } TQWidget *w = findWindow(TQT_TQWIDGET(obj)); @@ -3509,20 +3509,20 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) // if (d->actionProxies[ w ]) // if (d->actionProxies[ focus_w ]) { if (actionProxyFor( focus_w )) { -// tqinvalidateSharedActions(); +// invalidateSharedActions(); } else { /* TQObject* o = tqfocusWidget(); while (o && !o->inherits("KexiDialogBase") && !o->inherits("KexiDockBase")) o = o->tqparent();*/ -//js tqinvalidateSharedActions(focus_w); +//js invalidateSharedActions(focus_w); } } // /*|| e->type()==TQEvent::FocusOut*/) && /*(!obj->inherits("KexiDialogBase")) &&*/ d->actionProxies[ obj ]) { -// tqinvalidateSharedActions(); +// invalidateSharedActions(); } if (e->type()==TQEvent::FocusOut && focus_w && focus_w==d->curDialog && actionProxyFor( obj )) { - tqinvalidateSharedActions(d->curDialog); + invalidateSharedActions(d->curDialog); } #endif @@ -3530,7 +3530,7 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) //d->nav->setFocus(); d->focus_before_popup->setFocus(); d->focus_before_popup=0; - tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog)); + invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); return true; } @@ -3538,11 +3538,11 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) if (e->type()==TQEvent::FocusOut) { if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) { - tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog)); + invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); d->focus_before_popup=d->curDialog; } else { -//not needed??? tqinvalidateSharedActions(focus_w); +//not needed??? invalidateSharedActions(focus_w); d->focus_before_popup=focus_w; } } @@ -3568,7 +3568,7 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) else if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) { d->focus_before_popup=w; } - //tqinvalidateSharedActions(); + //invalidateSharedActions(); } else if (e->type()==TQEvent::Hide) { setFocus(); return false; @@ -3666,9 +3666,9 @@ KexiMainWindowImpl::openObject(KexiPart::Item* item, int viewMode, bool &opening d->curDialogViewGUIClient=viewClient; //remember } - tqinvalidateViewModeActions(); + invalidateViewModeActions(); if (viewMode!=dlg->currentViewMode()) - tqinvalidateSharedActions(); + invalidateSharedActions(); #ifndef KEXI_NO_PENDING_DIALOGS d->removePendingDialog( dlg->id() ); @@ -3711,7 +3711,7 @@ KexiMainWindowImpl::openObjectFromNavigator(KexiPart::Item* item, int viewMode, openingCancelled = false; if (dlg) { if (activateWindow(dlg)) {//item->identifier())) {//just activate - tqinvalidateViewModeActions(); + invalidateViewModeActions(); return dlg; } } @@ -3932,7 +3932,7 @@ void KexiMainWindowImpl::slotDirtyFlagChanged(KexiDialogBase* dlg) if(!userMode()) d->nav->updateItemName( *item, dlg->dirty() ); - tqinvalidateActions(); + invalidateActions(); updateAppCaption(); } |