summaryrefslogtreecommitdiffstats
path: root/kitchensync/src/kwidgetlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kitchensync/src/kwidgetlist.cpp')
-rw-r--r--kitchensync/src/kwidgetlist.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kitchensync/src/kwidgetlist.cpp b/kitchensync/src/kwidgetlist.cpp
index 450a719e8..d34fcb2b3 100644
--- a/kitchensync/src/kwidgetlist.cpp
+++ b/kitchensync/src/kwidgetlist.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kglobalsettings.h>
@@ -33,20 +33,20 @@ class KWidgetList::Private
{
}
- QValueList<KWidgetListItem*> mItems;
+ TQValueList<KWidgetListItem*> mItems;
KWidgetListItem *mSelectedItem;
- QVBox *mBox;
+ TQVBox *mBox;
};
-KWidgetList::KWidgetList( QWidget *parent, const char *name )
- : QScrollView( parent, name ),
+KWidgetList::KWidgetList( TQWidget *parent, const char *name )
+ : TQScrollView( parent, name ),
d( new Private )
{
- d->mBox = new QVBox( viewport() );
+ d->mBox = new TQVBox( viewport() );
addChild( d->mBox );
setResizePolicy( AutoOneFit );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
viewport()->setFocus();
}
@@ -71,7 +71,7 @@ void KWidgetList::appendItem( KWidgetListItem *item )
if ( !d->mItems.contains( item ) ) {
d->mItems.append( item );
- item->reparent( d->mBox, 0, QPoint( 0, 0 ), true );
+ item->reparent( d->mBox, 0, TQPoint( 0, 0 ), true );
item->setSelected( false );
item->installEventFilter( this );
@@ -111,7 +111,7 @@ void KWidgetList::removeItem( int index )
void KWidgetList::takeItem( KWidgetListItem *item )
{
d->mItems.remove( item );
- item->reparent( 0, 0, QPoint( 0, 0 ) );
+ item->reparent( 0, 0, TQPoint( 0, 0 ) );
item->removeEventFilter( this );
item->hide();
@@ -174,7 +174,7 @@ int KWidgetList::index( KWidgetListItem *item ) const
void KWidgetList::clear()
{
- QValueList<KWidgetListItem*>::Iterator it;
+ TQValueList<KWidgetListItem*>::Iterator it;
for ( it = d->mItems.begin(); it != d->mItems.end(); ++it )
delete *it;
@@ -188,12 +188,12 @@ void KWidgetList::setFocus()
viewport()->setFocus();
}
-bool KWidgetList::eventFilter( QObject *object, QEvent *event )
+bool KWidgetList::eventFilter( TQObject *object, TQEvent *event )
{
- if ( event->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *mouseEvent = static_cast<QMouseEvent*>( event );
+ if ( event->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *mouseEvent = static_cast<TQMouseEvent*>( event );
if ( mouseEvent->button() & LeftButton ) {
- QValueList<KWidgetListItem*>::Iterator it;
+ TQValueList<KWidgetListItem*>::Iterator it;
for ( it = d->mItems.begin(); it != d->mItems.end(); ++it ) {
if ( *it == object ) {
if ( d->mItems.count() != 1 ) {
@@ -204,8 +204,8 @@ bool KWidgetList::eventFilter( QObject *object, QEvent *event )
}
}
}
- } else if ( event->type() == QEvent::MouseButtonDblClick ) {
- QValueList<KWidgetListItem*>::Iterator it;
+ } else if ( event->type() == TQEvent::MouseButtonDblClick ) {
+ TQValueList<KWidgetListItem*>::Iterator it;
for ( it = d->mItems.begin(); it != d->mItems.end(); ++it ) {
if ( *it == object ) {
if ( d->mItems.count() != 1 ) {
@@ -215,8 +215,8 @@ bool KWidgetList::eventFilter( QObject *object, QEvent *event )
return true;
}
}
- } else if ( event->type() == QEvent::KeyPress ) {
- QKeyEvent *keyEvent = static_cast<QKeyEvent*>( event );
+ } else if ( event->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *keyEvent = static_cast<TQKeyEvent*>( event );
if ( keyEvent->key() == Qt::Key_Up ) {
if ( d->mSelectedItem == 0 ) {
if ( !d->mItems.isEmpty() ) {
@@ -253,18 +253,18 @@ bool KWidgetList::eventFilter( QObject *object, QEvent *event )
}
}
- return QScrollView::eventFilter( object, event );
+ return TQScrollView::eventFilter( object, event );
}
KWidgetListItem::KWidgetListItem( KWidgetList *parent, const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
mForegroundColor = KGlobalSettings::textColor();
mBackgroundColor = KGlobalSettings::baseColor();
mSelectionForegroundColor = KGlobalSettings::highlightedTextColor();
mSelectionBackgroundColor = KGlobalSettings::highlightColor();
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
}
KWidgetListItem::~KWidgetListItem()
@@ -282,22 +282,22 @@ void KWidgetListItem::setSelected( bool select )
}
}
-void KWidgetListItem::setForegroundColor( const QColor &color )
+void KWidgetListItem::setForegroundColor( const TQColor &color )
{
mForegroundColor = color;
}
-void KWidgetListItem::setBackgroundColor( const QColor &color )
+void KWidgetListItem::setBackgroundColor( const TQColor &color )
{
mBackgroundColor = color;
}
-void KWidgetListItem::setSelectionForegroundColor( const QColor &color )
+void KWidgetListItem::setSelectionForegroundColor( const TQColor &color )
{
mSelectionForegroundColor = color;
}
-void KWidgetListItem::setSelectionBackgroundColor( const QColor &color )
+void KWidgetListItem::setSelectionBackgroundColor( const TQColor &color )
{
mSelectionBackgroundColor = color;
}