summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/ui/keylistview.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 /certmanager/lib/ui/keylistview.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 'certmanager/lib/ui/keylistview.cpp')
-rw-r--r--certmanager/lib/ui/keylistview.cpp306
1 files changed, 153 insertions, 153 deletions
diff --git a/certmanager/lib/ui/keylistview.cpp b/certmanager/lib/ui/keylistview.cpp
index 98534a4b7..fa8c9eb83 100644
--- a/certmanager/lib/ui/keylistview.cpp
+++ b/certmanager/lib/ui/keylistview.cpp
@@ -38,17 +38,17 @@
#include <kdebug.h>
-#include <qfontmetrics.h>
-#include <qtooltip.h>
-#include <qrect.h>
-#include <qheader.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qpainter.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qtimer.h>
-#include <qcstring.h>
+#include <tqfontmetrics.h>
+#include <tqtooltip.h>
+#include <tqrect.h>
+#include <tqheader.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqpainter.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqtimer.h>
+#include <tqcstring.h>
#include <gpgmepp/key.h>
@@ -61,27 +61,27 @@ static const int updateDelayMilliSecs = 500;
namespace {
- class ItemToolTip : public QToolTip {
+ class ItemToolTip : public TQToolTip {
public:
ItemToolTip( Kleo::KeyListView * parent );
protected:
- void maybeTip( const QPoint & p );
+ void maybeTip( const TQPoint & p );
private:
Kleo::KeyListView * mKeyListView;
};
ItemToolTip::ItemToolTip( Kleo::KeyListView * parent )
- : QToolTip( parent->viewport() ), mKeyListView( parent ) {}
+ : TQToolTip( parent->viewport() ), mKeyListView( parent ) {}
- void ItemToolTip::maybeTip( const QPoint & p ) {
+ void ItemToolTip::maybeTip( const TQPoint & p ) {
if ( !mKeyListView )
return;
- const QListViewItem * item = mKeyListView->itemAt( p );
+ const TQListViewItem * item = mKeyListView->itemAt( p );
if ( !item )
return;
- const QRect itemRect = mKeyListView->itemRect( item );
+ const TQRect itemRect = mKeyListView->itemRect( item );
if ( !itemRect.isValid() )
return;
@@ -89,14 +89,14 @@ namespace {
if ( col == -1 )
return;
- const QRect headerRect = mKeyListView->header()->sectionRect( col );
+ const TQRect headerRect = mKeyListView->header()->sectionRect( col );
if ( !headerRect.isValid() )
return;
- const QRect cellRect( headerRect.left(), itemRect.top(),
+ const TQRect cellRect( headerRect.left(), itemRect.top(),
headerRect.width(), itemRect.height() );
- QString tipStr;
+ TQString tipStr;
if ( const Kleo::KeyListViewItem * klvi = Kleo::lvi_cast<Kleo::KeyListViewItem>( item ) )
tipStr = klvi->toolTip( col );
else
@@ -112,30 +112,30 @@ struct Kleo::KeyListView::Private {
Private() : updateTimer( 0 ), itemToolTip( 0 ) {}
std::vector<GpgME::Key> keyBuffer;
- QTimer * updateTimer;
- QToolTip * itemToolTip;
- std::map<QCString,KeyListViewItem*> itemMap;
+ TQTimer * updateTimer;
+ TQToolTip * itemToolTip;
+ std::map<TQCString,KeyListViewItem*> itemMap;
};
-// a list of signals where we want to replace QListViewItem with
+// a list of signals where we want to replace TQListViewItem with
// Kleo:KeyListViewItem:
static const struct {
const char * source;
const char * target;
} signalReplacements[] = {
- { SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- SLOT(slotEmitDoubleClicked(QListViewItem*,const QPoint&,int)) },
- { SIGNAL(returnPressed(QListViewItem*)),
- SLOT(slotEmitReturnPressed(QListViewItem*)) },
- { SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotEmitSelectionChanged(QListViewItem*)) },
- { SIGNAL(contextMenu(KListView*, QListViewItem*,const QPoint&)),
- SLOT(slotEmitContextMenu(KListView*, QListViewItem*,const QPoint&)) },
+ { TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ TQT_SLOT(slotEmitDoubleClicked(TQListViewItem*,const TQPoint&,int)) },
+ { TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(slotEmitReturnPressed(TQListViewItem*)) },
+ { TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotEmitSelectionChanged(TQListViewItem*)) },
+ { TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*,const TQPoint&)),
+ TQT_SLOT(slotEmitContextMenu(KListView*, TQListViewItem*,const TQPoint&)) },
};
static const int numSignalReplacements = sizeof signalReplacements / sizeof *signalReplacements;
-Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const DisplayStrategy * displayStrategy, QWidget * parent, const char * name, WFlags f )
+Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const DisplayStrategy * displayStrategy, TQWidget * parent, const char * name, WFlags f )
: KListView( parent, name ),
mColumnStrategy( columnStrategy ),
mDisplayStrategy ( displayStrategy ),
@@ -145,15 +145,15 @@ Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const Dis
d = new Private();
- d->updateTimer = new QTimer( this );
- connect( d->updateTimer, SIGNAL(timeout()), SLOT(slotUpdateTimeout()) );
+ d->updateTimer = new TQTimer( this );
+ connect( d->updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdateTimeout()) );
if ( !columnStrategy ) {
kdWarning(5150) << "Kleo::KeyListView: need a column strategy to work with!" << endl;
return;
}
- const QFontMetrics fm = fontMetrics();
+ const TQFontMetrics fm = fontMetrics();
for ( int col = 0 ; !columnStrategy->title( col ).isEmpty() ; ++col ) {
addColumn( columnStrategy->title( col ), columnStrategy->width( col, fm ) );
@@ -166,33 +166,33 @@ Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const Dis
for ( int i = 0 ; i < numSignalReplacements ; ++i )
connect( this, signalReplacements[i].source, signalReplacements[i].target );
- QToolTip::remove( this );
- QToolTip::remove( viewport() ); // make double sure :)
+ TQToolTip::remove( this );
+ TQToolTip::remove( viewport() ); // make double sure :)
d->itemToolTip = new ItemToolTip( this );
}
Kleo::KeyListView::~KeyListView() {
d->updateTimer->stop();
- // need to clear here, since in ~QListView, our children won't have
+ // need to clear here, since in ~TQListView, our children won't have
// a valid listView() pointing to us anymore, and their dtors try to
// unregister from us.
clear();
assert( d->itemMap.size() == 0 );
- // need to delete the tooltip ourselves, as ~QToolTip isn't virtual :o
+ // need to delete the tooltip ourselves, as ~TQToolTip isn't virtual :o
delete d->itemToolTip; d->itemToolTip = 0;
delete d; d = 0;
delete mColumnStrategy; mColumnStrategy = 0;
delete mDisplayStrategy; mDisplayStrategy = 0;
}
-void Kleo::KeyListView::insertItem( QListViewItem * qlvi ) {
+void Kleo::KeyListView::insertItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListView::insertItem( " << qlvi << " )" << endl;
KListView::insertItem( qlvi );
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
registerItem( item );
}
-void Kleo::KeyListView::takeItem( QListViewItem * qlvi ) {
+void Kleo::KeyListView::takeItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListView::takeItem( " << qlvi << " )" << endl;
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
deregisterItem( item );
@@ -251,7 +251,7 @@ void Kleo::KeyListView::registerItem( KeyListViewItem * item ) {
//kdDebug() << "registerItem( " << item << " )" << endl;
if ( !item )
return;
- const QCString fpr = item->key().primaryFingerprint();
+ const TQCString fpr = item->key().primaryFingerprint();
if ( !fpr.isEmpty() )
d->itemMap.insert( std::make_pair( fpr, item ) );
}
@@ -260,7 +260,7 @@ void Kleo::KeyListView::deregisterItem( const KeyListViewItem * item ) {
//kdDebug() << "deregisterItem( KeyLVI: " << item << " )" << endl;
if ( !item )
return;
- std::map<QCString,KeyListViewItem*>::iterator it
+ std::map<TQCString,KeyListViewItem*>::iterator it
= d->itemMap.find( item->key().primaryFingerprint() );
if ( it == d->itemMap.end() )
return;
@@ -271,7 +271,7 @@ void Kleo::KeyListView::deregisterItem( const KeyListViewItem * item ) {
}
void Kleo::KeyListView::doHierarchicalInsert( const GpgME::Key & key ) {
- const QCString fpr = key.primaryFingerprint();
+ const TQCString fpr = key.primaryFingerprint();
if ( fpr.isEmpty() )
return;
KeyListViewItem * item = 0;
@@ -303,10 +303,10 @@ void Kleo::KeyListView::gatherScattered() {
}
}
-void Kleo::KeyListView::scatterGathered( QListViewItem * start ) {
- QListViewItem * item = start;
+void Kleo::KeyListView::scatterGathered( TQListViewItem * start ) {
+ TQListViewItem * item = start;
while ( item ) {
- QListViewItem * cur = item;
+ TQListViewItem * cur = item;
item = item->nextSibling();
scatterGathered( cur->firstChild() );
@@ -321,10 +321,10 @@ void Kleo::KeyListView::scatterGathered( QListViewItem * start ) {
}
}
-Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const QCString & s ) const {
+Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const TQCString & s ) const {
if ( s.isEmpty() )
return 0;
- const std::map<QCString,KeyListViewItem*>::const_iterator it = d->itemMap.find( s );
+ const std::map<TQCString,KeyListViewItem*>::const_iterator it = d->itemMap.find( s );
if ( it == d->itemMap.end() )
return 0;
return it->second;
@@ -344,22 +344,22 @@ void Kleo::KeyListView::slotRefreshKey( const GpgME::Key & key ) {
// slots for the emission of covariant signals:
-void Kleo::KeyListView::slotEmitDoubleClicked( QListViewItem * item, const QPoint & p, int col ) {
+void Kleo::KeyListView::slotEmitDoubleClicked( TQListViewItem * item, const TQPoint & p, int col ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit doubleClicked( static_cast<KeyListViewItem*>( item ), p, col );
}
-void Kleo::KeyListView::slotEmitReturnPressed( QListViewItem * item ) {
+void Kleo::KeyListView::slotEmitReturnPressed( TQListViewItem * item ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit returnPressed( static_cast<KeyListViewItem*>( item ) );
}
-void Kleo::KeyListView::slotEmitSelectionChanged( QListViewItem * item ) {
+void Kleo::KeyListView::slotEmitSelectionChanged( TQListViewItem * item ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit selectionChanged( static_cast<KeyListViewItem*>( item ) );
}
-void Kleo::KeyListView::slotEmitContextMenu( KListView*, QListViewItem * item, const QPoint & p ) {
+void Kleo::KeyListView::slotEmitContextMenu( KListView*, TQListViewItem * item, const TQPoint & p ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit contextMenu( static_cast<KeyListViewItem*>( item ), p );
}
@@ -371,25 +371,25 @@ void Kleo::KeyListView::slotEmitContextMenu( KListView*, QListViewItem * item, c
//
Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, const GpgME::Key & key )
- : QListViewItem( parent )
+ : TQListViewItem( parent )
{
setKey( key );
}
Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, KeyListViewItem * after, const GpgME::Key & key )
- : QListViewItem( parent, after )
+ : TQListViewItem( parent, after )
{
setKey( key );
}
Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, const GpgME::Key & key )
- : QListViewItem( parent )
+ : TQListViewItem( parent )
{
setKey( key );
}
Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, KeyListViewItem * after, const GpgME::Key & key )
- : QListViewItem( parent, after )
+ : TQListViewItem( parent, after )
{
setKey( key );
}
@@ -399,11 +399,11 @@ Kleo::KeyListViewItem::~KeyListViewItem() {
// QLVI dtor, they don't have listView() anymore, thus they don't
// call deregister( this ), leading to stale entries in the
// itemMap...
- while ( QListViewItem * item = firstChild() )
+ while ( TQListViewItem * item = firstChild() )
delete item;
// better do this here, too, since deletion is top-down and thus
// we're deleted when our parent item is no longer a
- // KeyListViewItem, but a mere QListViewItem, so our takeItem()
+ // KeyListViewItem, but a mere TQListViewItem, so our takeItem()
// overload is gone by that time...
if ( KeyListView * lv = listView() )
lv->deregisterItem( this );
@@ -425,55 +425,55 @@ void Kleo::KeyListViewItem::setKey( const GpgME::Key & key ) {
const int numCols = lv ? lv->columns() : 0 ;
for ( int i = 0 ; i < numCols ; ++i ) {
setText( i, cs->text( key, i ) );
- if ( const QPixmap * pix = cs->pixmap( key, i ) )
+ if ( const TQPixmap * pix = cs->pixmap( key, i ) )
setPixmap( i, *pix );
}
repaint();
}
-QString Kleo::KeyListViewItem::toolTip( int col ) const {
+TQString Kleo::KeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->toolTip( key(), col )
- : QString::null ;
+ : TQString::null ;
}
-int Kleo::KeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::KeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
- return QListViewItem::compare( item, col, ascending );
+ return TQListViewItem::compare( item, col, ascending );
KeyListViewItem * that = static_cast<KeyListViewItem*>( item );
return listView()->columnStrategy()->compare( this->key(), that->key(), col );
}
-void Kleo::KeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::KeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->keyForeground( key(), cg.text() );
- const QColor bg = ds->keyBackground( key(), cg.base() );
- const QFont f = ds->keyFont( key(), p->font() );
+ const TQColor fg = ds->keyForeground( key(), cg.text() );
+ const TQColor bg = ds->keyBackground( key(), cg.base() );
+ const TQFont f = ds->keyFont( key(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
-void Kleo::KeyListViewItem::insertItem( QListViewItem * qlvi ) {
+void Kleo::KeyListViewItem::insertItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListViewItem::insertItem( " << qlvi << " )" << endl;
- QListViewItem::insertItem( qlvi );
+ TQListViewItem::insertItem( qlvi );
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
listView()->registerItem( item );
}
-void Kleo::KeyListViewItem::takeItem( QListViewItem * qlvi ) {
+void Kleo::KeyListViewItem::takeItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListViewItem::takeItem( " << qlvi << " )" << endl;
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
listView()->deregisterItem( item );
- QListViewItem::takeItem( qlvi );
+ TQListViewItem::takeItem( qlvi );
}
@@ -512,46 +512,46 @@ void Kleo::SubkeyKeyListViewItem::setSubkey( const GpgME::Subkey & subkey ) {
setKey( subkey.parent() );
}
-QString Kleo::SubkeyKeyListViewItem::text( int col ) const {
+TQString Kleo::SubkeyKeyListViewItem::text( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->subkeyText( subkey(), col )
- : QString::null ;
+ : TQString::null ;
}
-QString Kleo::SubkeyKeyListViewItem::toolTip( int col ) const {
+TQString Kleo::SubkeyKeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->subkeyToolTip( subkey(), col )
- : QString::null ;
+ : TQString::null ;
}
-const QPixmap * Kleo::SubkeyKeyListViewItem::pixmap( int col ) const {
+const TQPixmap * Kleo::SubkeyKeyListViewItem::pixmap( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->subkeyPixmap( subkey(), col ) : 0 ;
}
-int Kleo::SubkeyKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::SubkeyKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
return KeyListViewItem::compare( item, col, ascending );
SubkeyKeyListViewItem * that = static_cast<SubkeyKeyListViewItem*>( item );
return listView()->columnStrategy()->subkeyCompare( this->subkey(), that->subkey(), col );
}
-void Kleo::SubkeyKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::SubkeyKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->subkeyForeground( subkey(), cg.text() );
- const QColor bg = ds->subkeyBackground( subkey(), cg.base() );
- const QFont f = ds->subkeyFont( subkey(), p->font() );
+ const TQColor fg = ds->subkeyForeground( subkey(), cg.text() );
+ const TQColor bg = ds->subkeyBackground( subkey(), cg.base() );
+ const TQFont f = ds->subkeyFont( subkey(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
@@ -590,24 +590,24 @@ void Kleo::UserIDKeyListViewItem::setUserID( const GpgME::UserID & userID ) {
setKey( userID.parent() );
}
-QString Kleo::UserIDKeyListViewItem::text( int col ) const {
+TQString Kleo::UserIDKeyListViewItem::text( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->userIDText( userID(), col )
- : QString::null ;
+ : TQString::null ;
}
-QString Kleo::UserIDKeyListViewItem::toolTip( int col ) const {
+TQString Kleo::UserIDKeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->userIDToolTip( userID(), col )
- : QString::null ;
+ : TQString::null ;
}
-const QPixmap * Kleo::UserIDKeyListViewItem::pixmap( int col ) const {
+const TQPixmap * Kleo::UserIDKeyListViewItem::pixmap( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->userIDPixmap( userID(), col ) : 0 ;
}
-int Kleo::UserIDKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::UserIDKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
return KeyListViewItem::compare( item, col, ascending );
UserIDKeyListViewItem * that = static_cast<UserIDKeyListViewItem*>( item );
@@ -615,22 +615,22 @@ int Kleo::UserIDKeyListViewItem::compare( QListViewItem * item, int col, bool as
}
-void Kleo::UserIDKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::UserIDKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->useridForeground( userID(), cg.text() );
- const QColor bg = ds->useridBackground( userID(), cg.base() );
- const QFont f = ds->useridFont( userID(), p->font() );
+ const TQColor fg = ds->useridForeground( userID(), cg.text() );
+ const TQColor bg = ds->useridBackground( userID(), cg.base() );
+ const TQFont f = ds->useridFont( userID(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
@@ -669,46 +669,46 @@ void Kleo::SignatureKeyListViewItem::setSignature( const GpgME::UserID::Signatur
setKey( signature.parent().parent() );
}
-QString Kleo::SignatureKeyListViewItem::text( int col ) const {
+TQString Kleo::SignatureKeyListViewItem::text( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->signatureText( signature(), col )
- : QString::null ;
+ : TQString::null ;
}
-QString Kleo::SignatureKeyListViewItem::toolTip( int col ) const {
+TQString Kleo::SignatureKeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->signatureToolTip( signature(), col )
- : QString::null ;
+ : TQString::null ;
}
-const QPixmap * Kleo::SignatureKeyListViewItem::pixmap( int col ) const {
+const TQPixmap * Kleo::SignatureKeyListViewItem::pixmap( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->signaturePixmap( signature(), col ) : 0 ;
}
-int Kleo::SignatureKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::SignatureKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
return KeyListViewItem::compare( item, col, ascending );
SignatureKeyListViewItem * that = static_cast<SignatureKeyListViewItem*>( item );
return listView()->columnStrategy()->signatureCompare( this->signature(), that->signature(), col );
}
-void Kleo::SignatureKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::SignatureKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->signatureForeground( signature(), cg.text() );
- const QColor bg = ds->signatureBackground( signature(), cg.base() );
- const QFont f = ds->signatureFont( signature(), p->font() );
+ const TQColor fg = ds->signatureForeground( signature(), cg.text() );
+ const TQColor bg = ds->signatureBackground( signature(), cg.base() );
+ const TQFont f = ds->signatureFont( signature(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
@@ -721,38 +721,38 @@ void Kleo::SignatureKeyListViewItem::paintCell( QPainter * p, const QColorGroup
Kleo::KeyListView::ColumnStrategy::~ColumnStrategy() {}
int Kleo::KeyListView::ColumnStrategy::compare( const GpgME::Key & key1, const GpgME::Key & key2, int col ) const {
- return QString::localeAwareCompare( text( key1, col ), text( key2, col ) );
+ return TQString::localeAwareCompare( text( key1, col ), text( key2, col ) );
}
-int Kleo::KeyListView::ColumnStrategy::width( int col, const QFontMetrics & fm ) const {
+int Kleo::KeyListView::ColumnStrategy::width( int col, const TQFontMetrics & fm ) const {
return fm.width( title( col ) ) * 2;
}
int Kleo::KeyListView::ColumnStrategy::subkeyCompare( const GpgME::Subkey & sub1, const GpgME::Subkey & sub2, int col ) const {
- return QString::localeAwareCompare( subkeyText( sub1, col ), subkeyText( sub2, col ) );
+ return TQString::localeAwareCompare( subkeyText( sub1, col ), subkeyText( sub2, col ) );
}
int Kleo::KeyListView::ColumnStrategy::userIDCompare( const GpgME::UserID & uid1, const GpgME::UserID & uid2, int col ) const {
- return QString::localeAwareCompare( userIDText( uid1, col ), userIDText( uid2, col ) );
+ return TQString::localeAwareCompare( userIDText( uid1, col ), userIDText( uid2, col ) );
}
int Kleo::KeyListView::ColumnStrategy::signatureCompare( const GpgME::UserID::Signature & sig1, const GpgME::UserID::Signature & sig2, int col ) const {
- return QString::localeAwareCompare( signatureText( sig1, col ), signatureText( sig2, col ) );
+ return TQString::localeAwareCompare( signatureText( sig1, col ), signatureText( sig2, col ) );
}
-QString Kleo::KeyListView::ColumnStrategy::toolTip( const GpgME::Key & key, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::toolTip( const GpgME::Key & key, int col ) const {
return text( key, col );
}
-QString Kleo::KeyListView::ColumnStrategy::subkeyToolTip( const GpgME::Subkey & sub, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::subkeyToolTip( const GpgME::Subkey & sub, int col ) const {
return subkeyText( sub, col );
}
-QString Kleo::KeyListView::ColumnStrategy::userIDToolTip( const GpgME::UserID & uid, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::userIDToolTip( const GpgME::UserID & uid, int col ) const {
return userIDText( uid, col );
}
-QString Kleo::KeyListView::ColumnStrategy::signatureToolTip( const GpgME::UserID::Signature & sig, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::signatureToolTip( const GpgME::UserID::Signature & sig, int col ) const {
return signatureText( sig, col );
}
@@ -766,70 +766,70 @@ Kleo::KeyListView::DisplayStrategy::~DisplayStrategy() {}
//font
-QFont Kleo::KeyListView::DisplayStrategy::keyFont( const GpgME::Key &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::keyFont( const GpgME::Key &, const TQFont & font ) const {
return font;
}
-QFont Kleo::KeyListView::DisplayStrategy::subkeyFont( const GpgME::Subkey &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::subkeyFont( const GpgME::Subkey &, const TQFont & font ) const {
return font;
}
-QFont Kleo::KeyListView::DisplayStrategy::useridFont( const GpgME::UserID &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::useridFont( const GpgME::UserID &, const TQFont & font ) const {
return font;
}
-QFont Kleo::KeyListView::DisplayStrategy::signatureFont( const GpgME::UserID::Signature &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::signatureFont( const GpgME::UserID::Signature &, const TQFont & font ) const {
return font;
}
//foreground
-QColor Kleo::KeyListView::DisplayStrategy::keyForeground( const GpgME::Key &, const QColor & fg )const {
+TQColor Kleo::KeyListView::DisplayStrategy::keyForeground( const GpgME::Key &, const TQColor & fg )const {
return fg;
}
-QColor Kleo::KeyListView::DisplayStrategy::subkeyForeground( const GpgME::Subkey &, const QColor & fg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::subkeyForeground( const GpgME::Subkey &, const TQColor & fg ) const {
return fg;
}
-QColor Kleo::KeyListView::DisplayStrategy::useridForeground( const GpgME::UserID &, const QColor & fg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::useridForeground( const GpgME::UserID &, const TQColor & fg ) const {
return fg;
}
-QColor Kleo::KeyListView::DisplayStrategy::signatureForeground( const GpgME::UserID::Signature &, const QColor & fg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::signatureForeground( const GpgME::UserID::Signature &, const TQColor & fg ) const {
return fg;
}
//background
-QColor Kleo::KeyListView::DisplayStrategy::keyBackground( const GpgME::Key &, const QColor & bg )const {
+TQColor Kleo::KeyListView::DisplayStrategy::keyBackground( const GpgME::Key &, const TQColor & bg )const {
return bg;
}
-QColor Kleo::KeyListView::DisplayStrategy::subkeyBackground( const GpgME::Subkey &, const QColor & bg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::subkeyBackground( const GpgME::Subkey &, const TQColor & bg ) const {
return bg;
}
-QColor Kleo::KeyListView::DisplayStrategy::useridBackground( const GpgME::UserID &, const QColor & bg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::useridBackground( const GpgME::UserID &, const TQColor & bg ) const {
return bg;
}
-QColor Kleo::KeyListView::DisplayStrategy::signatureBackground( const GpgME::UserID::Signature &, const QColor & bg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::signatureBackground( const GpgME::UserID::Signature &, const TQColor & bg ) const {
return bg;
}
//
//
-// Collection of covariant return reimplementations of QListView(Item)
+// Collection of covariant return reimplementations of TQListView(Item)
// members:
//
//
Kleo::KeyListView * Kleo::KeyListViewItem::listView() const {
- return static_cast<Kleo::KeyListView*>( QListViewItem::listView() );
+ return static_cast<Kleo::KeyListView*>( TQListViewItem::listView() );
}
Kleo::KeyListViewItem * Kleo::KeyListViewItem::nextSibling() const {
- return static_cast<Kleo::KeyListViewItem*>( QListViewItem::nextSibling() );
+ return static_cast<Kleo::KeyListViewItem*>( TQListViewItem::nextSibling() );
}
Kleo::KeyListViewItem * Kleo::KeyListView::firstChild() const {
@@ -840,8 +840,8 @@ Kleo::KeyListViewItem * Kleo::KeyListView::selectedItem() const {
return static_cast<Kleo::KeyListViewItem*>( KListView::selectedItem() );
}
-static void selectedItems( QPtrList<Kleo::KeyListViewItem> & result, QListViewItem * start ) {
- for ( QListViewItem * item = start ; item ; item = item->nextSibling() ) {
+static void selectedItems( TQPtrList<Kleo::KeyListViewItem> & result, TQListViewItem * start ) {
+ for ( TQListViewItem * item = start ; item ; item = item->nextSibling() ) {
if ( item->isSelected() )
if ( Kleo::KeyListViewItem * i = Kleo::lvi_cast<Kleo::KeyListViewItem>( item ) )
result.append( i );
@@ -849,14 +849,14 @@ static void selectedItems( QPtrList<Kleo::KeyListViewItem> & result, QListViewIt
}
}
-QPtrList<Kleo::KeyListViewItem> Kleo::KeyListView::selectedItems() const {
- QPtrList<KeyListViewItem> result;
+TQPtrList<Kleo::KeyListViewItem> Kleo::KeyListView::selectedItems() const {
+ TQPtrList<KeyListViewItem> result;
::selectedItems( result, firstChild() );
return result;
}
-static bool hasSelection( QListViewItem * start ) {
- for ( QListViewItem * item = start ; item ; item = item->nextSibling() )
+static bool hasSelection( TQListViewItem * start ) {
+ for ( TQListViewItem * item = start ; item ; item = item->nextSibling() )
if ( item->isSelected() || hasSelection( item->firstChild() ) )
return true;
return false;