Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sudoku solver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Silas Dohm
sudoku solver
Commits
f79c5e0e
Commit
f79c5e0e
authored
2 years ago
by
Silas Dohm
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
32c741cf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
window.cpp
+5
-6
5 additions, 6 deletions
window.cpp
window.h
+8
-3
8 additions, 3 deletions
window.h
with
13 additions
and
9 deletions
window.cpp
+
5
−
6
View file @
f79c5e0e
#include
"window.h"
#include
"window.h"
#include
<QApplication>
#include
<QApplication>
#include
<QStandardPaths>
#include
<QDebug>
#include
<QDebug>
#include
<QThread>
#include
<QPushButton>
#include
<QProgressBar>
#include
<QSlider>
#include
<QSlider>
#include
<QGridLayout>
#include
<QGridLayout>
#include
<QHBoxLayout>
#include
<QHBoxLayout>
...
@@ -11,6 +9,7 @@
...
@@ -11,6 +9,7 @@
#include
<QSpacerItem>
#include
<QSpacerItem>
#include
<QTimer>
#include
<QTimer>
Window
::
Window
(
QWidget
*
parent
)
Window
::
Window
(
QWidget
*
parent
)
:
QWidget
{
parent
}
:
QWidget
{
parent
}
{
{
...
@@ -25,9 +24,9 @@ Window::Window(QWidget *parent)
...
@@ -25,9 +24,9 @@ Window::Window(QWidget *parent)
m_slider
->
setValue
(
m_delay
);
m_slider
->
setValue
(
m_delay
);
connect
(
m_slider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setValue
(
int
)));
connect
(
m_slider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
setValue
(
int
)));
QHBoxLayout
*
horizontalLayout
=
new
QHBoxLayout
(
this
);
horizontalLayout
=
new
QHBoxLayout
(
this
);
QVBoxLayout
*
verticalLayout
=
new
QVBoxLayout
();
verticalLayout
=
new
QVBoxLayout
();
QGridLayout
*
layout
=
new
QGridLayout
();
layout
=
new
QGridLayout
();
m_spacer
[
0
]
=
new
QSpacerItem
(
4
,
4
,
QSizePolicy
::
Minimum
,
QSizePolicy
::
Fixed
);
m_spacer
[
0
]
=
new
QSpacerItem
(
4
,
4
,
QSizePolicy
::
Minimum
,
QSizePolicy
::
Fixed
);
m_spacer
[
1
]
=
new
QSpacerItem
(
4
,
4
,
QSizePolicy
::
Minimum
,
QSizePolicy
::
Fixed
);
m_spacer
[
1
]
=
new
QSpacerItem
(
4
,
4
,
QSizePolicy
::
Minimum
,
QSizePolicy
::
Fixed
);
...
...
This diff is collapsed.
Click to expand it.
window.h
+
8
−
3
View file @
f79c5e0e
...
@@ -2,11 +2,13 @@
...
@@ -2,11 +2,13 @@
#define WINDOW_H
#define WINDOW_H
#include
<QWidget>
#include
<QWidget>
#include
<QPushButton>
#include
<QProgressBar>
#include
<QSlider>
#include
"cell.h"
#include
"cell.h"
class
QSpacerItem
;
class
QSpacerItem
;
class
QHBoxLayout
;
class
QVBoxLayout
;
class
QGridLayout
;
class
QPushButton
;
class
QSlider
;
class
Window
:
public
QWidget
class
Window
:
public
QWidget
{
{
Q_OBJECT
Q_OBJECT
...
@@ -20,6 +22,9 @@ private:
...
@@ -20,6 +22,9 @@ private:
std
::
array
<
Cell
,
81
>
m_cell
;
std
::
array
<
Cell
,
81
>
m_cell
;
int
m_delay
=
300
;
int
m_delay
=
300
;
QSpacerItem
*
m_spacer
[
3
];
QSpacerItem
*
m_spacer
[
3
];
QHBoxLayout
*
horizontalLayout
;
QVBoxLayout
*
verticalLayout
;
QGridLayout
*
layout
;
struct
History
struct
History
{
{
Cell
*
cell
;
Cell
*
cell
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment