summaryrefslogtreecommitdiffstats
path: root/src/gui/propertieslistview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/gui/propertieslistview.cpp
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/propertieslistview.cpp')
-rw-r--r--src/gui/propertieslistview.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/gui/propertieslistview.cpp b/src/gui/propertieslistview.cpp
index 5f57aa3..7e55ed0 100644
--- a/src/gui/propertieslistview.cpp
+++ b/src/gui/propertieslistview.cpp
@@ -20,25 +20,25 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qevent.h>
-#include <qheader.h>
-#include <qpushbutton.h>
-#include <qvariant.h>
+#include <tqevent.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
+#include <tqvariant.h>
-PropertiesListView::PropertiesListView(QWidget *parent, const char *name)
- : KListView(parent, name)
+PropertiesListView::PropertiesListView(TQWidget *tqparent, const char *name)
+ : KListView(tqparent, name)
{
addColumn(i18n("Property"));
addColumn(i18n("Data"));
setFullWidth(true);
- setColumnAlignment(1,Qt::AlignRight);
+ setColumnAlignment(1,TQt::AlignRight);
p_lastItem = 0l;
m_diffBt = 0L;
- connect(this,SIGNAL(selectionChanged(QListViewItem*)),this,SLOT(slotSelectionChanged(QListViewItem*)));
+ connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem*)),this,TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
m_editor = 0L;
- connect(header(),SIGNAL(sizeChange(int,int,int)),this,SLOT(headerSizeChanged(int,int,int)));
+ connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(headerSizeChanged(int,int,int)));
}
PropertiesListView::~PropertiesListView()
@@ -124,7 +124,7 @@ void PropertiesListView::slotUpdate( ItemGroup * itemGroup )
}
}
-void PropertiesListView::slotSelectionChanged(QListViewItem *item)
+void PropertiesListView::slotSelectionChanged(TQListViewItem *item)
{
if (!item) return;
destroyEditor();
@@ -185,24 +185,24 @@ void PropertiesListView::slotSelectionChanged(QListViewItem *item)
}
}
- connect(p_lastItem->data(),SIGNAL(destroyed()),this,SLOT(destroyEditor()));
+ connect(p_lastItem->data(),TQT_SIGNAL(destroyed()),this,TQT_SLOT(destroyEditor()));
// Connect so that changes in the editor change the canvas item data.
- connect(m_editor,SIGNAL(editorDataChanged(const QString&,QVariant)),ItemInterface::self(),SLOT(slotSetData(const QString&,QVariant)));
- connect(m_editor,SIGNAL(editorDataChanged(const QString&,QVariant)),this,SLOT(slotDataChanged(const QString&,QVariant)));
+ connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),ItemInterface::self(),TQT_SLOT(slotSetData(const TQString&,TQVariant)));
+ connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),this,TQT_SLOT(slotDataChanged(const TQString&,TQVariant)));
int x = columnWidth(0);
- int y = viewportToContents(QPoint(0,itemRect(p_lastItem).y())).y();
+ int y = viewportToContents(TQPoint(0,tqitemRect(p_lastItem).y())).y();
addChild(m_editor,x,y);
m_editor->setFocus();
m_editor->show();
- m_editor->setGeometry(QRect(x,y,columnWidth(1),itemRect(p_lastItem).height()));
+ m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height()));
if(p_lastItem->data()->type() == Variant::Type::FileName)
{
// The folder button in the KURLComboBox has a minimum size taller than
// the height of the ListViewItems so this is a temporary kludge to
// make it look slightly acceptable.
- m_editor->setGeometry(QRect(x,y,columnWidth(1),itemRect(p_lastItem).height()+7));
+ m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height()+7));
}
// Active the editor as appropriate
@@ -271,13 +271,13 @@ void PropertiesListView::headerSizeChanged(int section, int /*oldSize*/, int new
// Resize the editor to the new column width
// and move it to the right place.
- QRect rect = m_editor->geometry();
+ TQRect rect = m_editor->tqgeometry();
rect.setWidth(newSize);
rect.setX( columnWidth(0) );
m_editor->setGeometry(rect);
}
-void PropertiesListView::slotDataChanged(const QString &/*id*/, QVariant data)
+void PropertiesListView::slotDataChanged(const TQString &/*id*/, TQVariant data)
{
PLVItem *pItem = static_cast<PLVItem*>(currentItem());
pItem->updateData(data);
@@ -285,7 +285,7 @@ void PropertiesListView::slotDataChanged(const QString &/*id*/, QVariant data)
void PropertiesListView::slotMergeProperties()
{
- for( QListViewItemIterator it( this ); it.current(); ++it )
+ for( TQListViewItemIterator it( this ); it.current(); ++it )
{
PLVItem * pItem = static_cast<PLVItem*>(it.current());
if (pItem->isEnabled())
@@ -302,7 +302,7 @@ void PropertiesListView::slotMergeProperties()
void PropertiesListView::slotSetDefaults()
{
- for( QListViewItemIterator it( this ); it.current(); ++it )
+ for( TQListViewItemIterator it( this ); it.current(); ++it )
{
PLVItem *pItem = static_cast<PLVItem*>(it.current());
ItemInterface::self()->slotSetData(pItem->id(),pItem->data()->defaultValue());
@@ -310,13 +310,13 @@ void PropertiesListView::slotSetDefaults()
}
-void PropertiesListView::wheelEvent( QWheelEvent *e )
+void PropertiesListView::wheelEvent( TQWheelEvent *e )
{
- QPoint _pos = contentsToViewport(e->pos());
+ TQPoint _pos = contentsToViewport(e->pos());
_pos -= pos();
_pos.setY( _pos.y()+header()->height() );
- QListViewItem *item = itemAt(_pos);
- if ( item && item != dynamic_cast<QListViewItem*>(p_lastItem) )
+ TQListViewItem *item = itemAt(_pos);
+ if ( item && item != dynamic_cast<TQListViewItem*>(p_lastItem) )
{
e->accept();
if(!item->isSelected()) slotSelectionChanged(item);