Ref T384, trigger (show) overlay text messages

This commit is contained in:
Klaus Basan
2018-10-03 02:09:19 +02:00
parent b3c6e22346
commit 792d2ced30
7 changed files with 73 additions and 10 deletions

View File

@@ -12,12 +12,13 @@
#ifndef BLACKGUI_COMPONENTS_COCKPITCOMPONENT_H
#define BLACKGUI_COMPONENTS_COCKPITCOMPONENT_H
#include "blackgui/blackguiexport.h"
#include "blackgui/components/enablefordockwidgetinfoarea.h"
#include "blackgui/overlaymessagesframe.h"
#include "blackgui/blackguiexport.h"
#include <QObject>
#include <QScopedPointer>
#include <QSize>
#include <QWidget>
namespace Ui { class CCockpitComponent; }
namespace BlackGui
@@ -28,7 +29,8 @@ namespace BlackGui
{
//! Cockpit component: COM unit, show / hide bar, voice rooms
class BLACKGUI_EXPORT CCockpitComponent :
public QWidget,
// making a widget overlay and dock widget is semi-optimal but a special case here because of text messages
public COverlayMessagesFrame,
public CEnableForDockWidgetInfoArea
{
Q_OBJECT
@@ -53,6 +55,10 @@ namespace BlackGui
//! Show the audio UI
void showAudio();
protected:
//! \copydoc QWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
private:
//! Show or hide cockpit details
void onToggleShowHideDetails(bool show);
@@ -60,9 +66,14 @@ namespace BlackGui
//! Toggle floating
void onToggleFloating(bool floating);
// toggle area on show/hide details
//! Toggle area on show/hide details
void toggleShowHideDetails(bool show, bool considerCurrentSize);
//! Request text message COM1 @{
void onRequestTextMessageCom1();
void onRequestTextMessageCom2();
//! @}
QScopedPointer<Ui::CCockpitComponent> ui;
QSize m_sizeFloatingShown; //! size when info area is shown
QSize m_sizeFloatingHidden; //! size when info area is hidden