summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/ui/keyrequester.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/lib/ui/keyrequester.cpp')
-rw-r--r--certmanager/lib/ui/keyrequester.cpp114
1 files changed, 57 insertions, 57 deletions
diff --git a/certmanager/lib/ui/keyrequester.cpp b/certmanager/lib/ui/keyrequester.cpp
index d537affc5..3a883dea1 100644
--- a/certmanager/lib/ui/keyrequester.cpp
+++ b/certmanager/lib/ui/keyrequester.cpp
@@ -71,19 +71,19 @@
#include <kpushbutton.h>
// Qt
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <assert.h>
Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys,
- QWidget * parent, const char * name )
- : QWidget( parent, name ),
+ TQWidget * parent, const char * name )
+ : TQWidget( parent, name ),
mOpenPGPBackend( 0 ),
mSMIMEBackend( 0 ),
mMulti( multipleKeys ),
@@ -94,8 +94,8 @@ Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys,
init();
}
-Kleo::KeyRequester::KeyRequester( QWidget * parent, const char * name )
- : QWidget( parent, name ),
+Kleo::KeyRequester::KeyRequester( TQWidget * parent, const char * name )
+ : TQWidget( parent, name ),
mOpenPGPBackend( 0 ),
mSMIMEBackend( 0 ),
mMulti( false ),
@@ -108,33 +108,33 @@ Kleo::KeyRequester::KeyRequester( QWidget * parent, const char * name )
void Kleo::KeyRequester::init()
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
// the label where the key id is to be displayed:
- mLabel = new QLabel( this );
- mLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mLabel = new TQLabel( this );
+ mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// the button to unset any key:
mEraseButton = new KPushButton( this );
mEraseButton->setAutoDefault( false );
- mEraseButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
- mEraseButton->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
- QToolTip::add( mEraseButton, i18n("Clear") );
+ mEraseButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
+ mEraseButton->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
+ TQToolTip::add( mEraseButton, i18n("Clear") );
// the button to call the KeySelectionDialog:
- mDialogButton = new QPushButton( i18n("Change..."), this );
+ mDialogButton = new TQPushButton( i18n("Change..."), this );
mDialogButton->setAutoDefault( false );
hlay->addWidget( mLabel, 1 );
hlay->addWidget( mEraseButton );
hlay->addWidget( mDialogButton );
- connect( mEraseButton, SIGNAL(clicked()), SLOT(slotEraseButtonClicked()) );
- connect( mDialogButton, SIGNAL(clicked()), SLOT(slotDialogButtonClicked()) );
+ connect( mEraseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEraseButtonClicked()) );
+ connect( mDialogButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDialogButtonClicked()) );
- setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed ) );
setAllowedKeys( mKeyUsage );
}
@@ -169,15 +169,15 @@ void Kleo::KeyRequester::setKey( const GpgME::Key & key ) {
updateKeys();
}
-QString Kleo::KeyRequester::fingerprint() const {
+TQString Kleo::KeyRequester::fingerprint() const {
if ( mKeys.empty() )
- return QString::null;
+ return TQString::null;
else
return mKeys.front().primaryFingerprint();
}
-QStringList Kleo::KeyRequester::fingerprints() const {
- QStringList result;
+TQStringList Kleo::KeyRequester::fingerprints() const {
+ TQStringList result;
for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it )
if ( !it->isNull() )
if ( const char * fpr = it->primaryFingerprint() )
@@ -185,11 +185,11 @@ QStringList Kleo::KeyRequester::fingerprints() const {
return result;
}
-void Kleo::KeyRequester::setFingerprint( const QString & fingerprint ) {
+void Kleo::KeyRequester::setFingerprint( const TQString & fingerprint ) {
startKeyListJob( fingerprint );
}
-void Kleo::KeyRequester::setFingerprints( const QStringList & fingerprints ) {
+void Kleo::KeyRequester::setFingerprints( const TQStringList & fingerprints ) {
startKeyListJob( fingerprints );
}
@@ -201,17 +201,17 @@ void Kleo::KeyRequester::updateKeys() {
if ( mKeys.size() > 1 )
setMultipleKeysEnabled( true );
- QStringList labelTexts;
- QString toolTipText;
+ TQStringList labelTexts;
+ TQString toolTipText;
for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it ) {
if ( it->isNull() )
continue;
- const QString fpr = it->primaryFingerprint();
+ const TQString fpr = it->primaryFingerprint();
labelTexts.push_back( fpr.right(8) );
toolTipText += fpr.right(8) + ": ";
if ( const char * uid = it->userID(0).id() )
if ( it->protocol() == GpgME::Context::OpenPGP )
- toolTipText += QString::fromUtf8( uid );
+ toolTipText += TQString::fromUtf8( uid );
else
toolTipText += Kleo::DN( uid ).prettyDN();
else
@@ -220,24 +220,24 @@ void Kleo::KeyRequester::updateKeys() {
}
mLabel->setText( labelTexts.join(", ") );
- QToolTip::remove( mLabel );
- QToolTip::add( mLabel, toolTipText );
+ TQToolTip::remove( mLabel );
+ TQToolTip::add( mLabel, toolTipText );
}
#ifndef __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
#define __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
-static void showKeyListError( QWidget * parent, const GpgME::Error & err ) {
+static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while fetching "
+ const TQString msg = i18n( "<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
"<p><b>%1</b></p></qt>" )
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Key Listing Failed" ) );
}
#endif // __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
-void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
+void Kleo::KeyRequester::startKeyListJob( const TQStringList & fingerprints ) {
if ( !mSMIMEBackend && !mOpenPGPBackend )
return;
@@ -245,7 +245,7 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
mJobs = 0;
unsigned int count = 0;
- for ( QStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it )
+ for ( TQStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it )
if ( !(*it).stripWhiteSpace().isEmpty() )
++count;
@@ -264,10 +264,10 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
"Check your installation."),
i18n("Key Listing Failed") );
} else {
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ TQT_SLOT(slotNextKey(const GpgME::Key&)) );
const GpgME::Error err = job->start( fingerprints,
mKeyUsage & Kleo::KeySelectionDialog::SecretKeys &&
@@ -288,10 +288,10 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
"Check your installation."),
i18n("Key Listing Failed") );
} else {
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ TQT_SLOT(slotNextKey(const GpgME::Key&)) );
const GpgME::Error err = job->start( fingerprints,
mKeyUsage & Kleo::KeySelectionDialog::SecretKeys &&
@@ -334,7 +334,7 @@ void Kleo::KeyRequester::slotDialogButtonClicked() {
? new KeySelectionDialog( mDialogCaption, mDialogMessage, mInitialQuery, mKeyUsage, mMulti, false, this )
: new KeySelectionDialog( mDialogCaption, mDialogCaption, mKeys, mKeyUsage, mMulti, false, this ) ;
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
if ( mMulti )
setKeys( dlg->selectedKeys() );
else
@@ -352,11 +352,11 @@ void Kleo::KeyRequester::slotEraseButtonClicked() {
updateKeys();
}
-void Kleo::KeyRequester::setDialogCaption( const QString & caption ) {
+void Kleo::KeyRequester::setDialogCaption( const TQString & caption ) {
mDialogCaption = caption;
}
-void Kleo::KeyRequester::setDialogMessage( const QString & msg ) {
+void Kleo::KeyRequester::setDialogMessage( const TQString & msg ) {
mDialogMessage = msg;
}
@@ -400,11 +400,11 @@ void Kleo::KeyRequester::setAllowedKeys( unsigned int keyUsage ) {
}
}
-QPushButton * Kleo::KeyRequester::dialogButton() {
+TQPushButton * Kleo::KeyRequester::dialogButton() {
return mDialogButton;
}
-QPushButton * Kleo::KeyRequester::eraseButton() {
+TQPushButton * Kleo::KeyRequester::eraseButton() {
return mEraseButton;
}
@@ -430,14 +430,14 @@ static inline unsigned int signingKeyUsage( bool openpgp, bool smime, bool trust
}
Kleo::EncryptionKeyRequester::EncryptionKeyRequester( bool multi, unsigned int proto,
- QWidget * parent, const char * name,
+ TQWidget * parent, const char * name,
bool onlyTrusted, bool onlyValid )
: KeyRequester( encryptionKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi,
parent, name )
{
}
-Kleo::EncryptionKeyRequester::EncryptionKeyRequester( QWidget * parent, const char * name )
+Kleo::EncryptionKeyRequester::EncryptionKeyRequester( TQWidget * parent, const char * name )
: KeyRequester( 0, false, parent, name )
{
}
@@ -451,14 +451,14 @@ void Kleo::EncryptionKeyRequester::setAllowedKeys( unsigned int proto, bool only
}
Kleo::SigningKeyRequester::SigningKeyRequester( bool multi, unsigned int proto,
- QWidget * parent, const char * name,
+ TQWidget * parent, const char * name,
bool onlyTrusted, bool onlyValid )
: KeyRequester( signingKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi,
parent, name )
{
}
-Kleo::SigningKeyRequester::SigningKeyRequester( QWidget * parent, const char * name )
+Kleo::SigningKeyRequester::SigningKeyRequester( TQWidget * parent, const char * name )
: KeyRequester( 0, false, parent, name )
{
}