summaryrefslogtreecommitdiffstats
path: root/kaddressbook/views/kaddressbookcardview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/views/kaddressbookcardview.cpp')
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp110
1 files changed, 55 insertions, 55 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index d65c4d71f..7ba89a0ed 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -21,12 +21,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qiconview.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqiconview.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -43,16 +43,16 @@
class CardViewFactory : public ViewFactory
{
public:
- KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name )
+ KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAddressBookCardView( core, parent, name );
}
- QString type() const { return I18N_NOOP("Card"); }
+ TQString type() const { return I18N_NOOP("Card"); }
- QString description() const { return i18n( "Rolodex style cards represent contacts." ); }
+ TQString description() const { return i18n( "Rolodex style cards represent contacts." ); }
- ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent,
+ ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 )
{
return new ConfigureCardViewWidget( ab, parent, name );
@@ -116,7 +116,7 @@ class AddresseeCardViewItem : public CardViewItem
};
-AddresseeCardView::AddresseeCardView( QWidget *parent, const char *name )
+AddresseeCardView::AddresseeCardView( TQWidget *parent, const char *name )
: CardView( parent, name )
{
setAcceptDrops( true );
@@ -126,13 +126,13 @@ AddresseeCardView::~AddresseeCardView()
{
}
-void AddresseeCardView::dragEnterEvent( QDragEnterEvent *event )
+void AddresseeCardView::dragEnterEvent( TQDragEnterEvent *event )
{
- if ( QTextDrag::canDecode( event ) )
+ if ( TQTextDrag::canDecode( event ) )
event->accept();
}
-void AddresseeCardView::dropEvent( QDropEvent *event )
+void AddresseeCardView::dropEvent( TQDropEvent *event )
{
emit addresseeDropped( event );
}
@@ -144,28 +144,28 @@ void AddresseeCardView::startDrag()
KAddressBookCardView::KAddressBookCardView( KAB::Core *core,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KAddressBookView( core, parent, name )
{
mShowEmptyFields = false;
- QVBoxLayout *layout = new QVBoxLayout( viewWidget() );
+ TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() );
mCardView = new AddresseeCardView( viewWidget(), "mCardView" );
mCardView->setSelectionMode( CardView::Extended );
layout->addWidget( mCardView );
// Connect up the signals
- connect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
- connect( mCardView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- connect( mCardView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
- connect( mCardView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- connect( mCardView, SIGNAL( contextMenuRequested( CardViewItem*, const QPoint& ) ),
- this, SLOT( rmbClicked( CardViewItem*, const QPoint& ) ) );
+ connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ connect( mCardView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
+ connect( mCardView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ connect( mCardView, TQT_SIGNAL( contextMenuRequested( CardViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( rmbClicked( CardViewItem*, const TQPoint& ) ) );
}
KAddressBookCardView::~KAddressBookCardView()
@@ -184,19 +184,19 @@ void KAddressBookCardView::readConfig( KConfig *config )
// costum colors?
if ( config->readBoolEntry( "EnableCustomColors", false ) ) {
- QPalette p( mCardView->palette() );
- QColor c = p.color( QPalette::Normal, QColorGroup::Base );
- p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Text );
- p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Button );
- p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::ButtonText );
- p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Highlight );
- p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::HighlightedText );
- p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
+ TQPalette p( mCardView->palette() );
+ TQColor c = p.color( TQPalette::Normal, TQColorGroup::Base );
+ p.setColor( TQPalette::Normal, TQColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Text );
+ p.setColor( TQPalette::Normal, TQColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Button );
+ p.setColor( TQPalette::Normal, TQColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::ButtonText );
+ p.setColor( TQPalette::Normal, TQColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Highlight );
+ p.setColor( TQPalette::Normal, TQColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::HighlightedText );
+ p.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
mCardView->viewport()->setPalette( p );
} else {
// needed if turned off during a session.
@@ -204,7 +204,7 @@ void KAddressBookCardView::readConfig( KConfig *config )
}
//custom fonts?
- QFont f( font() );
+ TQFont f( font() );
if ( config->readBoolEntry( "EnableCustomFonts", false ) ) {
mCardView->setFont( config->readFontEntry( "TextFont", &f ) );
f.setBold( true );
@@ -227,15 +227,15 @@ void KAddressBookCardView::readConfig( KConfig *config )
mCardView->setItemSpacing( config->readNumEntry( "ItemSpacing", 10 ) );
mCardView->setSeparatorWidth( config->readNumEntry( "SeparatorWidth", 2 ) );
- disconnect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ disconnect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
if ( KABPrefs::instance()->honorSingleClick() )
- connect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
else
- connect( mCardView, SIGNAL( doubleClicked( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( doubleClicked( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
}
void KAddressBookCardView::writeConfig( KConfig *config )
@@ -244,9 +244,9 @@ void KAddressBookCardView::writeConfig( KConfig *config )
KAddressBookView::writeConfig( config );
}
-QStringList KAddressBookCardView::selectedUids()
+TQStringList KAddressBookCardView::selectedUids()
{
- QStringList uidList;
+ TQStringList uidList;
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -261,7 +261,7 @@ QStringList KAddressBookCardView::selectedUids()
return uidList;
}
-void KAddressBookCardView::refresh( const QString &uid )
+void KAddressBookCardView::refresh( const TQString &uid )
{
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -282,7 +282,7 @@ void KAddressBookCardView::refresh( const QString &uid )
mCardView->viewport()->update();
// by default nothing is selected
- emit selected( QString::null );
+ emit selected( TQString::null );
} else {
// Try to find the one to refresh
bool found = false;
@@ -296,7 +296,7 @@ void KAddressBookCardView::refresh( const QString &uid )
}
}
-void KAddressBookCardView::setSelected( const QString &uid, bool selected )
+void KAddressBookCardView::setSelected( const TQString &uid, bool selected )
{
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -349,22 +349,22 @@ void KAddressBookCardView::addresseeSelected()
}
if ( !found )
- emit selected( QString::null );
+ emit selected( TQString::null );
}
-void KAddressBookCardView::rmbClicked( CardViewItem*, const QPoint &point )
+void KAddressBookCardView::rmbClicked( CardViewItem*, const TQPoint &point )
{
popup( point );
}
void KAddressBookCardView::scrollUp()
{
- QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
}
void KAddressBookCardView::scrollDown()
{
- QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
}
#include "kaddressbookcardview.moc"