summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/chatwindow/emoticonselector.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/kopete/chatwindow/emoticonselector.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/kopete/chatwindow/emoticonselector.cpp')
-rw-r--r--kopete/kopete/chatwindow/emoticonselector.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kopete/kopete/chatwindow/emoticonselector.cpp b/kopete/kopete/chatwindow/emoticonselector.cpp
index e6802b45..47dd1a59 100644
--- a/kopete/kopete/chatwindow/emoticonselector.cpp
+++ b/kopete/kopete/chatwindow/emoticonselector.cpp
@@ -24,25 +24,25 @@
#include <math.h>
-#include <qmovie.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qtooltip.h>
-#include <qobjectlist.h>
+#include <tqmovie.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqtooltip.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
-EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapPath, QWidget *parent, const char *name)
- : QLabel(parent,name)
+EmoticonLabel::EmoticonLabel(const TQString &emoticonText, const TQString &pixmapPath, TQWidget *parent, const char *name)
+ : TQLabel(parent,name)
{
mText = emoticonText;
- setMovie( QMovie(pixmapPath) );
+ setMovie( TQMovie(pixmapPath) );
setAlignment(Qt::AlignCenter);
- QToolTip::add(this,emoticonText);
- // Somehow QLabel doesn't tell a reasonable size when you use setMovie
+ TQToolTip::add(this,emoticonText);
+ // Somehow TQLabel doesn't tell a reasonable size when you use setMovie
// although it does it correctly for setPixmap. Therefore here is a little workaround
// to tell our minimum size.
- QPixmap p(pixmapPath);
+ TQPixmap p(pixmapPath);
//
// Some of the custom icons are rather large
// so lets limit them to a maximum size for this display panel
@@ -52,13 +52,13 @@ EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapP
setMinimumSize(p.size());
}
-void EmoticonLabel::mouseReleaseEvent(QMouseEvent*)
+void EmoticonLabel::mouseReleaseEvent(TQMouseEvent*)
{
emit clicked(mText);
}
-EmoticonSelector::EmoticonSelector(QWidget *parent, const char *name)
- : QWidget(parent, name)
+EmoticonSelector::EmoticonSelector(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
// kdDebug(14000) << k_funcinfo << "called." << endl;
lay = 0L;
@@ -69,13 +69,13 @@ void EmoticonSelector::prepareList(void)
// kdDebug(14000) << k_funcinfo << "called." << endl;
int row = 0;
int col = 0;
- QMap<QString, QStringList> list = Kopete::Emoticons::self()->emoticonAndPicList();
+ TQMap<TQString, TQStringList> list = Kopete::Emoticons::self()->emoticonAndPicList();
int emoticonsPerRow = static_cast<int>(sqrt(list.count()));
//kdDebug(14000) << "emoticonsPerRow=" << emoticonsPerRow << endl;
if ( lay )
{
- QObjectList *objList = queryList( "EmoticonLabel" );
+ TQObjectList *objList = queryList( "EmoticonLabel" );
//kdDebug(14000) << k_funcinfo << "There are " << objList->count() << " EmoticonLabels to delete." << endl;
objList->setAutoDelete(true);
objList->clear();
@@ -83,13 +83,13 @@ void EmoticonSelector::prepareList(void)
delete lay;
}
- lay = new QGridLayout(this, 0, 0, 4, 4, "emoticonLayout");
+ lay = new TQGridLayout(this, 0, 0, 4, 4, "emoticonLayout");
movieList.clear();
- for (QMap<QString, QStringList>::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
+ for (TQMap<TQString, TQStringList>::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
{
- QWidget *w = new EmoticonLabel(it.data().first(), it.key(), this);
- movieList.push_back( ((QLabel*)w)->movie() );
- connect(w, SIGNAL(clicked(const QString&)), this, SLOT(emoticonClicked(const QString&)));
+ TQWidget *w = new EmoticonLabel(it.data().first(), it.key(), this);
+ movieList.push_back( ((TQLabel*)w)->movie() );
+ connect(w, TQT_SIGNAL(clicked(const TQString&)), this, TQT_SLOT(emoticonClicked(const TQString&)));
// kdDebug(14000) << "adding Emoticon to row=" << row << ", col=" << col << "." << endl;
lay->addWidget(w, row, col);
if ( col == emoticonsPerRow )
@@ -103,19 +103,19 @@ void EmoticonSelector::prepareList(void)
resize(minimumSizeHint());
}
-void EmoticonSelector::emoticonClicked(const QString &str)
+void EmoticonSelector::emoticonClicked(const TQString &str)
{
// kdDebug(14000) << "selected emoticon '" << str << "'" << endl;
// KDE4/Qt TODO: use qobject_cast instead.
emit ItemSelected ( str );
if ( isVisible() && parentWidget() &&
- parentWidget()->inherits("QPopupMenu") )
+ parentWidget()->inherits("TQPopupMenu") )
{
parentWidget()->close();
}
}
-void EmoticonSelector::hideEvent( QHideEvent* )
+void EmoticonSelector::hideEvent( TQHideEvent* )
{
kdDebug( 14000 ) << k_funcinfo << endl;
MovieList::iterator it;
@@ -125,7 +125,7 @@ void EmoticonSelector::hideEvent( QHideEvent* )
}
}
-void EmoticonSelector::showEvent( QShowEvent* )
+void EmoticonSelector::showEvent( TQShowEvent* )
{
kdDebug( 14000 ) << k_funcinfo << endl;
MovieList::iterator it;