diff options
Diffstat (limited to 'kexi/main/keximainwindowimpl_p.h')
-rw-r--r-- | kexi/main/keximainwindowimpl_p.h | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/kexi/main/keximainwindowimpl_p.h b/kexi/main/keximainwindowimpl_p.h index b48c7ca0..0abd513a 100644 --- a/kexi/main/keximainwindowimpl_p.h +++ b/kexi/main/keximainwindowimpl_p.h @@ -23,7 +23,7 @@ #endif //! @internal safer dictionary -typedef QMap< int, QGuardedPtr<KexiDialogBase> > KexiDialogDict; +typedef TQMap< int, TQGuardedPtr<KexiDialogBase> > KexiDialogDict; //! @internal class KexiMainWindowImpl::Private @@ -73,7 +73,7 @@ public: wasAutoOpen = false; dialogExistedBeforeCloseProject = false; #ifndef KEXI_SHOW_UNIMPLEMENTED - dummy_action = new KActionMenu("", wnd); + dummy_action = new KActionMenu(TQString(""), TQT_TQOBJECT(wnd)); #endif maximizeFirstOpenedChildFrm = false; #ifdef HAVE_KNEWSTUFF @@ -104,8 +104,8 @@ public: KexiDialogBase *openedDialogFor( int identifier, PendingJobType &pendingType ) { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); - QMap<int, PendingJobType>::ConstIterator it = pendingDialogs.find( identifier ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); + TQMap<int, PendingJobType>::ConstIterator it = pendingDialogs.tqfind( identifier ); if (it==pendingDialogs.constEnd()) pendingType = NoJob; else @@ -124,14 +124,14 @@ public: KexiDialogBase *openedDialogFor( int identifier ) { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); return (KexiDialogBase*)dialogs[ identifier ]; } #endif void insertDialog(KexiDialogBase *dlg) { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); - dialogs.insert(dlg->id(), QGuardedPtr<KexiDialogBase>(dlg)); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); + dialogs.insert(dlg->id(), TQGuardedPtr<KexiDialogBase>(dlg)); #ifndef KEXI_NO_PENDING_DIALOGS pendingDialogs.remove(dlg->id()); #endif @@ -139,47 +139,47 @@ public: #ifndef KEXI_NO_PENDING_DIALOGS void addItemToPendingDialogs(const KexiPart::Item* item, PendingJobType jobType) { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); - pendingDialogs.replace( item->identifier(), jobType ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); + pendingDialogs.tqreplace( item->identifier(), jobType ); } bool pendingDialogsExist() { if (pendingDialogs.constBegin()!=pendingDialogs.constEnd()) kdDebug() << pendingDialogs.constBegin().key() << " " << (int)pendingDialogs.constBegin().data() << endl; -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); return !pendingDialogs.isEmpty(); } #endif void updateDialogId(KexiDialogBase *dlg, int oldItemID) { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); dialogs.remove(oldItemID); #ifndef KEXI_NO_PENDING_DIALOGS pendingDialogs.remove(oldItemID); #endif - dialogs.insert(dlg->id(), QGuardedPtr<KexiDialogBase>(dlg)); + dialogs.insert(dlg->id(), TQGuardedPtr<KexiDialogBase>(dlg)); } void removeDialog(int identifier) { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); dialogs.remove(identifier); } #ifndef KEXI_NO_PENDING_DIALOGS void removePendingDialog(int identifier) { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); pendingDialogs.remove(identifier); } #endif uint openedDialogsCount() { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); return dialogs.count(); } //! Used in KexiMainWindowImple::closeProject() void clearDialogs() { -//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex ); +//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex ); dialogs.clear(); #ifndef KEXI_NO_PENDING_DIALOGS pendingDialogs.clear(); @@ -202,9 +202,9 @@ public: /* void updatePropEditorDockWidthInfo() { if (propEditor) { - KDockWidget *dw = (KDockWidget *)propEditor->parentWidget(); + KDockWidget *dw = (KDockWidget *)propEditor->tqparentWidget(); #if defined(KDOCKWIDGET_P) - KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); if (ds) { propEditorDockSeparatorPos = ds->separatorPosInPercent();*/ /* if (propEditorDockSeparatorPos<=0) { @@ -217,15 +217,15 @@ void updatePropEditorDockWidthInfo() { } }*/ - void showStartProcessMsg(const QStringList& args) + void showStartProcessMsg(const TQStringList& args) { - wnd->showErrorMessage(i18n("Could not start %1 application.").arg(KEXI_APP_NAME), - i18n("Command \"%1\" failed.").arg(args.join(" "))); + wnd->showErrorMessage(i18n("Could not start %1 application.").tqarg(KEXI_APP_NAME), + i18n("Command \"%1\" failed.").tqarg(args.join(" "))); } - void hideMenuItem(const QString& menuName, const QString& itemText, bool alsoSeparator) + void hideMenuItem(const TQString& menuName, const TQString& itemText, bool alsoSeparator) { - QPopupMenu *pm = popups[menuName.ascii()]; + TQPopupMenu *pm = popups[menuName.ascii()]; if (!pm) return; uint i=0; @@ -242,9 +242,9 @@ void updatePropEditorDockWidthInfo() { } } - void disableMenuItem(const QString& menuName, const QString& itemText) + void disableMenuItem(const TQString& menuName, const TQString& itemText) { - QPopupMenu *pm = popups[menuName.ascii()]; + TQPopupMenu *pm = popups[menuName.ascii()]; if (!pm) return; uint i=0; @@ -267,14 +267,14 @@ void updatePropEditorDockWidthInfo() { #endif } else { //propEditorToolWindow->show(); - QWidget *origFocusWidget = qApp->focusWidget(); + TQWidget *origFocusWidget = tqApp->tqfocusWidget(); wnd->makeWidgetDockVisible(propEditorTabWidget); if (origFocusWidget) origFocusWidget->setFocus(); /*moved #if defined(KDOCKWIDGET_P) - KDockWidget *dw = (KDockWidget *)propEditor->parentWidget(); - KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); + KDockWidget *dw = (KDockWidget *)propEditor->tqparentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); ds->setSeparatorPosInPercent(config->readNumEntry("RightDockPosition", 80));//% #endif*/ } @@ -285,8 +285,8 @@ void updatePropEditorDockWidthInfo() { { #if defined(KDOCKWIDGET_P) if (wnd->mdiMode()==KMdi::ChildframeMode || wnd->mdiMode()==KMdi::TabPageMode) { - KDockWidget *dw = (KDockWidget *)nav->parentWidget(); - KDockSplitter *ds = (KDockSplitter *)dw->parentWidget(); + KDockWidget *dw = (KDockWidget *)nav->tqparentWidget(); + KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget(); // ds->setKeepSize(true); config->setGroup("MainWindow"); @@ -295,12 +295,12 @@ void updatePropEditorDockWidthInfo() { if (wasAutoOpen) //(dw2->isVisible()) // ds->setSeparatorPosInPercent( 100 * nav->width() / wnd->width() ); ds->setSeparatorPosInPercent( - QMAX(QMAX( config->readNumEntry("LeftDockPositionWithAutoOpen",20), + TQMAX(TQMAX( config->readNumEntry("LeftDockPositionWithAutoOpen",20), config->readNumEntry("LeftDockPosition",20)),20) ); else ds->setSeparatorPosInPercent( - QMAX(20, config->readNumEntry("LeftDockPosition", 20/* % */))); + TQMAX(20, config->readNumEntry("LeftDockPosition", 20/* % */))); // dw->resize( d->config->readNumEntry("LeftDockPosition", 115/* % */), dw->height() ); # else @@ -321,13 +321,13 @@ void updatePropEditorDockWidthInfo() { "KexiMainWindowImpl::Private::openedCustomObjectsForItem(): !item || !name" << endl; return 0; } - QString key( QString::number(item->identifier()) + name ); - return dynamic_cast<type*>( m_openedCustomObjectsForItem.find( key.latin1() ) ); + TQString key( TQString::number(item->identifier()) + name ); + return dynamic_cast<type*>( m_openedCustomObjectsForItem.tqfind( key.latin1() ) ); } - void addOpenedCustomObjectForItem(KexiPart::Item* item, QObject* object, const char* name) + void addOpenedCustomObjectForItem(KexiPart::Item* item, TQObject* object, const char* name) { - QString key = QString::number(item->identifier()) + name; + TQString key = TQString::number(item->identifier()) + name; m_openedCustomObjectsForItem.insert( key.latin1(), object ); } @@ -335,16 +335,16 @@ void updatePropEditorDockWidthInfo() { if (!m_findDialog) { m_findDialog = new KexiFindDialog(wnd); m_findDialog->setActions( action_edit_findnext, action_edit_findprev, - action_edit_replace, action_edit_replace_all ); -/* connect(m_findDialog, SIGNAL(findNext()), action_edit_findnext, SLOT(activate())); - connect(m_findDialog, SIGNAL(find()), wnd, SLOT(slotEditFindNext())); - connect(m_findDialog, SIGNAL(replace()), wnd, SLOT(slotEditReplaceNext())); - connect(m_findDialog, SIGNAL(replaceAll()), wnd, SLOT(slotEditReplaceAll()));*/ + action_edit_tqreplace, action_edit_replace_all ); +/* connect(m_findDialog, TQT_SIGNAL(findNext()), action_edit_findnext, TQT_SLOT(activate())); + connect(m_findDialog, TQT_SIGNAL(tqfind()), wnd, TQT_SLOT(slotEditFindNext())); + connect(m_findDialog, TQT_SIGNAL(tqreplace()), wnd, TQT_SLOT(slotEditReplaceNext())); + connect(m_findDialog, TQT_SIGNAL(replaceAll()), wnd, TQT_SLOT(slotEditReplaceAll()));*/ } return m_findDialog; } - /*! Updates the find/replace dialog depending on the active view. + /*! Updates the tqfind/replace dialog depending on the active view. Nothing is performed if the dialog is not instantiated yet or is invisible. */ void updateFindDialogContents(bool createIfDoesNotExist = false) { if (!createIfDoesNotExist && (!m_findDialog || !m_findDialog->isVisible())) @@ -353,34 +353,34 @@ void updatePropEditorDockWidthInfo() { if (!iface) { if (m_findDialog) { m_findDialog->setButtonsEnabled(false); - m_findDialog->setLookInColumnList(QStringList(), QStringList()); + m_findDialog->setLookInColumnList(TQStringList(), TQStringList()); } return; } //! @todo use ->caption() here, depending on global settings related to displaying captions findDialog()->setObjectNameForCaption(curDialog->partItem()->name()); - QStringList columnNames; - QStringList columnCaptions; - QString currentColumnName; // for 'look in' + TQStringList columnNames; + TQStringList columnCaptions; + TQString currentColumnName; // for 'look in' if (!iface->setupFindAndReplace(columnNames, columnCaptions, currentColumnName)) { m_findDialog->setButtonsEnabled(false); - m_findDialog->setLookInColumnList(QStringList(), QStringList()); + m_findDialog->setLookInColumnList(TQStringList(), TQStringList()); return; } m_findDialog->setButtonsEnabled(true); /* //update "look in" list KexiTableViewColumn::List columns( dataAwareObject()->data()->columns ); - QStringList columnNames; - QStringList columnCaptions; + TQStringList columnNames; + TQStringList columnCaptions; for (KexiTableViewColumn::ListIterator it(columns); it.current(); ++it) { if (!it.current()->visible()) continue; columnNames.append( it.current()->field()->name() ); columnCaptions.append( it.current()->captionAliasOrName() ); }*/ - const QString prevColumnName( m_findDialog->currentLookInColumnName()); + const TQString prevColumnName( m_findDialog->currentLookInColumnName()); m_findDialog->setLookInColumnList(columnNames, columnCaptions); m_findDialog->setCurrentLookInColumnName( prevColumnName ); } @@ -421,25 +421,25 @@ void updatePropEditorDockWidthInfo() { KTabWidget *propEditorTabWidget; //! poits to kexi part which has been previously used to setup proppanel's tabs using //! KexiPart::setupCustomPropertyPanelTabs(), in updateCustomPropertyPanelTabs(). - QGuardedPtr<KexiPart::Part> partForPreviouslySetupPropertyPanelTabs; - QMap<KexiPart::Part*, int> recentlySelectedPropertyPanelPages; - QGuardedPtr<KexiPropertyEditorView> propEditor; - QGuardedPtr<KoProperty::Set> propBuffer; + TQGuardedPtr<KexiPart::Part> partForPreviouslySetupPropertyPanelTabs; + TQMap<KexiPart::Part*, int> recentlySelectedPropertyPanelPages; + TQGuardedPtr<KexiPropertyEditorView> propEditor; + TQGuardedPtr<KoProperty::Set> propBuffer; KXMLGUIClient *curDialogGUIClient, *curDialogViewGUIClient, *closedDialogGUIClient, *closedDialogViewGUIClient; - QGuardedPtr<KexiDialogBase> curDialog; + TQGuardedPtr<KexiDialogBase> curDialog; KexiNameDialog *nameDialog; - QTimer timer; //helper timer -// QSignalMapper *actionMapper; + TQTimer timer; //helper timer +// TQSignalMapper *actionMapper; - QAsciiDict<QPopupMenu> popups; //list of menu popups - QPopupMenu *createMenu; + TQAsciiDict<TQPopupMenu> popups; //list of menu popups + TQPopupMenu *createMenu; - QString origAppCaption; //<! original application's caption (without project name) - QString appCaptionPrefix; //<! application's caption prefix - prj name (if opened), else: null + TQString origAppCaption; //<! original application's caption (without project name) + TQString appCaptionPrefix; //<! application's caption prefix - prj name (if opened), else: null #ifndef KEXI_SHOW_UNIMPLEMENTED KActionMenu *dummy_action; @@ -461,8 +461,8 @@ void updatePropEditorDockWidthInfo() { //! edit menu KAction *action_edit_delete, *action_edit_delete_row, *action_edit_cut, *action_edit_copy, *action_edit_paste, - *action_edit_find, *action_edit_findnext, *action_edit_findprev, - *action_edit_replace, *action_edit_replace_all, + *action_edit_tqfind, *action_edit_findnext, *action_edit_findprev, + *action_edit_tqreplace, *action_edit_replace_all, *action_edit_select_all, *action_edit_undo, *action_edit_redo, *action_edit_insert_empty_row, @@ -473,7 +473,7 @@ void updatePropEditorDockWidthInfo() { //! view menu KAction *action_view_nav, *action_view_propeditor, *action_view_mainarea; KRadioAction *action_view_data_mode, *action_view_design_mode, *action_view_text_mode; - QIntDict<KRadioAction> actions_for_view_modes; + TQIntDict<KRadioAction> actions_for_view_modes; // KRadioAction *last_checked_mode; #ifndef KEXI_NO_CTXT_HELP KToggleAction *action_show_helper; @@ -500,7 +500,7 @@ void updatePropEditorDockWidthInfo() { KMdiToolViewAccessor* navToolWindow; KMdiToolViewAccessor* propEditorToolWindow; - QGuardedPtr<QWidget> focus_before_popup; + TQGuardedPtr<TQWidget> focus_before_popup; // KexiRelationPart *relationPart; int privateIDCounter; //!< counter: ID for private "document" like Relations window @@ -530,7 +530,7 @@ void updatePropEditorDockWidthInfo() { actionToExecuteWhenPendingJobsAreFinished = NoAction; switch (a) { case QuitAction: - qApp->quit(); + tqApp->quit(); break; case CloseProjectAction: wnd->closeProject(); @@ -541,15 +541,15 @@ void updatePropEditorDockWidthInfo() { #endif //! Used for delayed dialogs closing for 'close all' - QPtrList<KexiDialogBase> windowsToClose; + TQPtrList<KexiDialogBase> windowsToClose; //! Opened page setup dialogs, used by printOrPrintPreviewForItem(). - QIntDict<KexiDialogBase> pageSetupDialogs; + TQIntDict<KexiDialogBase> pageSetupDialogs; /*! A map from Kexi dialog to "print setup" part item's ID of the data item used by closeDialog() to find an ID of the data item, so the entry can be removed from pageSetupDialogs dictionary. */ - QMap<int, int> pageSetupDialogItemID2dataItemID_map; + TQMap<int, int> pageSetupDialogItemID2dataItemID_map; //! Used in several places to show info dialog at startup (only once per session) //! before displaying other stuff @@ -579,7 +579,7 @@ void updatePropEditorDockWidthInfo() { #endif //! Used by openedCustomObjectsForItem() and addOpenedCustomObjectForItem() - QAsciiDict<QObject> m_openedCustomObjectsForItem; + TQAsciiDict<TQObject> m_openedCustomObjectsForItem; int propEditorDockSeparatorPos, navDockSeparatorPos; // int navDockSeparatorPosWithAutoOpen; @@ -592,8 +592,8 @@ void updatePropEditorDockWidthInfo() { //! @todo move to KexiProject KexiDialogDict dialogs; #ifndef KEXI_NO_PROCESS_EVENTS - QMap<int, PendingJobType> pendingDialogs; //!< part item identifiers for dialogs whoose opening has been started - //todo(threads) QMutex dialogsMutex; //!< used for locking dialogs and pendingDialogs dicts + TQMap<int, PendingJobType> pendingDialogs; //!< part item identifiers for dialogs whoose opening has been started + //todo(threads) TQMutex dialogsMutex; //!< used for locking dialogs and pendingDialogs dicts #endif KexiFindDialog *m_findDialog; }; |