diff options
Diffstat (limited to 'kbugbuster/gui/msginputdialog.cpp')
-rw-r--r-- | kbugbuster/gui/msginputdialog.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/kbugbuster/gui/msginputdialog.cpp b/kbugbuster/gui/msginputdialog.cpp index a3fc39c7..8d12cc35 100644 --- a/kbugbuster/gui/msginputdialog.cpp +++ b/kbugbuster/gui/msginputdialog.cpp @@ -2,13 +2,13 @@ // (c) 2001, Cornelius Schumacher #include <ktextedit.h> -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kdebug.h> -#include <qcombobox.h> -#include <qsplitter.h> -#include <qlabel.h> +#include <tqcombobox.h> +#include <tqsplitter.h> +#include <tqlabel.h> #include "messageeditor.h" #include "kbbprefs.h" @@ -19,9 +19,9 @@ #include "msginputdialog.moc" MsgInputDialog::MsgInputDialog(MsgInputDialog::MessageType type, const Bug &bug, - const Package &package, const QString "edMsg, - QWidget *parent) - : KDialogBase(Plain,QString::null,User1|User2|Ok|Cancel,Ok,parent,0,false, + const Package &package, const TQString "edMsg, + TQWidget *parent) + : KDialogBase(Plain,TQString::null,User1|User2|Ok|Cancel,Ok,parent,0,false, true,KStdGuiItem::clear(),i18n( "&Edit Presets..." )), mBug( bug ), mPackage( package ), @@ -41,32 +41,32 @@ MsgInputDialog::MsgInputDialog(MsgInputDialog::MessageType type, const Bug &bug, break; } - QFrame *topFrame = plainPage(); - ( new QHBoxLayout( topFrame ) )->setAutoAdd( true ); + TQFrame *topFrame = plainPage(); + ( new TQHBoxLayout( topFrame ) )->setAutoAdd( true ); - mSplitter = new QSplitter( QSplitter::Horizontal, topFrame ); + mSplitter = new TQSplitter( TQSplitter::Horizontal, topFrame ); - QWidget *w = new QWidget( mSplitter ); - ( new QVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true ); + TQWidget *w = new TQWidget( mSplitter ); + ( new TQVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true ); if ( mType == Reply ) { - QWidget *r = new QWidget( w ); - QHBoxLayout* rlayout = new QHBoxLayout( r ); + TQWidget *r = new TQWidget( w ); + TQHBoxLayout* rlayout = new TQHBoxLayout( r ); - QLabel *rlabel = new QLabel( i18n("&Recipient:"),r ); - QFont f = r->font(); + TQLabel *rlabel = new TQLabel( i18n("&Recipient:"),r ); + TQFont f = r->font(); f.setBold( true ); r->setFont( f ); rlayout->add( rlabel ); - mRecipient = new QComboBox( r ); + mRecipient = new TQComboBox( r ); mRecipient->insertItem( i18n("Normal (bugs.kde.org & Maintainer & kde-bugs-dist)"), BugCommand::Normal ); mRecipient->insertItem( i18n("Maintonly (bugs.kde.org & Maintainer)"), BugCommand::Maintonly ); mRecipient->insertItem( i18n("Quiet (bugs.kde.org only)"), BugCommand::Quiet ); rlabel->setBuddy( mRecipient ); rlayout->add( mRecipient ); - QSpacerItem *rspacer= new QSpacerItem( 1,1,QSizePolicy::Expanding ); + TQSpacerItem *rspacer= new TQSpacerItem( 1,1,TQSizePolicy::Expanding ); rlayout->addItem( rspacer ); // Reply currently only replies to the bug tracking system @@ -74,30 +74,30 @@ MsgInputDialog::MsgInputDialog(MsgInputDialog::MessageType type, const Bug &bug, } - QLabel *l = new QLabel( i18n( "&Message" ), w ); - QFont f = l->font(); + TQLabel *l = new TQLabel( i18n( "&Message" ), w ); + TQFont f = l->font(); f.setBold( true ); l->setFont( f ); mMessageEdit = new KTextEdit( w ); mMessageEdit->setMinimumWidth( mMessageEdit->fontMetrics().width('x') * 72 ); - mMessageEdit->setWordWrap( QTextEdit::FixedColumnWidth ); + mMessageEdit->setWordWrap( TQTextEdit::FixedColumnWidth ); mMessageEdit->setWrapColumnOrWidth( 72 ); l->setBuddy( mMessageEdit ); - w = new QWidget( mSplitter ); - ( new QVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true ); - l = new QLabel( i18n( "&Preset Messages" ), w ); + w = new TQWidget( mSplitter ); + ( new TQVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true ); + l = new TQLabel( i18n( "&Preset Messages" ), w ); l->setFont( f ); mPresets = new KListBox( w ); updatePresets(); l->setBuddy( mPresets ); - connect( mPresets, SIGNAL( executed( QListBoxItem* ) ), - SLOT( slotPresetSelected( QListBoxItem * ) ) ); - connect( this, SIGNAL( user2Clicked() ), SLOT( editPresets() ) ); - connect( this, SIGNAL( user1Clicked() ), SLOT( clearMessage() ) ); + connect( mPresets, TQT_SIGNAL( executed( TQListBoxItem* ) ), + TQT_SLOT( slotPresetSelected( TQListBoxItem * ) ) ); + connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SLOT( editPresets() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( clearMessage() ) ); mMessageEdit->setFocus(); if ( !quotedMsg.isEmpty() ) @@ -116,7 +116,7 @@ void MsgInputDialog::readConfig() { resize( KBBPrefs::instance()->mMsgDlgWidth, KBBPrefs::instance()->mMsgDlgHeight ); - QValueList<int> sizes = KBBPrefs::instance()->mMsgDlgSplitter; + TQValueList<int> sizes = KBBPrefs::instance()->mMsgDlgSplitter; mSplitter->setSizes( sizes ); } @@ -131,15 +131,15 @@ void MsgInputDialog::updatePresets() { mPresets->clear(); - QMap<QString,QString> messageButtons = KBBPrefs::instance()->mMessageButtons; + TQMap<TQString,TQString> messageButtons = KBBPrefs::instance()->mMessageButtons; int id = 0; - QMap<QString,QString>::ConstIterator it; + TQMap<TQString,TQString>::ConstIterator it; for( it = messageButtons.begin(); it != messageButtons.end(); ++it ) mPresets->insertItem( it.key(), id ); } -QString MsgInputDialog::message() const +TQString MsgInputDialog::message() const { return mMessageEdit->text(); } @@ -153,7 +153,7 @@ void MsgInputDialog::editPresets() updatePresets(); } -void MsgInputDialog::slotPresetSelected( QListBoxItem *lbi ) +void MsgInputDialog::slotPresetSelected( TQListBoxItem *lbi ) { mMessageEdit->setText( KBBPrefs::instance()->mMessageButtons[ lbi->text() ] ); } @@ -195,18 +195,18 @@ void MsgInputDialog::slotCancel() delete this; } -void MsgInputDialog::insertQuotedMessage( const QString &msg ) +void MsgInputDialog::insertQuotedMessage( const TQString &msg ) { - Q_ASSERT( mMessageEdit->wordWrap() == QTextEdit::FixedColumnWidth ); + Q_ASSERT( mMessageEdit->wordWrap() == TQTextEdit::FixedColumnWidth ); - const QString quotationMarker = "> "; + const TQString quotationMarker = "> "; const unsigned int wrapColumn = mMessageEdit->wrapColumnOrWidth(); // ### Needs something more sophisticated than simplifyWhiteSpace to // handle quoting multiple paragraphs properly. - QString line = msg.simplifyWhiteSpace(); + TQString line = msg.simplifyWhiteSpace(); - QString quotedMsg; + TQString quotedMsg; while ( line.length() + quotationMarker.length() + 1 > wrapColumn ) { int pos = wrapColumn - quotationMarker.length() - 1; while ( pos > 0 && !line[ pos ].isSpace() ) |