Ref T111, created aircraft parts form to be used in internals and dummy driver

This commit is contained in:
Klaus Basan
2017-08-05 00:46:50 +02:00
committed by Mathew Sutcliffe
parent 7939fd0184
commit eea6039d58
5 changed files with 559 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
#include <QByteArray>
#include <QPoint>
#include <QString>
#include <QWidget>
#include <QWidgetList>
#include <QModelIndexList>
@@ -26,7 +27,6 @@ class QComboBox;
class QLayout;
class QMimeData;
class QTabWidget;
class QWidget;
class QGraphicsOpacityEffect;
namespace BlackGui
@@ -86,6 +86,21 @@ namespace BlackGui
//! Pseudo readonly state for checkbox
static void checkBoxReadOnly(QCheckBox *checkBox, bool readOnly);
//! Pseudo readonly state for checkboxes of widget
static void checkBoxesReadOnly(QWidget *parent, bool readOnly);
//! Enable/disable all child widgets
template <class WIDGET>
static void childrenSetEnabled(QWidget *parent, bool enabled)
{
if (!parent) { return; }
QList<WIDGET *> children = parent->findChildren<WIDGET *>();
for (WIDGET *w : children)
{
w->setEnabled(enabled);
}
}
//! Toogle window flags / stay on top
static bool toggleStayOnTop(QWidget *widget);