1 /***************************************************************************
5 manage multiple choice suggestions for queries
7 -----------------------------------------------------------------------
9 begin : Mon Oct 29 18:09:29 1999
11 copyright : (C) 1999-2001 Ewald Arnold
12 (C) 2001 The KDE-EDU team
13 email : kvoctrain@ewald-arnold.de
15 -----------------------------------------------------------------------
17 ***************************************************************************/
19 /***************************************************************************
21 * This program is free software; you can redistribute it and/or modify *
22 * it under the terms of the GNU General Public License as published by *
23 * the Free Software Foundation; either version 2 of the License, or *
24 * (at your option) any later version. *
26 ***************************************************************************/
28 #include "MultipleChoice.h"
30 MultipleChoice::MultipleChoice (
46 bool MultipleChoice::isEmpty() const
48 return muc1
.stripWhiteSpace().isEmpty()
49 && muc2
.stripWhiteSpace().isEmpty()
50 && muc3
.stripWhiteSpace().isEmpty()
51 && muc4
.stripWhiteSpace().isEmpty()
52 && muc5
.stripWhiteSpace().isEmpty();
56 void MultipleChoice::clear()
66 QString
MultipleChoice::mc (unsigned idx
) const
79 unsigned MultipleChoice::size()
97 void MultipleChoice::normalize()
99 // fill from first to last
101 if (muc1
.isEmpty()) {
106 if (muc2
.isEmpty()) {
111 if (muc3
.isEmpty()) {
116 if (muc4
.isEmpty()) {