summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/ui/backendconfigwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/lib/ui/backendconfigwidget.cpp')
-rw-r--r--certmanager/lib/ui/backendconfigwidget.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/certmanager/lib/ui/backendconfigwidget.cpp b/certmanager/lib/ui/backendconfigwidget.cpp
index c40890a43..2871b920f 100644
--- a/certmanager/lib/ui/backendconfigwidget.cpp
+++ b/certmanager/lib/ui/backendconfigwidget.cpp
@@ -49,10 +49,10 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <assert.h>
@@ -63,8 +63,8 @@ namespace Kleo {
class Kleo::BackendConfigWidget::Private {
public:
Kleo::BackendListView * listView;
- QPushButton * configureButton;
- QPushButton * rescanButton;
+ TQPushButton * configureButton;
+ TQPushButton * rescanButton;
Kleo::CryptoBackendFactory * backendFactory;
};
@@ -86,7 +86,7 @@ public:
const Kleo::CryptoBackend* chosenBackend( const char * protocol );
/// deselect all except one for a given protocol type (radiobutton-like exclusivity)
- void deselectAll( const char * protocol, QCheckListItem* except );
+ void deselectAll( const char * protocol, TQCheckListItem* except );
void emitChanged() { static_cast<BackendConfigWidget *>( parentWidget() )->emitChanged( true ); }
};
@@ -95,8 +95,8 @@ public:
class Kleo::BackendListViewItem : public QListViewItem
{
public:
- BackendListViewItem( KListView* lv, QListViewItem *prev, const CryptoBackend *cryptoBackend )
- : QListViewItem( lv, prev, cryptoBackend->displayName() ), mCryptoBackend( cryptoBackend )
+ BackendListViewItem( KListView* lv, TQListViewItem *prev, const CryptoBackend *cryptoBackend )
+ : TQListViewItem( lv, prev, cryptoBackend->displayName() ), mCryptoBackend( cryptoBackend )
{}
const CryptoBackend *cryptoBackend() const { return mCryptoBackend; }
@@ -114,10 +114,10 @@ class Kleo::ProtocolCheckListItem : public QCheckListItem
{
public:
ProtocolCheckListItem( BackendListViewItem* blvi,
- QListViewItem* prev, const char * protocolName,
+ TQListViewItem* prev, const char * protocolName,
const CryptoBackend::Protocol* protocol ) // can be 0
- : QCheckListItem( blvi, prev, itemText( protocolName, protocol ),
- QCheckListItem::CheckBox ),
+ : TQCheckListItem( blvi, prev, itemText( protocolName, protocol ),
+ TQCheckListItem::CheckBox ),
mProtocol( protocol ), mProtocolName( protocolName )
{}
@@ -135,20 +135,20 @@ protected:
if ( b )
lv->deselectAll( mProtocolName, this );
lv->emitChanged();
- QCheckListItem::stateChange( b );
+ TQCheckListItem::stateChange( b );
}
private:
// Helper for the constructor.
- static QString itemText( const char * protocolName, const CryptoBackend::Protocol* protocol ) {
+ static TQString itemText( const char * protocolName, const CryptoBackend::Protocol* protocol ) {
// First one is the generic name (find a nice one for OpenPGP, SMIME)
- const QString protoName = qstricmp( protocolName, "openpgp" ) != 0
+ const TQString protoName = qstricmp( protocolName, "openpgp" ) != 0
? qstricmp( protocolName, "smime" ) != 0
- ? QString::fromLatin1( protocolName )
+ ? TQString::fromLatin1( protocolName )
: i18n( "S/MIME" )
: i18n( "OpenPGP" );
// second one is implementation name (gpg, gpgsm...)
- const QString impName = protocol ? protocol->displayName() : i18n( "failed" );
+ const TQString impName = protocol ? protocol->displayName() : i18n( "failed" );
return i18n( "Items in Kleo::BackendConfigWidget listview (1: protocol; 2: implementation name)",
"%1 (%2)" ).arg( protoName, impName );
}
@@ -158,7 +158,7 @@ private:
};
const Kleo::CryptoBackend* Kleo::BackendListView::currentBackend() const {
- const QListViewItem* curItem = currentItem();
+ const TQListViewItem* curItem = currentItem();
if ( !curItem ) // can't happen
return 0;
if ( lvi_cast<Kleo::ProtocolCheckListItem>( curItem ) )
@@ -168,10 +168,10 @@ const Kleo::CryptoBackend* Kleo::BackendListView::currentBackend() const {
return 0;
}
-// can't be const method due to QListViewItemIterator (why?)
+// can't be const method due to TQListViewItemIterator (why?)
const Kleo::CryptoBackend* Kleo::BackendListView::chosenBackend( const char * protocolName )
{
- for ( QListViewItemIterator it( this /*, QListViewItemIterator::Checked doesn't work*/ ) ;
+ for ( TQListViewItemIterator it( this /*, TQListViewItemIterator::Checked doesn't work*/ ) ;
it.current() ; ++it )
if ( ProtocolCheckListItem * p = lvi_cast<ProtocolCheckListItem>( it.current() ) )
if ( p->isOn() && qstricmp( p->protocolName(), protocolName ) == 0 ) {
@@ -183,9 +183,9 @@ const Kleo::CryptoBackend* Kleo::BackendListView::chosenBackend( const char * pr
return 0;
}
-void Kleo::BackendListView::deselectAll( const char * protocolName, QCheckListItem* except )
+void Kleo::BackendListView::deselectAll( const char * protocolName, TQCheckListItem* except )
{
- for ( QListViewItemIterator it( this /*, QListViewItemIterator::Checked doesn't work*/ ) ;
+ for ( TQListViewItemIterator it( this /*, TQListViewItemIterator::Checked doesn't work*/ ) ;
it.current() ; ++it ) {
if ( it.current() == except ) continue;
if ( ProtocolCheckListItem * p = lvi_cast<ProtocolCheckListItem>( it.current() ) )
@@ -196,15 +196,15 @@ void Kleo::BackendListView::deselectAll( const char * protocolName, QCheckListIt
////
-Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, QWidget * parent, const char * name, WFlags f )
- : QWidget( parent, name, f ), d( 0 )
+Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent, const char * name, WFlags f )
+ : TQWidget( parent, name, f ), d( 0 )
{
assert( factory );
d = new Private();
d->backendFactory = factory;
- QHBoxLayout * hlay =
- new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay =
+ new TQHBoxLayout( this, 0, KDialog::spacingHint() );
d->listView = new BackendListView( this, "d->listView" );
d->listView->addColumn( i18n("Available Backends") );
@@ -215,24 +215,24 @@ Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory,
hlay->addWidget( d->listView, 1 );
- connect( d->listView, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
+ connect( d->listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
- QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing
+ TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing
- d->configureButton = new QPushButton( i18n("Confi&gure..."), this );
+ d->configureButton = new TQPushButton( i18n("Confi&gure..."), this );
d->configureButton->setAutoDefault( false );
vlay->addWidget( d->configureButton );
- connect( d->configureButton, SIGNAL(clicked()),
- SLOT(slotConfigureButtonClicked()) );
+ connect( d->configureButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotConfigureButtonClicked()) );
- d->rescanButton = new QPushButton( i18n("Rescan"), this );
+ d->rescanButton = new TQPushButton( i18n("Rescan"), this );
d->rescanButton->setAutoDefault( false );
vlay->addWidget( d->rescanButton );
- connect( d->rescanButton, SIGNAL(clicked()),
- SLOT(slotRescanButtonClicked()) );
+ connect( d->rescanButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotRescanButtonClicked()) );
vlay->addStretch( 1 );
}
@@ -278,7 +278,7 @@ void Kleo::BackendConfigWidget::load() {
slotSelectionChanged( d->listView->firstChild() );
}
-void Kleo::BackendConfigWidget::slotSelectionChanged( QListViewItem * ) {
+void Kleo::BackendConfigWidget::slotSelectionChanged( TQListViewItem * ) {
const CryptoBackend* backend = d->listView->currentBackend();
if ( backend && !backend->config() )
kdDebug(5150) << "Backend w/o config object!" << endl;
@@ -287,7 +287,7 @@ void Kleo::BackendConfigWidget::slotSelectionChanged( QListViewItem * ) {
void Kleo::BackendConfigWidget::slotRescanButtonClicked() {
- QStringList reasons;
+ TQStringList reasons;
d->backendFactory->scanForBackends( &reasons );
if ( !reasons.empty() )
KMessageBox::informationList( this,
@@ -302,11 +302,11 @@ void Kleo::BackendConfigWidget::slotConfigureButtonClicked() {
if ( backend && backend->config() ) {
Kleo::CryptoConfigDialog dlg( backend->config(), this );
int result = dlg.exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
// Tell other users of gpgconf (e.g. the s/mime page) that the gpgconf data might have changed
- kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", TQByteArray() );
// and schedule a rescan, in case the updates make a backend valid
- QTimer::singleShot( 0, this, SLOT(slotRescanButtonClicked()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotRescanButtonClicked()) );
}
}
else // shouldn't happen, button is disabled