summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/ui/messagebox.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/messagebox.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/messagebox.cpp')
-rw-r--r--certmanager/lib/ui/messagebox.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/certmanager/lib/ui/messagebox.cpp b/certmanager/lib/ui/messagebox.cpp
index 283d33108..ddce8f04d 100644
--- a/certmanager/lib/ui/messagebox.cpp
+++ b/certmanager/lib/ui/messagebox.cpp
@@ -47,9 +47,9 @@
#include <ksavefile.h>
#include <kguiitem.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qvbox.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqvbox.h>
using namespace Kleo;
using namespace GpgME;
@@ -71,40 +71,40 @@ static KGuiItem KGuiItem_showAuditLog() {
class AuditLogViewer : public KDialogBase {
// Q_OBJECT
public:
- explicit AuditLogViewer( const QString & log, QWidget * parent=0, const char * name=0, WFlags f=0 )
+ explicit AuditLogViewer( const TQString & log, TQWidget * parent=0, const char * name=0, WFlags f=0 )
: KDialogBase( parent, name, false, i18n("View GnuPG Audit Log"),
Close|User1|User2, Close, false, KGuiItem_save(), KGuiItem_copy() ),
- m_textEdit( new QTextEdit( this, "m_textEdit" ) )
+ m_textEdit( new TQTextEdit( this, "m_textEdit" ) )
{
setWFlags( f );
setMainWidget( m_textEdit );
- m_textEdit->setTextFormat( QTextEdit::RichText );
+ m_textEdit->setTextFormat( TQTextEdit::RichText );
m_textEdit->setReadOnly( true );
setAuditLog( log );
}
~AuditLogViewer() {}
- void setAuditLog( const QString & log ) {
+ void setAuditLog( const TQString & log ) {
m_textEdit->setText( log );
}
private:
void slotUser1() {
- const QString fileName = KFileDialog::getSaveFileName( QString(), QString(),
+ const TQString fileName = KFileDialog::getSaveFileName( TQString(), TQString(),
this, i18n("Choose File to Save GnuPG Audit Log to") );
if ( fileName.isEmpty() )
return;
KSaveFile file( fileName );
- if ( QTextStream * const s = file.textStream() ) {
+ if ( TQTextStream * const s = file.textStream() ) {
*s << m_textEdit->text() << endl;
file.close();
}
if ( const int err = file.status() )
KMessageBox::error( this, i18n("Couldn't save to file \"%1\": %2")
- .arg( file.name(), QString::fromLocal8Bit( strerror( err ) ) ),
+ .arg( file.name(), TQString::fromLocal8Bit( strerror( err ) ) ),
i18n("File Save Error") );
}
void slotUser2() {
@@ -114,13 +114,13 @@ private:
}
private:
- QTextEdit * m_textEdit;
+ TQTextEdit * m_textEdit;
};
} // anon namespace
// static
-void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & caption ) {
+void MessageBox::auditLog( TQWidget * parent, const Job * job, const TQString & caption ) {
if ( !job )
return;
@@ -131,7 +131,7 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca
return;
}
- const QString log = job->auditLogAsHtml();
+ const TQString log = job->auditLogAsHtml();
if ( log.isEmpty() ) {
KMessageBox::information( parent, i18n("No GnuPG Audit Log available for this operation."),
i18n("No GnuPG Audit Log") );
@@ -142,112 +142,112 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca
}
// static
-void MessageBox::auditLog( QWidget * parent, const QString & log, const QString & caption ) {
+void MessageBox::auditLog( TQWidget * parent, const TQString & log, const TQString & caption ) {
AuditLogViewer * const alv = new AuditLogViewer( "<qt>" + log + "</qt>", parent, "alv", Qt::WDestructiveClose );
alv->setCaption( caption );
alv->show();
}
// static
-void MessageBox::auditLog( QWidget * parent, const Job * job ) {
+void MessageBox::auditLog( TQWidget * parent, const Job * job ) {
auditLog( parent, job, i18n("GnuPG Audit Log Viewer") );
}
// static
-void MessageBox::auditLog( QWidget * parent, const QString & log ) {
+void MessageBox::auditLog( TQWidget * parent, const TQString & log ) {
auditLog( parent, log, i18n("GnuPG Audit Log Viewer") );
}
-static QString to_information_string( const SigningResult & result ) {
+static TQString to_information_string( const SigningResult & result ) {
return result.error()
- ? i18n("Signing failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) )
+ ? i18n("Signing failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) )
: i18n("Signing successful") ;
}
-static QString to_error_string( const SigningResult & result ) {
+static TQString to_error_string( const SigningResult & result ) {
return to_information_string( result );
}
-static QString to_information_string( const EncryptionResult & result ) {
+static TQString to_information_string( const EncryptionResult & result ) {
return result.error()
- ? i18n("Encryption failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) )
+ ? i18n("Encryption failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) )
: i18n("Encryption successful") ;
}
-static QString to_error_string( const EncryptionResult & result ) {
+static TQString to_error_string( const EncryptionResult & result ) {
return to_information_string( result );
}
-static QString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
+static TQString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
return to_information_string( sresult ) + '\n' + to_information_string( eresult );
}
-static QString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
+static TQString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
return to_information_string( sresult, eresult );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, int options ) {
information( parent, result, job, i18n("Signing Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, int options ) {
error( parent, result, job, i18n("Signing Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options );
}
// static
-void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
information( parent, result, job, i18n("Encryption Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
error( parent, result, job, i18n("Encryption Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
information( parent, sresult, eresult, job, i18n("Encryption Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
error( parent, sresult, eresult, job, i18n("Encryption Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options );
}
// static
-void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString & text, const Job * job, const QString & caption, int options ) {
+void MessageBox::make( TQWidget * parent, TQMessageBox::Icon icon, const TQString & text, const Job * job, const TQString & caption, int options ) {
KDialogBase * dialog = GpgME::hasFeature( GpgME::AuditLogFeature )
? new KDialogBase( caption, KDialogBase::Yes | KDialogBase::No,
KDialogBase::Yes, KDialogBase::Yes,
@@ -260,6 +260,6 @@ void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString &
if ( options & KMessageBox::PlainCaption )
dialog->setPlainCaption( caption );
- if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, QStringList(), QString::null, 0, options ) )
+ if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString::null, 0, options ) )
auditLog( 0, job );
}