-
Notifications
You must be signed in to change notification settings - Fork 2
/
combohelperdialog.h
42 lines (35 loc) · 1.03 KB
/
combohelperdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* combohelperdialog.h
*
* The ComboHelperDialog class is used to create a pop-up
* dialog that lets the user choose a certain sum and a
* certain number of numbers, and then displays the
* possible combinations for that "sum" in "num."
* There are two QComboBoxes (for choosing "sum"
* and "num"), and a QPlainTextEdit to show the combinations.
*
* A pointer to a PuzzleBoard is present so that on construction,
* we can copy the data from the PuzzleBoards sumInNumCombo[SUM][NUM]
* into ours. After the copy, the pointer is not used.
*/
#ifndef COMBOHELPERDIALOG_H
#define COMBOHELPERDIALOG_H
#include <QWidget>
#include <QtWidgets>
#include "puzzleboard.h"
class ComboHelperDialog : public QDialog {
Q_OBJECT
public:
ComboHelperDialog(PuzzleBoard *b);
private slots:
void setCurrSum();
void setCurrNum();
void updateTextBox();
private:
PuzzleBoard *board;
QVector<QVector<int>> sumInNumCombo[46][10];
QComboBox *sumCombo, *numCombo;
QPlainTextEdit *textBox;
int currSum, currNum;
};
#endif