OpenMS
Loading...
Searching...
No Matches
InteractiveSplashScreen.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
12
13#include <QtWidgets/QSplashScreen>
14
15#include <memory>
16
17// forward declarations (Qt classes live in the global namespace)
18class QKeyEvent;
19class QMouseEvent;
20class QPixmap;
21
22namespace OpenMS
23{
43 class OPENMS_GUI_DLLAPI InteractiveSplashScreen : public QSplashScreen
44 {
45 public:
47 explicit InteractiveSplashScreen(const QPixmap& pixmap);
48
51
59 void showFor(double max_seconds);
60
61 protected:
62 void mousePressEvent(QMouseEvent* e) override;
63 void keyPressEvent(QKeyEvent* e) override;
64
65 private:
66 struct Impl;
67 std::unique_ptr<Impl> impl_;
68 };
69} // namespace OpenMS
A QSplashScreen which stays responsive and can be dismissed early by the user.
Definition InteractiveSplashScreen.h:44
void mousePressEvent(QMouseEvent *e) override
InteractiveSplashScreen(const QPixmap &pixmap)
C'tor from a pixmap (as for QSplashScreen). Starts an internal timer used by showFor().
~InteractiveSplashScreen() override
D'tor.
void keyPressEvent(QKeyEvent *e) override
std::unique_ptr< Impl > impl_
Definition InteractiveSplashScreen.h:67
void showFor(double max_seconds)
Keep the splash visible and responsive for at most max_seconds, then close it.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19