diff --git a/src/blackgui/showhidebar.cpp b/src/blackgui/showhidebar.cpp new file mode 100644 index 000000000..e369448ce --- /dev/null +++ b/src/blackgui/showhidebar.cpp @@ -0,0 +1,31 @@ +/* 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. + */ + +#include "showhidebar.h" +#include "ui_showhidebar.h" + +namespace BlackGui +{ + + CShowHideBar::CShowHideBar(QWidget *parent) : + QFrame(parent), + ui(new Ui::CShowHideBar) + { + ui->setupUi(this); + connect(this->ui->pb_ShowHidePushButton, &QPushButton::clicked, this, &CShowHideBar::toggleShowHide); + } + + CShowHideBar::~CShowHideBar() + { } + + bool CShowHideBar::isShown() const + { + return this->ui->pb_ShowHidePushButton->isChecked(); + } +} // namespacee diff --git a/src/blackgui/showhidebar.h b/src/blackgui/showhidebar.h new file mode 100644 index 000000000..0d619d0aa --- /dev/null +++ b/src/blackgui/showhidebar.h @@ -0,0 +1,45 @@ +/* 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_SHOWHIDEBAR_H +#define BLACKGUI_SHOWHIDEBAR_H + +#include + +namespace Ui { class CShowHideBar; } + +namespace BlackGui +{ + //! Show or hide another section + class CShowHideBar : public QFrame + { + Q_OBJECT + + public: + //! Constructor + explicit CShowHideBar(QWidget *parent = nullptr); + + //! Destructor + ~CShowHideBar(); + + //! Is shown? + bool isShown() const; + + signals: + //! Show or hide cockpit details + void toggleShowHide(bool show); + + private: + QScopedPointer ui; + }; + +} // namespace +#endif // guard diff --git a/src/blackgui/showhidebar.ui b/src/blackgui/showhidebar.ui new file mode 100644 index 000000000..40eddb540 --- /dev/null +++ b/src/blackgui/showhidebar.ui @@ -0,0 +1,89 @@ + + + CShowHideBar + + + + 0 + 0 + 314 + 12 + + + + + 0 + 0 + + + + show / hide + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 16777215 + 10 + + + + show / hide + + + + + + + :/own/icons/own/arrowWide300x10down.png + :/own/icons/own/arrowWide300x10up.png:/own/icons/own/arrowWide300x10down.png + + + + 300 + 10 + + + + true + + + true + + + + + + + + + +