refs #335, cockpit component:

* COM unit
* show / hide bar
* info area (nested)
This commit is contained in:
Klaus Basan
2014-10-16 17:07:42 +02:00
committed by Roland Winklmeier
parent fc4fb23b91
commit 7028bcf66a
3 changed files with 284 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
/* Copyright (C) 2013
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#ifndef BLACKGUI_COCKPITCOMPONENT_H
#define BLACKGUI_COCKPITCOMPONENT_H
#include "enablefordockwidgetinfoarea.h"
#include <QWidget>
#include <QScopedPointer>
namespace Ui { class CCockpitComponent; }
namespace BlackGui
{
namespace Components
{
//! Cockpit component: COM unit, show / hide bar, voice rooms
class CCockpitComponent :
public QWidget,
public CEnableForDockWidgetInfoArea
{
Q_OBJECT
public:
//! Constructor
explicit CCockpitComponent(QWidget *parent = nullptr);
//! Destructor
~CCockpitComponent();
//! \copydoc CDockWidgetInfoArea::setParentDockWidgetInfoArea
virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget) override;
//! Is the info area shown?
bool isInfoAreaShown() const;
private slots:
//! Show or hide cockpit details
void ps_onToggleShowHideDetails(bool show);
//! Toogle floating
void ps_onToggleFloating(bool floating);
private:
QScopedPointer<Ui::CCockpitComponent> ui;
QSize m_sizeFloatingShown; //! size when info area is shown
QSize m_sizeFloatingHidden; //! size when info area is hidden
};
} // namespace
} // namespace
#endif // guard