summaryrefslogtreecommitdiffstats
path: root/adept/libadept/taglist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'adept/libadept/taglist.cpp')
-rw-r--r--adept/libadept/taglist.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/adept/libadept/taglist.cpp b/adept/libadept/taglist.cpp
index 22b3d58..f9337c5 100644
--- a/adept/libadept/taglist.cpp
+++ b/adept/libadept/taglist.cpp
@@ -1,11 +1,11 @@
/* -*- C++ -*- adept/taglist.cpp
written by Peter Rockai <me@mornfall.net> */
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <kdebug.h>
-#include <qdragobject.h>
-#include <qevent.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
#include <klocale.h>
#include <apt-front/cache/component/tags.h>
@@ -14,37 +14,37 @@
using namespace adept;
-TagLabel::TagLabel( Tag t, TagList *l, QWidget *p, const char *n )
- : QHBox( p, n ), m_tag( t ), m_list( l )
+TagLabel::TagLabel( Tag t, TagList *l, TQWidget *p, const char *n )
+ : TQHBox( p, n ), m_tag( t ), m_list( l )
{
if ( t == Tag() ) {
- m_description = new QLabel( QString( " " ) + i18n( "[none]" ), this );
+ m_description = new TQLabel( TQString( " " ) + i18n( "[none]" ), this );
} else {
- m_remove = new QLabel( this );
+ m_remove = new TQLabel( this );
m_remove->setPixmap( SmallIcon( u8( "cancel" ) ) );
- m_remove->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- m_description = new QLabel( QString( " [" ) + t.fullname( "n/a" ) + "] "
+ m_remove->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ m_description = new TQLabel( TQString( " [" ) + t.fullname( "n/a" ) + "] "
+ t.shortDescription( "n/a" ), this );
}
}
-void TagLabel::mouseReleaseEvent( QMouseEvent *e ) {
+void TagLabel::mouseReleaseEvent( TQMouseEvent *e ) {
if ( e->button() == Qt::LeftButton &&
- dynamic_cast< QLabel * >( childAt( e->pos() ) ) == m_remove )
+ dynamic_cast< TQLabel * >( tqchildAt( e->pos() ) ) == m_remove )
m_list->setTags( m_list->tags() - m_tag );
}
-TagList::TagList( QWidget *p, const char *n )
- : QVBox( p, n )
+TagList::TagList( TQWidget *p, const char *n )
+ : TQVBox( p, n )
{
- m_name = new QLabel( this );
- m_tagBox = new QVBox( this );
- m_tagBox->setFrameShape( QFrame::Panel );
- m_tagBox->setFrameShadow( QFrame::Sunken );
+ m_name = new TQLabel( this );
+ m_tagBox = new TQVBox( this );
+ m_tagBox->setFrameShape( TQFrame::Panel );
+ m_tagBox->setFrameShadow( TQFrame::Sunken );
m_updateScheduled = false;
setAcceptDrops( true );
scheduleUpdateList();
- m_tagSpacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ m_tagSpacer = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
}
void TagList::setTags( Tag::Set t )
@@ -63,7 +63,7 @@ void TagList::addTag( Tag t )
emit tagsChanged( m_tags );
}
-void TagList::setName( QString n )
+void TagList::setName( TQString n )
{
m_name->setText( n );
}
@@ -72,7 +72,7 @@ void TagList::scheduleUpdateList()
{
if (! m_updateScheduled) {
kdDebug() << "TagList: scheduling update" << endl;
- QTimer::singleShot( 0, this, SLOT( updateList() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateList() ) );
m_updateScheduled = true;
}
}
@@ -88,9 +88,9 @@ void TagList::updateList()
appendLabel( new TagLabel( *i, this, m_tagBox ) );
}
}
- m_tagBox->layout()->addItem( m_tagSpacer );
+ m_tagBox->tqlayout()->addItem( m_tagSpacer );
update();
- parentWidget()->adjustSize();
+ tqparentWidget()->adjustSize();
m_updateScheduled = false;
}
@@ -100,23 +100,23 @@ void TagList::appendLabel( TagLabel *l )
l->show();
}
-void TagList::mouseMoveEvent( QMouseEvent *e ) {
- TagLabel *child = dynamic_cast< TagLabel * >( childAt( e->pos() )->parentWidget() );
+void TagList::mouseMoveEvent( TQMouseEvent *e ) {
+ TagLabel *child = dynamic_cast< TagLabel * >( tqchildAt( e->pos() )->tqparentWidget() );
if ( !child )
return;
- QDragObject *d = new QTextDrag( child->tag().fullname( "" ), this );
+ TQDragObject *d = new TQTextDrag( child->tag().fullname( "" ), this );
d->dragCopy();
}
-void TagList::dragEnterEvent( QDragEnterEvent *e ) {
+void TagList::dragEnterEvent( TQDragEnterEvent *e ) {
kdDebug() << "TagList::dragEnterEvent" << endl;
- e->accept( QTextDrag::canDecode( e ) );
+ e->accept( TQTextDrag::canDecode( e ) );
}
-void TagList::dropEvent( QDropEvent* e ) {
- QString tag;
+void TagList::dropEvent( TQDropEvent* e ) {
+ TQString tag;
kdDebug() << "TagList: drop event" << endl;
- QTextDrag::decode( e, tag );
+ TQTextDrag::decode( e, tag );
try {
addTag( cache::Global::get().tags().tagByName(
static_cast< const char * >( tag.local8Bit() ) ) );
@@ -130,5 +130,5 @@ void TagList::clearList()
delete *i;
}
m_list.clear();
- m_tagBox->layout()->removeItem( m_tagSpacer );
+ m_tagBox->tqlayout()->removeItem( m_tagSpacer );
}