summaryrefslogtreecommitdiff
path: root/src/sudokuwidget.h
blob: ce1cffd392f13de5a7ec6ef03d552dcbde541c98 (plain)
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
43
44
45
46
47
48
49
50

#ifndef __INCLUDED_SUDOKUSOLVER_SUDOKUWIDGET__
#define __INCLUDED_SUDOKUSOLVER_SUDOKUWIDGET__

#include <QtGui>
#include <QWidget>

#include "sudoku.h"

class QLineEdit;

class SudokuWidget : public QWidget
{
	Q_OBJECT
	
public:
	SudokuWidget();
	
	/**
	 * @brief set widgets value from sudoku values
	 * */
	void set_values(const Sudoku & values);
	
	/**
	 * @brief set sudoku values from widget values
	 * */
	void get_values(Sudoku & values);
	
	/**
         * @brief return the default size hint for this widget
         * */
	virtual QSize sizeHint() const;
	
protected:	
        /**
         * @brief handle paint events
         * */
        virtual void paintEvent(QPaintEvent *event);
	
	/**
	 * @brief handle resize events
	 * */
	virtual void resizeEvent(QResizeEvent *event);
	
private:
	QLineEdit	* sudokuwidget_value[9][9];

};

#endif // __INCLUDED_SUDOKUSOLVER_SUDOKUWIDGET__