diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kmid/kdisptext.cpp | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmid/kdisptext.cpp')
-rw-r--r-- | kmid/kdisptext.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kmid/kdisptext.cpp b/kmid/kdisptext.cpp index 7d160c2f..cc1eb4d3 100644 --- a/kmid/kdisptext.cpp +++ b/kmid/kdisptext.cpp @@ -22,11 +22,11 @@ ***************************************************************************/ #include "kdisptext.h" -#include <qpainter.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qrect.h> -#include <qtextcodec.h> +#include <tqpainter.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqrect.h> +#include <tqtextcodec.h> #include <kconfig.h> #include <kglobal.h> @@ -40,7 +40,7 @@ //#define DRAW_BOUNDING_RECTS -KDisplayText::KDisplayText(QWidget *parent,const char *name) : QScrollView(parent,name) +KDisplayText::KDisplayText(TQWidget *parent,const char *name) : TQScrollView(parent,name) { first_line_[0]=first_line_[1]=NULL; linked_list_[0]=linked_list_[1]=NULL; @@ -54,15 +54,15 @@ KDisplayText::KDisplayText(QWidget *parent,const char *name) : QScrollView(paren nlines=0; lyrics_codec=KGlobal::locale()->codecForEncoding(); - viewport()->setBackgroundColor(QColor (110,110,110)); + viewport()->setBackgroundColor(TQColor (110,110,110)); // setBackgroundMode(NoBackground); KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); typeoftextevents=kcfg->readNumEntry("TypeOfTextEvents",1); - QFont *qtextfontdefault=new QFont(KGlobalSettings::fixedFont().family(),22); - qtextfont=new QFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); + TQFont *qtextfontdefault=new TQFont(KGlobalSettings::fixedFont().family(),22); + qtextfont=new TQFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); delete qtextfontdefault; - qfmetr=new QFontMetrics(*qtextfont); + qfmetr=new TQFontMetrics(*qtextfont); nvisiblelines=height()/qfmetr->lineSpacing(); autoscrollv=0; } @@ -261,7 +261,7 @@ while (t!=NULL) return start; } -void KDisplayText::drawContents(QPainter *p, int /*clipx*/, int clipy, int /*clipw*/, int cliph) +void KDisplayText::drawContents(TQPainter *p, int /*clipx*/, int clipy, int /*clipw*/, int cliph) { p->setFont(*qtextfont); if (linked_list==NULL) return; @@ -320,9 +320,9 @@ void KDisplayText::drawContents(QPainter *p, int /*clipx*/, int clipy, int /*cli } -void KDisplayText::resizeEvent(QResizeEvent *e) +void KDisplayText::resizeEvent(TQResizeEvent *e) { - QScrollView::resizeEvent(e); + TQScrollView::resizeEvent(e); nvisiblelines=visibleHeight()/qfmetr->lineSpacing(); if ( (nlines>nvisiblelines) || (nvisiblelines==0) ) resizeContents(maxX[(typeoftextevents==1)?0:1],maxY[(typeoftextevents==1)?0:1]); @@ -492,7 +492,7 @@ void KDisplayText::gotomsec(ulong i) } } -QFont *KDisplayText::getFont(void) +TQFont *KDisplayText::getFont(void) { return qtextfont; } @@ -501,11 +501,11 @@ void KDisplayText::fontChanged(void) { KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); - QFont *qtextfontdefault=new QFont(*qtextfont); + TQFont *qtextfontdefault=new TQFont(*qtextfont); delete qtextfont; - qtextfont=new QFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); + qtextfont=new TQFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); delete qtextfontdefault; - qfmetr=new QFontMetrics(*qtextfont); + qfmetr=new TQFontMetrics(*qtextfont); calculatePositions(); nvisiblelines=height()/qfmetr->lineSpacing(); viewport()->repaint(TRUE); @@ -587,7 +587,7 @@ void KDisplayText::saveLyrics(FILE *fh) } } -void KDisplayText::timerEvent(QTimerEvent *e) +void KDisplayText::timerEvent(TQTimerEvent *e) { int dy; if (autoscrollv>0) @@ -619,13 +619,13 @@ void KDisplayText::timerEvent(QTimerEvent *e) } -void KDisplayText::setLyricsEncoding(const QString &enc) +void KDisplayText::setLyricsEncoding(const TQString &enc) { - QTextCodec *newcodec; + TQTextCodec *newcodec; if (enc.isEmpty()) newcodec=KGlobal::locale()->codecForEncoding(); else - newcodec=QTextCodec::codecForName(enc.latin1()); + newcodec=TQTextCodec::codecForName(enc.latin1()); if (newcodec!=lyrics_codec) { |