File indexing completed on 2024-04-21 03:51:00

0001 /*
0002     dialog page for multiple choice suggestions
0003     SPDX-FileCopyrightText: 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
0004     SPDX-FileCopyrightText: 2005-2006 Peter Hedlund <peter.hedlund@kdemail.net>
0005     SPDX-FileCopyrightText: 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef COMPARISONWIDGET_H
0010 #define COMPARISONWIDGET_H
0011 
0012 #include "ui_comparisonwidget.h"
0013 
0014 class KEduVocExpression;
0015 class KEduVocTranslation;
0016 class KEduVocDocument;
0017 
0018 namespace Editor
0019 {
0020 class ComparisonWidget : public QWidget, public Ui::comparisonWidget
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     explicit ComparisonWidget(QWidget *parent = nullptr);
0026 
0027 public Q_SLOTS:
0028     /**
0029      * To know about word types that are currently defined.
0030      * @param doc
0031      */
0032     void setDocument(KEduVocDocument *doc);
0033     /**
0034      * Update the word
0035      * @param entry
0036      * @param translation
0037      */
0038     void setTranslation(KEduVocExpression *entry, int translation);
0039 
0040 private Q_SLOTS:
0041     void slotMakeAdjectiveButton();
0042     void slotMakeAdverbButton();
0043 
0044     void slotComparativeChanged();
0045     void slotSuperlativeChanged();
0046 
0047 private:
0048     KEduVocTranslation *m_translation{nullptr};
0049     KEduVocDocument *m_doc{nullptr};
0050 };
0051 
0052 }
0053 
0054 #endif