diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/widget/kexidataawareview.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/widget/kexidataawareview.cpp')
-rw-r--r-- | kexi/widget/kexidataawareview.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/kexi/widget/kexidataawareview.cpp b/kexi/widget/kexidataawareview.cpp index 418f0aa1..c22c0dbb 100644 --- a/kexi/widget/kexidataawareview.cpp +++ b/kexi/widget/kexidataawareview.cpp @@ -23,12 +23,12 @@ #include <utils/kexisharedactionclient.h> #include <core/keximainwindow.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kpopupmenu.h> -KexiDataAwareView::KexiDataAwareView(KexiMainWindow *mainWin, QWidget *parent, const char *name) - : KexiViewBase(mainWin, parent, name) +KexiDataAwareView::KexiDataAwareView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name) + : KexiViewBase(mainWin, tqparent, name) , KexiSearchAndReplaceViewInterface() , m_internalView(0) , m_actionClient(0) @@ -36,7 +36,7 @@ KexiDataAwareView::KexiDataAwareView(KexiMainWindow *mainWin, QWidget *parent, c { } -void KexiDataAwareView::init( QWidget* viewWidget, KexiSharedActionClient* actionClient, +void KexiDataAwareView::init( TQWidget* viewWidget, KexiSharedActionClient* actionClient, KexiDataAwareObjectInterface* dataAwareObject, bool noDataAware ) { m_internalView = viewWidget; @@ -45,23 +45,23 @@ void KexiDataAwareView::init( QWidget* viewWidget, KexiSharedActionClient* actio setViewWidget(m_internalView, true); if (!noDataAware) { - m_dataAwareObject->connectCellSelectedSignal(this, SLOT(slotCellSelected(int,int))); + m_dataAwareObject->connectCellSelectedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotCellSelected(int,int))); //! before closing - we'are accepting editing - connect(this, SIGNAL(closing(bool&)), this, SLOT(slotClosing(bool&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(closing(bool&)), TQT_TQOBJECT(this), TQT_SLOT(slotClosing(bool&))); //! updating actions on start/stop editing - m_dataAwareObject->connectRowEditStartedSignal(this, SLOT(slotUpdateRowActions(int))); - m_dataAwareObject->connectRowEditTerminatedSignal(this, SLOT(slotUpdateRowActions(int))); - m_dataAwareObject->connectReloadActionsSignal(this, SLOT(reloadActions())); + m_dataAwareObject->connectRowEditStartedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotUpdateRowActions(int))); + m_dataAwareObject->connectRowEditTerminatedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotUpdateRowActions(int))); + m_dataAwareObject->connectReloadActionsSignal(TQT_TQOBJECT(this), TQT_SLOT(reloadActions())); } - QVBoxLayout *box = new QVBoxLayout(this); + TQVBoxLayout *box = new TQVBoxLayout(this); box->addWidget(m_internalView); - setMinimumSize(m_internalView->minimumSizeHint().width(), - m_internalView->minimumSizeHint().height()); - resize( preferredSizeHint( m_internalView->sizeHint() ) ); + setMinimumSize(m_internalView->tqminimumSizeHint().width(), + m_internalView->tqminimumSizeHint().height()); + resize( preferredSizeHint( m_internalView->tqsizeHint() ) ); setFocusProxy(m_internalView); if (!noDataAware) { @@ -72,37 +72,37 @@ void KexiDataAwareView::init( QWidget* viewWidget, KexiSharedActionClient* actio void KexiDataAwareView::initActions() { - plugSharedAction("edit_delete_row", this, SLOT(deleteCurrentRow())); + plugSharedAction("edit_delete_row", TQT_TQOBJECT(this), TQT_SLOT(deleteCurrentRow())); m_actionClient->plugSharedAction(sharedAction("edit_delete_row")); //for proper shortcut - plugSharedAction("edit_delete", this, SLOT(deleteAndStartEditCurrentCell())); + plugSharedAction("edit_delete", TQT_TQOBJECT(this), TQT_SLOT(deleteAndStartEditCurrentCell())); m_actionClient->plugSharedAction(sharedAction("edit_delete")); //for proper shortcut - plugSharedAction("edit_edititem", this, SLOT(startEditOrToggleValue())); + plugSharedAction("edit_edititem", TQT_TQOBJECT(this), TQT_SLOT(startEditOrToggleValue())); m_actionClient->plugSharedAction(sharedAction("edit_edititem")); //for proper shortcut - plugSharedAction("data_save_row", this, SLOT(acceptRowEdit())); + plugSharedAction("data_save_row", TQT_TQOBJECT(this), TQT_SLOT(acceptRowEdit())); m_actionClient->plugSharedAction(sharedAction("data_save_row")); //for proper shortcut - plugSharedAction("data_cancel_row_changes", this, SLOT(cancelRowEdit())); + plugSharedAction("data_cancel_row_changes", TQT_TQOBJECT(this), TQT_SLOT(cancelRowEdit())); m_actionClient->plugSharedAction(sharedAction("data_cancel_row_changes")); //for proper shortcut if (m_dataAwareObject->isSortingEnabled()) { - plugSharedAction("data_sort_az", this, SLOT(sortAscending())); - plugSharedAction("data_sort_za", this, SLOT(sortDescending())); + plugSharedAction("data_sort_az", TQT_TQOBJECT(this), TQT_SLOT(sortAscending())); + plugSharedAction("data_sort_za", TQT_TQOBJECT(this), TQT_SLOT(sortDescending())); } m_actionClient->plugSharedAction(sharedAction("edit_insert_empty_row")); //for proper shortcut setAvailable("data_sort_az", m_dataAwareObject->isSortingEnabled()); setAvailable("data_sort_za", m_dataAwareObject->isSortingEnabled()); -//! \todo plugSharedAction("data_filter", this, SLOT(???())); +//! \todo plugSharedAction("data_filter", TQT_TQOBJECT(this), TQT_SLOT(???())); - plugSharedAction("data_go_to_first_record", this, SLOT(slotGoToFirstRow())); - plugSharedAction("data_go_to_previous_record", this, SLOT(slotGoToPreviusRow())); - plugSharedAction("data_go_to_next_record", this, SLOT(slotGoToNextRow())); - plugSharedAction("data_go_to_last_record", this, SLOT(slotGoToLastRow())); - plugSharedAction("data_go_to_new_record", this, SLOT(slotGoToNewRow())); + plugSharedAction("data_go_to_first_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToFirstRow())); + plugSharedAction("data_go_to_previous_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToPreviusRow())); + plugSharedAction("data_go_to_next_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToNextRow())); + plugSharedAction("data_go_to_last_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToLastRow())); + plugSharedAction("data_go_to_new_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToNewRow())); //! \todo update availability setAvailable("data_go_to_first_record", true); @@ -111,31 +111,31 @@ void KexiDataAwareView::initActions() setAvailable("data_go_to_last_record", true); setAvailable("data_go_to_new_record", true); - plugSharedAction("edit_copy", this, SLOT(copySelection())); + plugSharedAction("edit_copy", TQT_TQOBJECT(this), TQT_SLOT(copySelection())); m_actionClient->plugSharedAction(sharedAction("edit_copy")); //for proper shortcut - plugSharedAction("edit_cut", this, SLOT(cutSelection())); + plugSharedAction("edit_cut", TQT_TQOBJECT(this), TQT_SLOT(cutSelection())); m_actionClient->plugSharedAction(sharedAction("edit_cut")); //for proper shortcut - plugSharedAction("edit_paste", this, SLOT(paste())); + plugSharedAction("edit_paste", TQT_TQOBJECT(this), TQT_SLOT(paste())); m_actionClient->plugSharedAction(sharedAction("edit_paste")); //for proper shortcut -// plugSharedAction("edit_find", this, SLOT(editFind())); -// m_actionClient->plugSharedAction(sharedAction("edit_find")); //for proper shortcut +// plugSharedAction("edit_tqfind", TQT_TQOBJECT(this), TQT_SLOT(editFind())); +// m_actionClient->plugSharedAction(sharedAction("edit_tqfind")); //for proper shortcut -// plugSharedAction("edit_findnext", this, SLOT(editFindNext())); +// plugSharedAction("edit_findnext", TQT_TQOBJECT(this), TQT_SLOT(editFindNext())); // m_actionClient->plugSharedAction(sharedAction("edit_findnext")); //for proper shortcut -// plugSharedAction("edit_findprevious", this, SLOT(editFindPrevious())); +// plugSharedAction("edit_findprevious", TQT_TQOBJECT(this), TQT_SLOT(editFindPrevious())); // m_actionClient->plugSharedAction(sharedAction("edit_findprev")); //for proper shortcut -//! @todo plugSharedAction("edit_replace", this, SLOT(editReplace())); -//! @todo m_actionClient->plugSharedAction(sharedAction("edit_replace")); //for proper shortcut +//! @todo plugSharedAction("edit_tqreplace", TQT_TQOBJECT(this), TQT_SLOT(editReplace())); +//! @todo m_actionClient->plugSharedAction(sharedAction("edit_tqreplace")); //for proper shortcut -// setAvailable("edit_find", true); +// setAvailable("edit_tqfind", true); // setAvailable("edit_findnext", true); // setAvailable("edit_findprevious", true); -//! @todo setAvailable("edit_replace", true); +//! @todo setAvailable("edit_tqreplace", true); } void KexiDataAwareView::slotUpdateRowActions(int row) @@ -160,19 +160,19 @@ void KexiDataAwareView::slotUpdateRowActions(int row) setAvailable("data_sort_za", sorting); } -QWidget* KexiDataAwareView::mainWidget() +TQWidget* KexiDataAwareView::mainWidget() { return m_internalView; } -QSize KexiDataAwareView::minimumSizeHint() const +TQSize KexiDataAwareView::tqminimumSizeHint() const { - return m_internalView ? m_internalView->minimumSizeHint() : QSize(0,0);//KexiViewBase::minimumSizeHint(); + return m_internalView ? m_internalView->tqminimumSizeHint() : TQSize(0,0);//KexiViewBase::tqminimumSizeHint(); } -QSize KexiDataAwareView::sizeHint() const +TQSize KexiDataAwareView::tqsizeHint() const { - return m_internalView ? m_internalView->sizeHint() : QSize(0,0);//KexiViewBase::sizeHint(); + return m_internalView ? m_internalView->tqsizeHint() : TQSize(0,0);//KexiViewBase::tqsizeHint(); } void KexiDataAwareView::updateActions(bool activated) @@ -188,7 +188,7 @@ void KexiDataAwareView::reloadActions() //warning FIXME Move this to the table part /* kdDebug()<<"INIT ACTIONS***********************************************************************"<<endl; - new KAction(i18n("Filter"), "filter", 0, this, SLOT(filter()), actionCollection(), "tablepart_filter"); + new KAction(i18n("Filter"), "filter", 0, TQT_TQOBJECT(this), TQT_SLOT(filter()), actionCollection(), "tablepart_filter"); setXMLFile("kexidatatableui.rc"); */ m_dataAwareObject->contextMenu()->clear(); @@ -200,11 +200,11 @@ void KexiDataAwareView::reloadActions() bool separatorNeeded = true; unplugSharedAction("edit_clear_table"); - plugSharedAction("edit_clear_table", this, SLOT(deleteAllRows())); + plugSharedAction("edit_clear_table", TQT_TQOBJECT(this), TQT_SLOT(deleteAllRows())); if (m_dataAwareObject->isEmptyRowInsertingEnabled()) { unplugSharedAction("edit_insert_empty_row"); - plugSharedAction("edit_insert_empty_row", m_internalView, SLOT(insertEmptyRow())); + plugSharedAction("edit_insert_empty_row", TQT_TQOBJECT(m_internalView), TQT_SLOT(insertEmptyRow())); if (separatorNeeded) m_dataAwareObject->contextMenu()->insertSeparator(); plugSharedAction("edit_insert_empty_row", m_dataAwareObject->contextMenu()); @@ -241,7 +241,7 @@ void KexiDataAwareView::slotCellSelected(int /*col*/, int row) void KexiDataAwareView::deleteAllRows() { - m_dataAwareObject->deleteAllRows(true/*ask*/, true/*repaint*/); + m_dataAwareObject->deleteAllRows(true/*ask*/, true/*tqrepaint*/); } void KexiDataAwareView::deleteCurrentRow() @@ -306,8 +306,8 @@ void KexiDataAwareView::slotGoToNextRow() { m_dataAwareObject->selectNextRow(); void KexiDataAwareView::slotGoToLastRow() { m_dataAwareObject->selectLastRow(); } void KexiDataAwareView::slotGoToNewRow() { m_dataAwareObject->addNewRecordRequested(); } -bool KexiDataAwareView::setupFindAndReplace(QStringList& columnNames, QStringList& columnCaptions, - QString& currentColumnName) +bool KexiDataAwareView::setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions, + TQString& currentColumnName) { if (!dataAwareObject() || !dataAwareObject()->data()) return false; @@ -329,7 +329,7 @@ bool KexiDataAwareView::setupFindAndReplace(QStringList& columnNames, QStringLis return true; } -tristate KexiDataAwareView::find(const QVariant& valueToFind, +tristate KexiDataAwareView::tqfind(const TQVariant& valueToFind, const KexiSearchAndReplaceViewInterface::Options& options, bool next) { if (!dataAwareObject() || !dataAwareObject()->data()) @@ -337,8 +337,8 @@ tristate KexiDataAwareView::find(const QVariant& valueToFind, // const KexiDataAwareObjectInterface::FindAndReplaceOptions options(dlg->options()); /* if (res == KexiFindDialog::Find) {*/ -// QVariant valueToFind(dlg->valueToFind()); - return dataAwareObject()->find( valueToFind, options, next ); +// TQVariant valueToFind(dlg->valueToFind()); + return dataAwareObject()->tqfind( valueToFind, options, next ); /* //! @todo result... @@ -352,8 +352,8 @@ tristate KexiDataAwareView::find(const QVariant& valueToFind, */ } -tristate KexiDataAwareView::findNextAndReplace(const QVariant& valueToFind, - const QVariant& replacement, +tristate KexiDataAwareView::findNextAndReplace(const TQVariant& valueToFind, + const TQVariant& replacement, const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll) { if (!dataAwareObject() || !dataAwareObject()->data()) |