20 #ifndef __QMLDOCKWIDGET_H__ 21 #define __QMLDOCKWIDGET_H__ 56 QWidget* prevFocusWidget =
nullptr;
58 static void registerQmlTypes();
62 void transferFocus(
bool forward);
63 void onStatusChanged(QQuickView::Status);
66 MsQuickView(
const QUrl& source, QWindow* parent =
nullptr);
68 : QQuickView(engine, parent) { init(); }
70 : QQuickView(parent) { init(); }
73 void keyPressEvent(QKeyEvent* e)
override;
89 bool _shadowOverlay =
false;
91 #define COLOR_PROPERTY(name, role) \ 92 Q_PROPERTY(QColor name READ get_##name CONSTANT) \ 93 QColor get_##name() const { return _palette.color(role); } 112 #undef COLOR_PROPERTY 114 #define COLOR_PROPERTY_EXPR(name, expr) \ 115 Q_PROPERTY(QColor name READ get_##name CONSTANT) \ 116 QColor get_##name() const { return expr; } 123 #undef COLOR_PROPERTY_EXPR 125 Q_PROPERTY(QFont font READ font CONSTANT)
126 Q_PROPERTY(
bool shadowOverlay READ shadowOverlay NOTIFY shadowOverlayChanged)
128 QFont font()
const {
return _font; }
131 void shadowOverlayChanged();
134 QmlStyle(QPalette, QObject* parent =
nullptr);
137 void setShadowOverlay(
bool);
148 QQuickView* _view =
nullptr;
152 QQuickView* getView();
159 QmlDockWidget(QQmlEngine* e =
nullptr, QWidget* parent =
nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
160 QmlDockWidget(QQmlEngine* e,
const QString& title, QWidget* parent =
nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
162 static QString qmlSourcePrefix();
163 void setSource(
const QUrl& url);
169 const QQuickView*
view()
const {
return _view; }
171 void changeEvent(QEvent* evt)
override;
172 void resizeEvent(QResizeEvent* evt)
override;
174 void ensureQmlViewFocused();
QFont _font
Definition: qmldockwidget.h:88
Definition: qmldockwidget.h:35
bool useSourceQmlFiles
Definition: qmldockwidget.cpp:31
Definition: qmldockwidget.h:52
void requestFocusTransfer(bool forward)
void setShadowOverlay(bool)
Definition: qmldockwidget.cpp:169
QPalette _palette
Definition: qmldockwidget.h:87
MsQuickView(QQmlEngine *engine, QWindow *parent)
Definition: qmldockwidget.h:67
Definition: aeolus.cpp:26
static QColor selectColor[VOICES]
Definition: mscore.h:327
Implements setting colors and fonts for QML-based widgets styling.
Definition: qmldockwidget.h:83
MsQuickView(QWindow *parent=nullptr)
Definition: qmldockwidget.h:69
FocusChainBreak(QQuickItem *parent=nullptr)
Definition: qmldockwidget.cpp:38
void focusInEvent(QFocusEvent *) override
Definition: qmldockwidget.cpp:49
bool shadowOverlay() const
Definition: qmldockwidget.h:136