Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
projetcppqt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Durand Ulysse
projetcppqt
Commits
543cb40b
Commit
543cb40b
authored
2 months ago
by
Yanis Dziki
Browse files
Options
Downloads
Patches
Plain Diff
clean
parent
c6b6b7a6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
motus/brain.cpp
+2
-2
2 additions, 2 deletions
motus/brain.cpp
motus/jeu.h
+3
-3
3 additions, 3 deletions
motus/jeu.h
with
5 additions
and
5 deletions
motus/brain.cpp
+
2
−
2
View file @
543cb40b
...
...
@@ -50,10 +50,10 @@ vector<string> Brain::getTxtFiles() {
vector
<
string
>
txtFiles
;
try
{
// Iterate through the folder
for
(
const
auto
&
entry
:
fs
::
directory_iterator
(
dicodir
))
{
if
(
entry
.
is_regular_file
()
&&
entry
.
path
().
extension
()
==
".txt"
)
{
txtFiles
.
push_back
(
entry
.
path
().
string
());
// Add the file path to the vector
txtFiles
.
push_back
(
entry
.
path
().
string
());
}
}
}
catch
(
const
exception
&
e
)
{
...
...
This diff is collapsed.
Click to expand it.
motus/jeu.h
+
3
−
3
View file @
543cb40b
...
...
@@ -21,19 +21,19 @@ public:
Q_INVOKABLE
int
getWidth
();
Q_INVOKABLE
int
getHeight
();
Q_INVOKABLE
void
startGame
();
// pour init depuis QML
QQuickItem
*
getGameWindow
()
const
{
return
gameWindow
;
}
// Getter
fo
r gameWindow
QQuickItem
*
getGameWindow
()
const
{
return
gameWindow
;
}
// Getter
pou
r gameWindow
void
setLetterModel
(
LetterModel
*
model
);
// Setter pour le modèle
signals
:
void
motChanged
();
void
gameWindowChanged
();
// Signal to notify when the game window is set
void
gameWindowChanged
();
private
:
Brain
*
brain
;
QQmlApplicationEngine
*
engine
;
QString
mot
;
QQuickItem
*
gameWindow
;
// Pointer to the QQuickItem of the GameWindow
QQuickItem
*
gameWindow
;
LetterModel
*
m_letterModel
=
nullptr
;
// Modèle QML
int
currentIndex
=
0
;
// Pour suivre où on écrit
int
width
;
...
...
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