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/kexifieldlistview.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/kexifieldlistview.cpp')
-rw-r--r-- | kexi/widget/kexifieldlistview.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kexi/widget/kexifieldlistview.cpp b/kexi/widget/kexifieldlistview.cpp index 84b577a6..e9796abf 100644 --- a/kexi/widget/kexifieldlistview.cpp +++ b/kexi/widget/kexifieldlistview.cpp @@ -19,15 +19,15 @@ #include "kexifieldlistview.h" -#include <qheader.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qcursor.h> -#include <qpoint.h> -#include <qapplication.h> -#include <qbitmap.h> -#include <qstyle.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqcursor.h> +#include <tqpoint.h> +#include <tqapplication.h> +#include <tqbitmap.h> +#include <tqstyle.h> #include <kdebug.h> #include <kiconloader.h> @@ -42,8 +42,8 @@ #include <kexidragobjects.h> #include <kexiutils/utils.h> -KexiFieldListView::KexiFieldListView(QWidget *parent, const char *name, int options) - : KListView(parent, name) +KexiFieldListView::KexiFieldListView(TQWidget *tqparent, const char *name, int options) + : KListView(tqparent, name) , m_schema(0) , m_keyIcon(SmallIcon("key")) , m_noIcon(KexiUtils::emptyIcon(KIcon::Small)) @@ -59,14 +59,14 @@ KexiFieldListView::KexiFieldListView(QWidget *parent, const char *name, int opti if (m_options & ShowDataTypes) addColumn(i18n("Data Type")); if (m_options & AllowMultiSelection) - setSelectionMode(QListView::Extended); - setResizeMode(QListView::LastColumn); + setSelectionMode(TQListView::Extended); + setResizeMode(TQListView::LastColumn); // header()->hide(); setSorting(-1, true); // disable sorting setDragEnabled(true); - connect(this, SIGNAL(doubleClicked(QListViewItem*, const QPoint &, int)), - this, SLOT(slotDoubleClicked(QListViewItem*))); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)), + this, TQT_SLOT(slotDoubleClicked(TQListViewItem*))); } KexiFieldListView::~KexiFieldListView() @@ -117,16 +117,16 @@ void KexiFieldListView::setSchema(KexiDB::TableOrQuerySchema* schema) } #if 0 -QSize KexiFieldListView::sizeHint() +TQSize KexiFieldListView::tqsizeHint() { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); kdDebug() << m_table->name() << " cw=" << columnWidth(1) + fm.width("i") << ", " << fm.width(m_table->name()+" ") << endl; - QSize s( - QMAX( columnWidth(1) + fm.width("i"), fm.width(m_table->name()+" ")), + TQSize s( + TQMAX( columnWidth(1) + fm.width("i"), fm.width(m_table->name()+" ")), childCount()*firstChild()->totalHeight() + 4 ); -// QSize s( columnWidth(1), childCount()*firstChild()->totalHeight() + 3*firstChild()->totalHeight()/10); +// TQSize s( columnWidth(1), childCount()*firstChild()->totalHeight() + 3*firstChild()->totalHeight()/10); return s; } @@ -137,11 +137,11 @@ void KexiFieldListView::setReadOnly(bool b) } #endif -QDragObject* KexiFieldListView::dragObject() +TQDragObject* KexiFieldListView::dragObject() { if (!schema()) return 0; - const QStringList selectedFields( selectedFieldNames() ); + const TQStringList selectedFields( selectedFieldNames() ); return new KexiFieldDrag(m_schema->table() ? "kexi/table" : "kexi/query", m_schema->name(), selectedFields, this, "KexiFieldDrag"); /* if (selectedItem()) { @@ -151,12 +151,12 @@ QDragObject* KexiFieldListView::dragObject() }*/ } -QStringList KexiFieldListView::selectedFieldNames() const +TQStringList KexiFieldListView::selectedFieldNames() const { if (!schema()) - return QStringList(); - QStringList selectedFields; - for (QListViewItem *item = firstChild(); item; item = item->nextSibling()) { + return TQStringList(); + TQStringList selectedFields; + for (TQListViewItem *item = firstChild(); item; item = item->nextSibling()) { if (item->isSelected()) { //! @todo what about query fields/aliases? it.current()->text(0) can be not enough if (item == m_allColumnsItem && m_allColumnsItem) @@ -168,7 +168,7 @@ QStringList KexiFieldListView::selectedFieldNames() const return selectedFields; } -void KexiFieldListView::slotDoubleClicked(QListViewItem* item) +void KexiFieldListView::slotDoubleClicked(TQListViewItem* item) { if (schema() && item) { //! @todo what about query fields/aliases? it.current()->text(0) can be not enough |