mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 05:05:38 +08:00
refs #335, preparation for new cockpit
* allow nested info areas * added cockpit info area * fixed several finder methods to excluded nested info areas from child elements * using QScopedPointer for ui * placeholder GUI components for new cockpit
This commit is contained in:
committed by
Roland Winklmeier
parent
b0f01a3ec6
commit
9452ff10c9
54
src/blackgui/components/cockpitinfoareacomponent.h
Normal file
54
src/blackgui/components/cockpitinfoareacomponent.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_COCKPITINFOAREACOMPONENT_H
|
||||
#define BLACKGUI_COCKPITINFOAREACOMPONENT_H
|
||||
|
||||
#include "../infoarea.h"
|
||||
#include <QMainWindow>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CCockpitInfoAreaComponent; }
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
//! The cockpit itself is part of the main info area, but itself also an info area.
|
||||
//! hence windows can be docked in the cockpit too.
|
||||
class CCockpitInfoAreaComponent : public CInfoArea
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Destructor
|
||||
explicit CCockpitInfoAreaComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CCockpitInfoAreaComponent();
|
||||
|
||||
public slots:
|
||||
//! CInfoArea::toggleFloating
|
||||
virtual void toggleFloating() override;
|
||||
|
||||
protected:
|
||||
//! \copydoc CInfoArea::getPreferredSizeWhenFloating
|
||||
virtual QSize getPreferredSizeWhenFloating(int areaIndex) const override;
|
||||
|
||||
//! \copydoc CInfoArea::indexToPixmap
|
||||
virtual const QPixmap &indexToPixmap(int areaIndex) const override;
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CCockpitInfoAreaComponent> ui;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user