Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
SplashScreen.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2025 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6 *
7 * Visit http://camitk.imag.fr for more information
8 *
9 * This file is part of CamiTK.
10 *
11 * CamiTK is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * CamiTK is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * $CAMITK_LICENCE_END$
24 ****************************************************************************/
25
26#ifndef __SPLASH_SCREEN__
27#define __SPLASH_SCREEN__
28
29// -- Core stuff
30#include "CamiTKAPI.h"
31
32#include <QWidget>
33#include <QLabel>
34#include <QProgressBar>
35#include <QMouseEvent>
36
37namespace camitk {
44class CAMITK_API SplashScreen : public QWidget {
45 Q_OBJECT
46public:
48 SplashScreen(QWidget* parent = nullptr);
49
51 void setProgress(int value);
52
53 // Set the message
54 void showMessage(const QString& message);
55
56// protected:
57// void mousePressEvent(QMouseEvent *event) override {
58// if (event->button() == Qt::LeftButton) {
59// m_dragPosition = event->globalPos() - frameGeometry().topLeft(); // QT6 globalPosition().toPoint()
60// event->accept();
61// }
62// }
63
64// void mouseMoveEvent(QMouseEvent *event) override {
65// if (event->buttons() & Qt::LeftButton) {
66// move(event->globalPos() - m_dragPosition); // QT6 globalPosition().toPoint()
67// event->accept();
68// }
69// }
70
71// void mouseReleaseEvent(QMouseEvent *event) override {
72// event->accept(); // Prevent unintended clicks from closing or interacting
73// }
74
75private:
76 QPoint m_dragPosition;
77
78private:
80 QLabel* messageLabel;
81
83 QProgressBar* progressBar;
84};
85
86} // namespace camitk
87
88#endif // __SPLASH_SCREEN__
#define CAMITK_API
Definition CamiTKAPI.h:66
CamiTK application splash screen.
Definition SplashScreen.h:44
Definition Action.cpp:40