summaryrefslogtreecommitdiffstats
path: root/kmail/signatureconfigurator.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 /kmail/signatureconfigurator.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 'kmail/signatureconfigurator.cpp')
-rw-r--r--kmail/signatureconfigurator.cpp134
1 files changed, 67 insertions, 67 deletions
diff --git a/kmail/signatureconfigurator.cpp b/kmail/signatureconfigurator.cpp
index 68bfd1949..606d460de 100644
--- a/kmail/signatureconfigurator.cpp
+++ b/kmail/signatureconfigurator.cpp
@@ -26,15 +26,15 @@
#include <kshellcompletion.h>
#include <krun.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
#include <assert.h>
@@ -42,32 +42,32 @@ using namespace KMail;
namespace KMail {
- SignatureConfigurator::SignatureConfigurator( QWidget * parent, const char * name )
- : QWidget( parent, name )
+ SignatureConfigurator::SignatureConfigurator( TQWidget * parent, const char * name )
+ : TQWidget( parent, name )
{
// tmp. vars:
- QLabel * label;
- QWidget * page;
- QHBoxLayout * hlay;
- QVBoxLayout * vlay;
- QVBoxLayout * page_vlay;
+ TQLabel * label;
+ TQWidget * page;
+ TQHBoxLayout * hlay;
+ TQVBoxLayout * vlay;
+ TQVBoxLayout * page_vlay;
- vlay = new QVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" );
+ vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" );
// "enable signatue" checkbox:
- mEnableCheck = new QCheckBox( i18n("&Enable signature"), this );
- QWhatsThis::add(mEnableCheck,
+ mEnableCheck = new TQCheckBox( i18n("&Enable signature"), this );
+ TQWhatsThis::add(mEnableCheck,
i18n("Check this box if you want KMail to append a signature to mails "
"written with this identity."));
vlay->addWidget( mEnableCheck );
// "obtain signature text from" combo and label:
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mSourceCombo = new QComboBox( false, this );
- QWhatsThis::add(mSourceCombo,
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mSourceCombo = new TQComboBox( false, this );
+ TQWhatsThis::add(mSourceCombo,
i18n("Click on the widgets below to obtain help on the input methods."));
mSourceCombo->setEnabled( false ); // since !mEnableCheck->isChecked()
- mSourceCombo->insertStringList( QStringList()
+ mSourceCombo->insertStringList( TQStringList()
<< i18n("continuation of \"obtain signature text from\"",
"Input Field Below")
<< i18n("continuation of \"obtain signature text from\"",
@@ -75,62 +75,62 @@ namespace KMail {
<< i18n("continuation of \"obtain signature text from\"",
"Output of Command")
);
- label = new QLabel( mSourceCombo,
+ label = new TQLabel( mSourceCombo,
i18n("Obtain signature &text from:"), this );
label->setEnabled( false ); // since !mEnableCheck->isChecked()
hlay->addWidget( label );
hlay->addWidget( mSourceCombo, 1 );
// widget stack that is controlled by the source combo:
- QWidgetStack * widgetStack = new QWidgetStack( this );
+ TQWidgetStack * widgetStack = new TQWidgetStack( this );
widgetStack->setEnabled( false ); // since !mEnableCheck->isChecked()
vlay->addWidget( widgetStack, 1 );
- connect( mSourceCombo, SIGNAL(highlighted(int)),
- widgetStack, SLOT(raiseWidget(int)) );
+ connect( mSourceCombo, TQT_SIGNAL(highlighted(int)),
+ widgetStack, TQT_SLOT(raiseWidget(int)) );
// connects for the enabling of the widgets depending on
// signatureEnabled:
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- mSourceCombo, SLOT(setEnabled(bool)) );
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- widgetStack, SLOT(setEnabled(bool)) );
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ mSourceCombo, TQT_SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ widgetStack, TQT_SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
// The focus might be still in the widget that is disabled
- connect( mEnableCheck, SIGNAL(clicked()),
- mEnableCheck, SLOT(setFocus()) );
+ connect( mEnableCheck, TQT_SIGNAL(clicked()),
+ mEnableCheck, TQT_SLOT(setFocus()) );
int pageno = 0;
// page 0: input field for direct entering:
- mTextEdit = new QTextEdit( widgetStack );
- QWhatsThis::add(mTextEdit,
+ mTextEdit = new TQTextEdit( widgetStack );
+ TQWhatsThis::add(mTextEdit,
i18n("Use this field to enter an arbitrary static signature."));
widgetStack->addWidget( mTextEdit, pageno );
mTextEdit->setFont( KGlobalSettings::fixedFont() );
- mTextEdit->setWordWrap( QTextEdit::NoWrap );
+ mTextEdit->setWordWrap( TQTextEdit::NoWrap );
mTextEdit->setTextFormat( Qt::PlainText );
widgetStack->raiseWidget( 0 ); // since mSourceCombo->currentItem() == 0
// page 1: "signature file" requester, label, "edit file" button:
++pageno;
- page = new QWidget( widgetStack );
+ page = new TQWidget( widgetStack );
widgetStack->addWidget( page, pageno ); // force sequential numbers (play safe)
- page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- hlay = new QHBoxLayout( page_vlay ); // inherits spacing
+ page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ hlay = new TQHBoxLayout( page_vlay ); // inherits spacing
mFileRequester = new KURLRequester( page );
- QWhatsThis::add(mFileRequester,
+ TQWhatsThis::add(mFileRequester,
i18n("Use this requester to specify a text file that contains your "
"signature. It will be read every time you create a new mail or "
"append a new signature."));
- hlay->addWidget( new QLabel( mFileRequester,
+ hlay->addWidget( new TQLabel( mFileRequester,
i18n("S&pecify file:"), page ) );
hlay->addWidget( mFileRequester, 1 );
mFileRequester->button()->setAutoDefault( false );
- connect( mFileRequester, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotEnableEditButton(const QString &)) );
- mEditButton = new QPushButton( i18n("Edit &File"), page );
- QWhatsThis::add(mEditButton, i18n("Opens the specified file in a text editor."));
- connect( mEditButton, SIGNAL(clicked()), SLOT(slotEdit()) );
+ connect( mFileRequester, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotEnableEditButton(const TQString &)) );
+ mEditButton = new TQPushButton( i18n("Edit &File"), page );
+ TQWhatsThis::add(mEditButton, i18n("Opens the specified file in a text editor."));
+ connect( mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()) );
mEditButton->setAutoDefault( false );
mEditButton->setEnabled( false ); // initially nothing to edit
hlay->addWidget( mEditButton );
@@ -138,20 +138,20 @@ namespace KMail {
// page 2: "signature command" requester and label:
++pageno;
- page = new QWidget( widgetStack );
+ page = new TQWidget( widgetStack );
widgetStack->addWidget( page, pageno );
- page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- hlay = new QHBoxLayout( page_vlay ); // inherits spacing
+ page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ hlay = new TQHBoxLayout( page_vlay ); // inherits spacing
mCommandEdit = new KLineEdit( page );
mCommandEdit->setCompletionObject( new KShellCompletion() );
mCommandEdit->setAutoDeleteCompletionObject( true );
- QWhatsThis::add(mCommandEdit,
+ TQWhatsThis::add(mCommandEdit,
i18n("You can add an arbitrary command here, either with or without path "
"depending on whether or not the command is in your Path. For every "
"new mail, KMail will execute the command and use what it outputs (to "
"standard output) as a signature. Usual commands for use with this "
"mechanism are \"fortune\" or \"ksig -random\"."));
- hlay->addWidget( new QLabel( mCommandEdit,
+ hlay->addWidget( new TQLabel( mCommandEdit,
i18n("S&pecify command:"), page ) );
hlay->addWidget( mCommandEdit, 1 );
page_vlay->addStretch( 1 ); // spacer
@@ -195,34 +195,34 @@ namespace KMail {
mSourceCombo->setCurrentItem( idx );
}
- QString SignatureConfigurator::inlineText() const {
+ TQString SignatureConfigurator::inlineText() const {
return mTextEdit->text();
}
- void SignatureConfigurator::setInlineText( const QString & text ) {
+ void SignatureConfigurator::setInlineText( const TQString & text ) {
mTextEdit->setText( text );
}
- QString SignatureConfigurator::fileURL() const {
- QString file = mFileRequester->url().stripWhiteSpace();
+ TQString SignatureConfigurator::fileURL() const {
+ TQString file = mFileRequester->url().stripWhiteSpace();
// Force the filename to be relative to ~ instead of $PWD depending
// on the rest of the code (KRun::run in Edit and KFileItem on save)
- if ( !file.isEmpty() && QFileInfo( file ).isRelative() )
- file = QDir::home().absPath() + QDir::separator() + file;
+ if ( !file.isEmpty() && TQFileInfo( file ).isRelative() )
+ file = TQDir::home().absPath() + TQDir::separator() + file;
return file;
}
- void SignatureConfigurator::setFileURL( const QString & url ) {
+ void SignatureConfigurator::setFileURL( const TQString & url ) {
mFileRequester->setURL( url );
}
- QString SignatureConfigurator::commandURL() const {
+ TQString SignatureConfigurator::commandURL() const {
return mCommandEdit->text();
}
- void SignatureConfigurator::setCommandURL( const QString & url ) {
+ void SignatureConfigurator::setCommandURL( const TQString & url ) {
mCommandEdit->setText( url );
}
@@ -244,23 +244,23 @@ namespace KMail {
if ( sig.type() == Signature::FromFile )
setFileURL( sig.url() );
else
- setFileURL( QString::null );
+ setFileURL( TQString::null );
if ( sig.type() == Signature::FromCommand )
setCommandURL( sig.url() );
else
- setCommandURL( QString::null );
+ setCommandURL( TQString::null );
}
- void SignatureConfigurator::slotEnableEditButton( const QString & url ) {
+ void SignatureConfigurator::slotEnableEditButton( const TQString & url ) {
mEditButton->setDisabled( url.stripWhiteSpace().isEmpty() );
}
void SignatureConfigurator::slotEdit() {
- QString url = fileURL();
+ TQString url = fileURL();
// slotEnableEditButton should prevent this assert from being hit:
assert( !url.isEmpty() );
- (void)KRun::runURL( KURL( url ), QString::fromLatin1("text/plain") );
+ (void)KRun::runURL( KURL( url ), TQString::fromLatin1("text/plain") );
}
} // namespace KMail