Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
Vivy
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
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
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
Elliu
Vivy
Validations
f396541f
Vérifiée
Valider
f396541f
rédigé
Il y a 3 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
LIB: Add the getMainWindow to the VivyApplication
parent
80ce325b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!17
Api update
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/VivyApplication.cc
+10
-2
10 ajouts, 2 suppressions
src/VivyApplication.cc
src/VivyApplication.hh
+6
-0
6 ajouts, 0 suppression
src/VivyApplication.hh
avec
16 ajouts
et
2 suppressions
src/VivyApplication.cc
+
10
−
2
Voir le fichier @
f396541f
...
@@ -57,8 +57,8 @@ VivyApplication::exec() noexcept
...
@@ -57,8 +57,8 @@ VivyApplication::exec() noexcept
setCursorFlashTime
(
0
);
setCursorFlashTime
(
0
);
// Show the main window
// Show the main window
M
ainWindow
m
ainWindow
;
m
ainWindow
Ptr
=
std
::
make_unique
<
M
ainWindow
>
()
;
mainWindow
.
show
();
mainWindow
Ptr
->
show
();
// Main loop
// Main loop
return
QApplication
::
exec
();
return
QApplication
::
exec
();
...
@@ -83,3 +83,11 @@ VivyApplication::getApplicationFont(Font id) const noexcept
...
@@ -83,3 +83,11 @@ VivyApplication::getApplicationFont(Font id) const noexcept
// Let the program crash
// Let the program crash
qFatal
(
"UNREACHABLE"
);
qFatal
(
"UNREACHABLE"
);
}
}
MainWindow
*
VivyApplication
::
getMainWindow
()
const
{
if
(
!
mainWindowPtr
)
throw
std
::
logic_error
(
"No main window in the graphic VivyApplication"
);
return
mainWindowPtr
.
get
();
}
Ce diff est replié.
Cliquez pour l'agrandir.
src/VivyApplication.hh
+
6
−
0
Voir le fichier @
f396541f
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
namespace
Vivy
namespace
Vivy
{
{
class
MainWindow
;
// Vivy application class
class
VivyApplication
:
public
QApplication
{
class
VivyApplication
:
public
QApplication
{
Q_OBJECT
Q_OBJECT
...
@@ -59,12 +62,15 @@ private:
...
@@ -59,12 +62,15 @@ private:
int
fontIdBold
;
int
fontIdBold
;
int
fontIdBoldItalic
;
int
fontIdBoldItalic
;
std
::
unique_ptr
<
MainWindow
>
mainWindowPtr
{
nullptr
};
public
:
public
:
VivyApplication
(
int
&
argc
,
char
**
argv
);
VivyApplication
(
int
&
argc
,
char
**
argv
);
int
exec
()
noexcept
;
int
exec
()
noexcept
;
QFont
getApplicationFont
(
Font
)
const
noexcept
;
QFont
getApplicationFont
(
Font
)
const
noexcept
;
[[
nodiscard
(
"handle-it"
)]]
MainWindow
*
getMainWindow
()
const
;
void
setTheme
(
Theme
)
noexcept
;
void
setTheme
(
Theme
)
noexcept
;
};
};
...
...
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