Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
S
Stickers Renomator 2000
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Deurstann
Stickers Renomator 2000
Validations
e1816e24
Valider
e1816e24
rédigé
Il y a 1 an
par
Deurstann
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Various fixes
parent
75a0016c
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
main.cpp
+17
-1
17 ajouts, 1 suppression
main.cpp
mainwindow.cpp
+14
-3
14 ajouts, 3 suppressions
mainwindow.cpp
mainwindow.h
+3
-2
3 ajouts, 2 suppressions
mainwindow.h
mainwindow.ui
+13
-1
13 ajouts, 1 suppression
mainwindow.ui
avec
47 ajouts
et
7 suppressions
main.cpp
+
17
−
1
Voir le fichier @
e1816e24
...
@@ -3,11 +3,27 @@
...
@@ -3,11 +3,27 @@
#include
<QApplication>
#include
<QApplication>
#include
<QFile>
#include
<QFile>
#include
<QTextStream>
#include
<QTextStream>
#include
<QCommandLineParser>
#include
<QStringList>
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
QApplication
a
(
argc
,
argv
);
QApplication
a
(
argc
,
argv
);
MainWindow
w
;
QCoreApplication
::
setApplicationName
(
"stickers-renomator-2000"
);
QCoreApplication
::
setApplicationVersion
(
"1.0"
);
QCommandLineParser
parser
;
parser
.
setApplicationDescription
(
"This is an application used to efficiently rename stickers collections."
);
parser
.
addHelpOption
();
parser
.
addVersionOption
();
parser
.
addPositionalArgument
(
"dir"
,
QCoreApplication
::
translate
(
"dir"
,
"[Optional] Directory where the images are located"
));
parser
.
process
(
a
);
const
QStringList
args
=
parser
.
positionalArguments
();
QString
dir
=
""
;
if
(
args
.
size
()
>
0
){
dir
=
args
.
at
(
0
);
}
MainWindow
w
(
dir
);
w
.
show
();
w
.
show
();
return
a
.
exec
();
return
a
.
exec
();
}
}
Ce diff est replié.
Cliquez pour l'agrandir.
mainwindow.cpp
+
14
−
3
Voir le fichier @
e1816e24
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include
<QPixmap>
#include
<QPixmap>
#include
<QKeyEvent>
#include
<QKeyEvent>
MainWindow
::
MainWindow
(
QWidget
*
parent
)
MainWindow
::
MainWindow
(
QString
dir
,
QWidget
*
parent
)
:
QMainWindow
(
parent
)
:
QMainWindow
(
parent
)
,
ui
(
new
Ui
::
StickersRenomator2000
)
,
ui
(
new
Ui
::
StickersRenomator2000
)
{
{
...
@@ -15,6 +15,7 @@ MainWindow::MainWindow(QWidget *parent)
...
@@ -15,6 +15,7 @@ MainWindow::MainWindow(QWidget *parent)
MainWindow
::
setWindowTitle
(
"Stickers Renomator 2000"
);
MainWindow
::
setWindowTitle
(
"Stickers Renomator 2000"
);
ui
->
label_2
->
setScaledContents
(
false
);
ui
->
label_2
->
setScaledContents
(
false
);
connect
(
ui
->
lineEdit
,
SIGNAL
(
returnPressed
()),
this
,
SLOT
(
on_pushButton_clicked
()));
connect
(
ui
->
lineEdit
,
SIGNAL
(
returnPressed
()),
this
,
SLOT
(
on_pushButton_clicked
()));
this
->
imageFolder
=
dir
;
}
}
MainWindow
::~
MainWindow
()
MainWindow
::~
MainWindow
()
...
@@ -24,9 +25,12 @@ MainWindow::~MainWindow()
...
@@ -24,9 +25,12 @@ MainWindow::~MainWindow()
void
MainWindow
::
on_actionOpen_Folder_triggered
()
void
MainWindow
::
on_actionOpen_Folder_triggered
()
{
{
this
->
imageFolder
=
QFileDialog
::
getExistingDirectory
(
this
);
QString
newImageFolder
=
QFileDialog
::
getExistingDirectory
(
this
);
if
(
newImageFolder
!=
""
){
this
->
imageFolder
=
newImageFolder
;
processImages
();
processImages
();
}
}
}
void
MainWindow
::
processImages
()
void
MainWindow
::
processImages
()
{
{
...
@@ -49,6 +53,13 @@ void MainWindow::setImage()
...
@@ -49,6 +53,13 @@ void MainWindow::setImage()
void
MainWindow
::
resizeEvent
(
QResizeEvent
*
event
)
void
MainWindow
::
resizeEvent
(
QResizeEvent
*
event
)
{
{
QMainWindow
::
resizeEvent
(
event
);
QMainWindow
::
resizeEvent
(
event
);
if
(
isFirstResize
){
if
(
this
->
imageFolder
!=
""
){
processImages
();
}
isFirstResize
=
false
;
return
;
}
if
(
!
this
->
currentImage
.
isNull
()){
if
(
!
this
->
currentImage
.
isNull
()){
setImage
();
setImage
();
}
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
mainwindow.h
+
3
−
2
Voir le fichier @
e1816e24
...
@@ -14,8 +14,9 @@ class MainWindow : public QMainWindow
...
@@ -14,8 +14,9 @@ class MainWindow : public QMainWindow
Q_OBJECT
Q_OBJECT
public:
public:
MainWindow
(
QWidget
*
parent
=
nullptr
);
MainWindow
(
QString
dir
,
QWidget
*
parent
=
nullptr
);
~
MainWindow
();
~
MainWindow
();
QString
imageFolder
;
private
slots
:
private
slots
:
void
on_actionOpen_Folder_triggered
();
void
on_actionOpen_Folder_triggered
();
...
@@ -31,11 +32,11 @@ private slots:
...
@@ -31,11 +32,11 @@ private slots:
private:
private:
Ui
::
StickersRenomator2000
*
ui
;
Ui
::
StickersRenomator2000
*
ui
;
QString
imageFolder
;
QStringList
imageList
;
QStringList
imageList
;
int
currentImageIndex
;
int
currentImageIndex
;
QString
currentImagePath
;
QString
currentImagePath
;
QPixmap
currentImage
;
QPixmap
currentImage
;
bool
isFirstResize
=
true
;
void
resizeEvent
(
QResizeEvent
*
event
)
override
;
void
resizeEvent
(
QResizeEvent
*
event
)
override
;
void
keyPressEvent
(
QKeyEvent
*
event
)
override
;
void
keyPressEvent
(
QKeyEvent
*
event
)
override
;
void
mousePressEvent
(
QMouseEvent
*
event
)
override
;
void
mousePressEvent
(
QMouseEvent
*
event
)
override
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
mainwindow.ui
+
13
−
1
Voir le fichier @
e1816e24
...
@@ -474,8 +474,20 @@
...
@@ -474,8 +474,20 @@
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
200
</height>
</size>
</property>
<property
name=
"baseSize"
>
<size>
<width>
200
</width>
<height>
200
</height>
</size>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string
>
TextLabel
</string
>
<string
/
>
</property>
</property>
<property
name=
"scaledContents"
>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
<bool>
true
</bool>
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter