61 lines
1.3 KiB
C++
Executable File
61 lines
1.3 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Background Widget that covers a monitor with the project image
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Mike Wille, SLSE, 2016-05-05
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "lts_widgets_export.h"
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
class QPixmap;
|
|
class QEvent;
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
/**
|
|
* @brief The LtsBackgroundWidget class creates a fullscreen Widget that covers a monitor with the project image (used for payloads in opApp)
|
|
*/
|
|
class LTSWIDGETS_EXPORT LtsBackgroundWidget : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit LtsBackgroundWidget(QWidget *parent = nullptr);
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *e) override;
|
|
void closeEvent(QCloseEvent *e) override;
|
|
void resizeEvent(QResizeEvent *e) override;
|
|
bool event(QEvent *e) override;
|
|
|
|
private:
|
|
void setBackground();
|
|
void setUltraWide(bool set = true);
|
|
|
|
signals:
|
|
/**
|
|
* @brief signalOperatorAction is emitted when the operator moves/clickes the cursor or enters some letters - for example, show window again after it's hidden (screen saver effect)
|
|
*/
|
|
void signalOperatorAction();
|
|
|
|
public slots:
|
|
/**
|
|
* @brief showFullScreen shows the widget and raises it. Otherwise the widget would be far in the background (and wihtout a show not shown)
|
|
*/
|
|
void showFullScreen();
|
|
private:
|
|
QPixmap m_pixmap;
|
|
bool m_isUltraWide;
|
|
|
|
};
|
|
|
|
}
|