KFeedbackQuestionList Class Reference

#include <kfeedback.h>

List of all members.

Signals

void checkComplete ()

Public Member Functions

 KFeedbackQuestionList (TQWidget *parent)
virtual ~KFeedbackQuestionList ()
virtual bool isComplete ()
TQString result ()
KFeedbackQuestionaddQuestion (const TQString &text, const TQString &id, bool exclusiveAnswer=true, bool required=false)
void addYesNoQuestion (const TQString &text, const TQString &id, bool required=false)
KFeedbackQuestionfirstQuestion () const
void questionAnswered ()
void questionAdded (KFeedbackQuestion *question)


Detailed Description

List of feedback questions presented in a TQListView widget.

Definition at line 187 of file kfeedback.h.


Constructor & Destructor Documentation

KFeedbackQuestionList::KFeedbackQuestionList ( TQWidget *  parent  ) 

Constructor.

Definition at line 239 of file kfeedback.cpp.

KFeedbackQuestionList::~KFeedbackQuestionList (  )  [virtual]

Destructor.

Definition at line 247 of file kfeedback.cpp.


Member Function Documentation

bool KFeedbackQuestionList::isComplete (  )  [virtual]

Returns whether or not this question list is answered satisfactorily, i.e. if all questions marked as "required" are answered.

Definition at line 254 of file kfeedback.cpp.

References firstQuestion(), KFeedbackQuestion::isAnswered(), KFeedbackQuestion::isRequired(), and KFeedbackQuestion::nextQuestion().

Referenced by KFeedbackForm::readyToSend().

TQString KFeedbackQuestionList::result (  ) 

The result of all answered questions in ASCII.

Definition at line 270 of file kfeedback.cpp.

References firstQuestion(), KFeedbackQuestion::nextQuestion(), and KFeedbackQuestion::result().

Referenced by KFeedbackForm::sendMail().

KFeedbackQuestion * KFeedbackQuestionList::addQuestion ( const TQString &  text,
const TQString &  id,
bool  exclusiveAnswer = true,
bool  required = false 
)

Add a yes/no question to the list.

'text' is the text the user will see (in his native language).

'id' is what will be sent with the feedback mail, thus it should be unique within the application, yet human readable (preferably English) and not contain any weird characters that might confuse scripts that are later used to automatically parse those mails. Examples: "would_recommend_to_a_friend"

Set 'required' to 'true' if answering this question is required to successfully complete this form.

Returns a pointer to this question so you can add answers.

Definition at line 288 of file kfeedback.cpp.

Referenced by KShowMailApp::slotSendFeedbackMail().

void KFeedbackQuestionList::addYesNoQuestion ( const TQString &  text,
const TQString &  id,
bool  required = false 
)

Add a yes/no question to the list.

Definition at line 303 of file kfeedback.cpp.

References KFeedbackQuestion::addAnswer().

Referenced by KShowMailApp::slotSendFeedbackMail().

KFeedbackQuestion* KFeedbackQuestionList::firstQuestion (  )  const [inline]

Returns the first question of that list. Use KFeedbackQuestion::next() to get the next one.

Definition at line 247 of file kfeedback.h.

Referenced by isComplete(), and result().

void KFeedbackQuestionList::questionAnswered (  ) 

Notify the list that another question has been answered. Emits the checkComplete() signal when all required questions are answered.

Definition at line 318 of file kfeedback.cpp.

Referenced by KFeedbackAnswer::stateChange().

void KFeedbackQuestionList::questionAdded ( KFeedbackQuestion question  ) 

Notify the list that another question has been added. Emits the checkComplete() signal when a required question is added.

Definition at line 324 of file kfeedback.cpp.

References KFeedbackQuestion::isRequired().

Referenced by KFeedbackQuestion::KFeedbackQuestion().

void KFeedbackQuestionList::checkComplete (  )  [signal]

Emitted when all required questions are answered.

Referenced by questionAdded(), and questionAnswered().


The documentation for this class was generated from the following files:
Generated on Thu Jul 5 19:36:09 2007 for kshowmail by  doxygen 1.5.0