summaryrefslogtreecommitdiffstats
path: root/kitchensync/src/kwidgetlist.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kitchensync/src/kwidgetlist.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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;
}