Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+87
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* AvsApp
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Fröbel, NLSE, 2018-04-16
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/AudioVideoManagement/Shared/avmshared_export.h>
|
||||
#include <QObject>
|
||||
#include <QRect>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace LtsMultiMonitor
|
||||
{
|
||||
class FullscreenVideoDummyWidget;
|
||||
}
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
class AvaControl;
|
||||
|
||||
/**
|
||||
* Manages an AVS-dialog in a way that it will behave like an Excon-App.
|
||||
* When show() is called and the dialog is not visible yet, the Operator
|
||||
* needs to choose on which screen the App shall be placed.
|
||||
* The AVS-dialog will open in full-screen on the selected screen then.
|
||||
* You can call hide() explicitly in order to hide the App. But usually
|
||||
* this is done implicitly when a new App is placed ontop of this AvsApp.
|
||||
*
|
||||
* You can also call show(const QRect &geometry) in case you already know
|
||||
* where the app is to be placed and thus avoid the screen selection.
|
||||
*
|
||||
* @author Christian Fröbel
|
||||
*/
|
||||
class AVMSHARED_EXPORT AvsApp : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AvsApp(const QString &dialogId, AvaControl *avaControl);
|
||||
~AvsApp() override;
|
||||
|
||||
void show(const QVector<QWidget *> irreplacableWidgets = {});
|
||||
void show(const QRect &geometry);
|
||||
void hide(bool andClose = false);
|
||||
bool isVisible() const;
|
||||
bool isActive() const; // may be visible or hidden, but a ScreenPlaycementHelper is still there, so it might be hidden by the switcher
|
||||
|
||||
/**
|
||||
* Release alls streams that might still be active in this app.
|
||||
* Will be called implicitly when the dialog is hidden.
|
||||
* But it can be called explicitly, e.g. when a PlaybackApp of Type Normal is released
|
||||
* in which case the App remaines visible (hide() is not called then).
|
||||
*/
|
||||
void releaseStreams();
|
||||
|
||||
signals:
|
||||
void signalVisible();
|
||||
void signalPause();
|
||||
void signalResume();
|
||||
|
||||
private slots:
|
||||
void onWidgetPlaced(const QRect &geometry);
|
||||
void onPlacementHelperDestroyed();
|
||||
void onHideVideo();
|
||||
void onShowVideo();
|
||||
|
||||
private:
|
||||
void showAvsDialog(const QRect &geometry);
|
||||
void hideAvsDialog();
|
||||
void hideAndPauseAvsDialog();
|
||||
void showAndResumeAvsDialog();
|
||||
|
||||
static const QString ALL_STREAMS;
|
||||
const QString m_dialogId;
|
||||
AvaControl *m_avaControl;
|
||||
LtsMultiMonitor::FullscreenVideoDummyWidget *m_screenPlacementHelper{nullptr};
|
||||
boost::optional<QRect> m_presetGeometry;
|
||||
bool m_visible;
|
||||
};
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
Reference in new issue
Block a user