summaryrefslogtreecommitdiffstats
path: root/src/kfeedback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kfeedback.cpp')
-rw-r--r--src/kfeedback.cpp140
1 files changed, 70 insertions, 70 deletions
diff --git a/src/kfeedback.cpp b/src/kfeedback.cpp
index e1eefac..07d7ba3 100644
--- a/src/kfeedback.cpp
+++ b/src/kfeedback.cpp
@@ -9,12 +9,12 @@
*/
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qglobal.h>
-#include <qmultilineedit.h>
-#include <qhbox.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqglobal.h>
+#include <tqmultilineedit.h>
+#include <tqhbox.h>
#include <kglobal.h>
#include <kapp.h>
@@ -27,15 +27,15 @@
#include "kfeedback.h"
-KFeedbackDialog::KFeedbackDialog( const QString & feedbackMailAddress,
- const QString & helpTopic )
+KFeedbackDialog::KFeedbackDialog( const TQString & feedbackMailAddress,
+ const TQString & helpTopic )
: KDialogBase( Plain, // dialogFace
i18n( "Feedback" ), // caption
Apply | Cancel
| ( helpTopic.isEmpty() ? 0 : (int) Help ), // buttonMask
Apply ) // defaultButton
{
- QVBoxLayout * layout = new QVBoxLayout( plainPage(), 0, spacingHint() );
+ TQVBoxLayout * tqlayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
setButtonApply( KGuiItem( i18n( "&Mail this..." ) ) );
if ( ! helpTopic.isEmpty() )
@@ -44,20 +44,20 @@ KFeedbackDialog::KFeedbackDialog( const QString & feedbackMailAddress,
_form = new KFeedbackForm( feedbackMailAddress, plainPage() );
Q_CHECK_PTR( _form );
- layout->addWidget( _form );
+ tqlayout->addWidget( _form );
checkSendButton();
- connect( this, SIGNAL( applyClicked() ),
- _form, SLOT ( sendMail() ) );
+ connect( this, TQT_SIGNAL( applyClicked() ),
+ _form, TQT_SLOT ( sendMail() ) );
- connect( _form, SIGNAL( mailSent() ),
- this, SLOT ( hide() ) );
+ connect( _form, TQT_SIGNAL( mailSent() ),
+ this, TQT_SLOT ( hide() ) );
- connect( _form, SIGNAL( mailSent() ),
- this, SIGNAL( mailSent() ) );
+ connect( _form, TQT_SIGNAL( mailSent() ),
+ this, TQT_SIGNAL( mailSent() ) );
- connect( _form, SIGNAL( checkComplete() ),
- this, SLOT ( checkSendButton() ) );
+ connect( _form, TQT_SIGNAL( checkComplete() ),
+ this, TQT_SLOT ( checkSendButton() ) );
}
@@ -77,16 +77,16 @@ KFeedbackDialog::checkSendButton()
-KFeedbackForm::KFeedbackForm( const QString & feedbackMailAddress,
- QWidget * parent )
- : QVBox( parent )
+KFeedbackForm::KFeedbackForm( const TQString & feedbackMailAddress,
+ TQWidget * parent )
+ : TQVBox( parent )
, _feedbackMailAddress( feedbackMailAddress )
{
//
// Explanation above the question list
//
- QLabel * label = new QLabel( i18n( "<p><b>Please tell us your opinion about this program.</b></p>"
+ TQLabel * label = new TQLabel( i18n( "<p><b>Please tell us your opinion about this program.</b></p>"
"<p>You will be able to review everything in your mailer "
"before any mail is sent.<br>"
"Nothing will be sent behind your back.</p>"
@@ -98,47 +98,47 @@ KFeedbackForm::KFeedbackForm( const QString & feedbackMailAddress,
_questionList = new KFeedbackQuestionList( this );
Q_CHECK_PTR( _questionList );
- connect( _questionList, SIGNAL( checkComplete() ),
- this, SLOT ( slotCheckComplete() ) );
+ connect( _questionList, TQT_SIGNAL( checkComplete() ),
+ this, TQT_SLOT ( slotCheckComplete() ) );
//
// Explanation below the question list
//
- QHBox * hbox = new QHBox( this );
+ TQHBox * hbox = new TQHBox( this );
Q_CHECK_PTR( hbox );
- QSizePolicy pol( QSizePolicy::Fixed, QSizePolicy::Fixed ); // hor / vert
+ TQSizePolicy pol( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); // hor / vert
- label = new QLabel( i18n( "Questions marked with " ), hbox );
+ label = new TQLabel( i18n( "Questions marked with " ), hbox );
Q_CHECK_PTR( label );
- label->setSizePolicy( pol );
+ label->tqsetSizePolicy( pol );
- label = new QLabel( hbox );
+ label = new TQLabel( hbox );
Q_CHECK_PTR( label );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "edit", KIcon::Small ) );
- label->setSizePolicy( pol );
+ label->tqsetSizePolicy( pol );
- label = new QLabel( i18n( " must be answered before a mail can be sent.") , hbox );
+ label = new TQLabel( i18n( " must be answered before a mail can be sent.") , hbox );
Q_CHECK_PTR( label );
- label->setSizePolicy( pol );
+ label->tqsetSizePolicy( pol );
- new QWidget( hbox ); // Fill any leftover space to the right.
+ new TQWidget( hbox ); // Fill any leftover space to the right.
//
// Free-text comment field
//
- label = new QLabel( "\n" + i18n( "&Additional Comments:" ), this ); Q_CHECK_PTR( label );
- _comment = new QMultiLineEdit( this ); Q_CHECK_PTR( _comment );
+ label = new TQLabel( "\n" + i18n( "&Additional Comments:" ), this ); Q_CHECK_PTR( label );
+ _comment = new TQMultiLineEdit( this ); Q_CHECK_PTR( _comment );
label->setBuddy( _comment );
-#if (QT_VERSION < 300)
+#if ([[[TQT_VERSION IS DEPRECATED]]] < 300)
_comment->setFixedVisibleLines( 5 );
#endif
- _comment->setWordWrap( QMultiLineEdit::FixedColumnWidth );
+ _comment->setWordWrap( TQMultiLineEdit::FixedColumnWidth );
_comment->setWrapColumnOrWidth( 70 );
}
@@ -156,7 +156,7 @@ KFeedbackForm::sendMail()
// Build mail subject
//
- QString subject;
+ TQString subject;
const KAboutData * aboutData = KGlobal::instance()->aboutData();
@@ -172,7 +172,7 @@ KFeedbackForm::sendMail()
// Build mail body
//
- QString body = subject + "\n\n"
+ TQString body = subject + "\n\n"
+ formatComment()
+ _questionList->result();
@@ -211,10 +211,10 @@ KFeedbackForm::slotCheckComplete()
}
-QString
+TQString
KFeedbackForm::formatComment()
{
- QString result = _comment->text();
+ TQString result = _comment->text();
if ( ! result.isEmpty() )
{
@@ -236,8 +236,8 @@ KFeedbackForm::readyToSend()
-KFeedbackQuestionList::KFeedbackQuestionList( QWidget *parent )
- : QListView( parent )
+KFeedbackQuestionList::KFeedbackQuestionList( TQWidget *parent )
+ : TQListView( parent )
{
addColumn( "" );
header()->hide();
@@ -267,10 +267,10 @@ KFeedbackQuestionList::isComplete()
}
-QString
+TQString
KFeedbackQuestionList::result()
{
- QString res;
+ TQString res;
KFeedbackQuestion * question = firstQuestion();
while ( question )
@@ -285,8 +285,8 @@ KFeedbackQuestionList::result()
KFeedbackQuestion *
-KFeedbackQuestionList::addQuestion( const QString & text,
- const QString & id,
+KFeedbackQuestionList::addQuestion( const TQString & text,
+ const TQString & id,
bool exclusiveAnswer,
bool required )
{
@@ -300,8 +300,8 @@ KFeedbackQuestionList::addQuestion( const QString & text,
void
-KFeedbackQuestionList::addYesNoQuestion( const QString & text,
- const QString & id,
+KFeedbackQuestionList::addYesNoQuestion( const TQString & text,
+ const TQString & id,
bool required )
{
@@ -334,12 +334,12 @@ KFeedbackQuestionList::questionAdded( KFeedbackQuestion * question)
static int nextNo = 0;
KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * parent,
- const QString & text,
- const QString & id,
+ const TQString & text,
+ const TQString & id,
bool exclusiveAnswer,
bool required,
bool open )
- : QCheckListItem( parent, text )
+ : TQCheckListItem( parent, text )
, _id( id )
, _exclusiveAnswer( exclusiveAnswer )
, _required( required )
@@ -357,8 +357,8 @@ KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * parent,
void
-KFeedbackQuestion::addAnswer( const QString & text,
- const QString & id )
+KFeedbackQuestion::addAnswer( const TQString & text,
+ const TQString & id )
{
new KFeedbackAnswer( this, text, id, _exclusiveAnswer );
}
@@ -381,7 +381,7 @@ KFeedbackQuestion::isAnswered()
/**
* If this question requires an exclusive answer, exactly one of them
* should be checked. We don't need to bother about more than one being
- * checked here - QListView does that for us.
+ * checked here - TQListView does that for us.
**/
KFeedbackAnswer *answer = firstAnswer();
@@ -398,10 +398,10 @@ KFeedbackQuestion::isAnswered()
}
-QString
+TQString
KFeedbackQuestion::result()
{
- QString res;
+ TQString res;
int answers = 0;
KFeedbackAnswer *answer = firstAnswer();
@@ -426,17 +426,17 @@ KFeedbackQuestion::result()
}
-QString
+TQString
KFeedbackQuestion::text()
{
- return QCheckListItem::text(0);
+ return TQCheckListItem::text(0);
}
-QString
+TQString
KFeedbackQuestion::key( int, bool ) const
{
- QString no;
+ TQString no;
no.sprintf( "%08d", _no );
return no;
@@ -456,31 +456,31 @@ KFeedbackQuestion::questionList() const
KFeedbackAnswer::KFeedbackAnswer( KFeedbackQuestion * parent,
- const QString & text,
- const QString & id,
+ const TQString & text,
+ const TQString & id,
bool exclusive )
- : QCheckListItem( parent,
+ : TQCheckListItem( parent,
text,
exclusive
- ? QCheckListItem::RadioButton
- : QCheckListItem::CheckBox )
+ ? TQCheckListItem::RadioButton
+ : TQCheckListItem::CheckBox )
, _id( id )
{
_no = nextNo++;
}
-QString
+TQString
KFeedbackAnswer::text()
{
- return QCheckListItem::text(0);
+ return TQCheckListItem::text(0);
}
-QString
+TQString
KFeedbackAnswer::key( int, bool ) const
{
- QString no;
+ TQString no;
no.sprintf( "%08d", _no );
return no;