File indexing completed on 2024-10-13 03:32:50

0001 /*
0002  * manage multiple choice suggestions for queries
0003  * SPDX-FileCopyrightText: 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
0004  * SPDX-FileCopyrightText: 2005 Peter Hedlund <peter.hedlund@kdemail.net>
0005  * SPDX-License-Identifier: GPL-2.0-or-later
0006  */
0007 
0008 #ifndef KEDUVOCMULTIPLECHOICE_H
0009 #define KEDUVOCMULTIPLECHOICE_H
0010 
0011 #include "keduvocdocument_export.h"
0012 
0013 #include <QStringList>
0014 
0015 class KEDUVOCDOCUMENT_EXPORT KEduVocMultipleChoice
0016 {
0017 public:
0018     KEduVocMultipleChoice();
0019     KEduVocMultipleChoice(const KEduVocMultipleChoice &other);
0020     explicit KEduVocMultipleChoice(const QStringList &choices);
0021 
0022     ~KEduVocMultipleChoice();
0023 
0024     QStringList choices() const;
0025     void appendChoice(const QString &s);
0026 
0027     QString choice(int index) const;
0028 
0029     bool isEmpty() const;
0030     void clear();
0031     unsigned size() const;
0032 
0033     bool operator==(const KEduVocMultipleChoice &choice) const;
0034 
0035     KEduVocMultipleChoice &operator=(const KEduVocMultipleChoice &other);
0036 
0037 private:
0038     class KEduVocMultipleChoicePrivate;
0039     KEduVocMultipleChoicePrivate *const d;
0040 };
0041 
0042 #endif // MultipleChoice_included