File indexing completed on 2022-11-29 18:12:01

0001 /*
0002     SPDX-FileCopyrightText: 2006-2008 Carsten Niehaus <cniehaus@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef RSDIALOG_H
0008 #define RSDIALOG_H
0009 
0010 #include <QDialog>
0011 #include <QMap>
0012 #include <QWidget>
0013 
0014 #include "ui_rswidget.h"
0015 
0016 /**
0017  * This class is the main class for R- and S-Phrases dialog.
0018  *
0019  * @author Carsten Niehaus
0020  */
0021 class RSDialog : public QDialog
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit RSDialog(QWidget *parent);
0027 
0028     Ui::RSWidget ui;
0029 
0030     /**
0031      * Filter the R- and S-Phrases.
0032      */
0033     void filterRS(const QList<int> &r, const QList<int> &s);
0034 
0035     QString rphrase(int number);
0036 
0037     QString sphrase(int number);
0038 
0039 public Q_SLOTS:
0040     void filter();
0041 
0042 private Q_SLOTS:
0043     void slotHelp();
0044 
0045 private:
0046     QMap<int, QString> rphrases_map;
0047     QMap<int, QString> sphrases_map;
0048 
0049     void createSPhrases();
0050     void createRPhrases();
0051 
0052     void invalidPhaseString();
0053 };
0054 
0055 #endif // RSDIALOG_H