File indexing completed on 2024-05-12 08:00:35

0001 /*
0002  *  Copyright 2010 Parker Coates <coates@kde.org>
0003  *
0004  *  This program is free software; you can redistribute it and/or
0005  *  modify it under the terms of the GNU General Public License as
0006  *  published by the Free Software Foundation; either version 2 of
0007  *  the License, or (at your option) any later version.
0008  *
0009  *  This program is distributed in the hope that it will be useful,
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012  *  GNU General Public License for more details.
0013  *
0014  *  You should have received a copy of the GNU General Public License
0015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0016  *
0017  */
0018 
0019 #ifndef NUMBEREDDEALDIALOG_H
0020 #define NUMBEREDDEALDIALOG_H
0021 
0022 // Qt
0023 #include <QDialog>
0024 #include <QMap>
0025 
0026 class KComboBox;
0027 class QSpinBox;
0028 
0029 class NumberedDealDialog : public QDialog
0030 {
0031     Q_OBJECT
0032 
0033 public:
0034     explicit NumberedDealDialog(QWidget *parent);
0035     void setGameType(int gameId);
0036     void setDealNumber(int dealNumber);
0037 
0038 public Q_SLOTS:
0039     void setVisible(bool visible) override;
0040 
0041 Q_SIGNALS:
0042     void dealChosen(int gameId, int dealNumber);
0043 
0044 private Q_SLOTS:
0045     void handleOkClicked();
0046 
0047 private:
0048     KComboBox *m_gameType;
0049     QSpinBox *m_dealNumber;
0050     QMap<int, int> m_indexToIdMap;
0051 };
0052 
0053 #endif