summaryrefslogtreecommitdiffstats
path: root/atlantik/libatlantikui/kwrappedlistviewitem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /atlantik/libatlantikui/kwrappedlistviewitem.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'atlantik/libatlantikui/kwrappedlistviewitem.cpp')
-rw-r--r--atlantik/libatlantikui/kwrappedlistviewitem.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/atlantik/libatlantikui/kwrappedlistviewitem.cpp b/atlantik/libatlantikui/kwrappedlistviewitem.cpp
index 7bd9e2cf..38c0d636 100644
--- a/atlantik/libatlantikui/kwrappedlistviewitem.cpp
+++ b/atlantik/libatlantikui/kwrappedlistviewitem.cpp
@@ -22,8 +22,8 @@
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
-#include <qheader.h>
-#include <qstring.h>
+#include <tqheader.h>
+#include <tqstring.h>
#include <kglobalsettings.h>
#include <klistview.h>
@@ -31,14 +31,14 @@
#include "kwrappedlistviewitem.h"
-KWrappedListViewItem::KWrappedListViewItem( QListView *parent, QString text, QString t2 )
-: QObject(), KListViewItem( parent )
+KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQString text, TQString t2 )
+: TQObject(), KListViewItem( parent )
{
init( parent, text, t2 );
}
-KWrappedListViewItem::KWrappedListViewItem( QListView *parent, QListViewItem *after, QString text, QString t2 )
-: QObject(), KListViewItem( parent, after )
+KWrappedListViewItem::KWrappedListViewItem( TQListView *parent, TQListViewItem *after, TQString text, TQString t2 )
+: TQObject(), KListViewItem( parent, after )
{
init( parent, text, t2 );
}
@@ -49,7 +49,7 @@ void KWrappedListViewItem::setup()
}
/*
-int KWrappedListViewItem::width( const QFontMetrics&, const QListView*, int ) const
+int KWrappedListViewItem::width( const TQFontMetrics&, const TQListView*, int ) const
{
return m_wrap->boundingRect().width();
}
@@ -60,12 +60,12 @@ void KWrappedListViewItem::wrapColumn( int c )
if ( c != m_wrapColumn )
return;
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
- QFont font = QFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal );
- QFontMetrics fm = QFontMetrics( font );
+ TQFont font = TQFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal );
+ TQFontMetrics fm = TQFontMetrics( font );
int wrapWidth = lv->width();
for ( int i = 0 ; i < m_wrapColumn ; i++ )
@@ -74,16 +74,16 @@ void KWrappedListViewItem::wrapColumn( int c )
if ( pixmap(c) )
wrapWidth -= ( pixmap( c )->width() + lv->itemMargin() );
- QScrollBar *scrollBar = lv->verticalScrollBar();
+ TQScrollBar *scrollBar = lv->verticalScrollBar();
if ( !scrollBar->isHidden() )
wrapWidth -= scrollBar->width();
- QRect rect = QRect( 0, 0, wrapWidth - 20, -1 );
+ TQRect rect = TQRect( 0, 0, wrapWidth - 20, -1 );
KWordWrap *wrap = KWordWrap::formatText( fm, rect, 0, m_origText );
setText( c, wrap->wrappedString() );
- int lc = text(c).contains( QChar( '\n' ) ) + 1;
+ int lc = text(c).contains( TQChar( '\n' ) ) + 1;
setHeight( wrap->boundingRect().height() + lc*lv->itemMargin() );
widthChanged( c );
@@ -91,11 +91,11 @@ void KWrappedListViewItem::wrapColumn( int c )
delete wrap;
}
-void KWrappedListViewItem::init( QListView *parent, QString text, QString t2 )
+void KWrappedListViewItem::init( TQListView *parent, TQString text, TQString t2 )
{
m_wrapColumn = 0;
setMultiLinesEnabled( true );
- parent->setResizeMode( QListView::LastColumn );
+ parent->setResizeMode( TQListView::LastColumn );
m_origText = text;
@@ -110,7 +110,7 @@ void KWrappedListViewItem::init( QListView *parent, QString text, QString t2 )
wrapColumn( m_wrapColumn );
- connect( parent->header(), SIGNAL(sizeChange(int, int, int)), this, SLOT(wrapColumn(int)));
+ connect( parent->header(), TQT_SIGNAL(sizeChange(int, int, int)), this, TQT_SLOT(wrapColumn(int)));
}
#include "kwrappedlistviewitem.moc"