56 using Core::View::close;
57 using Core::View::height;
58 using Core::View::rect;
59 using Core::View::resize;
60 using Core::View::width;
67 QSize minSize()
const override;
68 QSize maxSizeHint()
const override;
69 QRect geometry()
const override;
70 QRect normalGeometry()
const override;
71 void setNormalGeometry(
QRect geo);
72 void setGeometry(
QRect)
override;
73 void setMaximumSize(
QSize sz)
override;
75 bool isVisible()
const override;
76 bool isExplicitlyHidden()
const override;
77 void setVisible(
bool is)
override;
79 void move(
int x,
int y)
override;
80 void setSize(
int w,
int h)
override final;
82 void setWidth(
int w)
override;
83 void setHeight(
int h)
override;
84 void setFixedWidth(
int w)
override;
85 void setFixedHeight(
int h)
override;
88 void updateGeometry();
89 void update()
override;
91 void setParent(QQuickItem *parent);
92 static void raiseAndActivate(QQuickItem *);
93 void raiseAndActivate()
override;
94 void activateWindow()
override;
95 void raise()
override;
96 static bool isRootView(
const QQuickItem *);
97 bool isRootView() const override final;
98 QQuickView *quickView() const;
102 void setWindowOpacity(
double v) override;
104 static
bool close(QQuickItem *);
105 bool close() override;
106 void setFlag(
Qt::WindowType f,
bool on = true) override;
107 void enableAttribute(
Qt::WidgetAttribute attr,
bool enable = true) override;
108 bool hasAttribute(
Qt::WidgetAttribute attr) const override;
109 Qt::WindowFlags flags() const override;
111 void setWindowTitle(const
QString &title) override;
112 void setWindowIcon(const
QIcon &icon) override;
113 bool isActiveWindow() const override;
115 Q_INVOKABLE
void redirectMouseEvents(QQuickItem *from);
116 Q_INVOKABLE
void showNormal() override;
117 Q_INVOKABLE
void showMinimized() override;
118 Q_INVOKABLE
void showMaximized() override;
120 bool isMinimized() const override;
121 bool isMaximized() const override;
123 std::shared_ptr<Core::Window> window() const override;
124 std::shared_ptr<Core::
View> childViewAt(
QPoint p) const override;
125 std::shared_ptr<Core::
View> rootView() const override;
126 std::shared_ptr<Core::
View> parentView() const override;
128 std::shared_ptr<Core::
View> asWrapper() override;
130 void grabMouse() override;
131 void releaseMouse() override;
132 void releaseKeyboard() override;
133 void setFocus(
Qt::FocusReason reason) override;
134 Qt::FocusPolicy focusPolicy() const override;
135 bool hasFocus() const override;
136 void setFocusPolicy(
Qt::FocusPolicy) override;
137 QString viewName() const override;
138 void setMinimumSize(
QSize sz) override;
140 void setCursor(
Qt::CursorShape shape) override;
141 void setMouseTracking(
bool enable) override;
143 void setZOrder(
int) override;
144 virtual QQuickItem *visualItem() const;
149 static
void makeItemFillParent(QQuickItem *item);
152 static QQuickItem *createItem(QQmlEngine *engine, const
QString &filename, QQmlContext *context =
nullptr);
156 static QQuickItem *createItem(const
QString &filename, QQuickItem *parent, QQmlContext *ctx =
nullptr);
158 static
std::shared_ptr<Core::
View> parentViewFor(const QQuickItem *);
159 static
std::shared_ptr<Core::
View> asQQuickWrapper(QQuickItem *item);
162 void geometryUpdated();
163 void itemGeometryChanged();
167 void QQUICKITEMgeometryChanged(const
QRectF &newGeometry, const
QRectF &oldGeometry) override;
168 void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) override;
170 bool event(
QEvent *) override;
179 friend class MouseEventRedirector;
180 void updateNormalGeometry();
181 void sendVisibleChangeEvent();
182 void _setSize(
QSize);
183 bool m_inSetParent = false;
184 Qt::WindowFlags m_windowFlags;
185 int m_widgetAttributes = 0;
186 Qt::FocusPolicy m_focusPolicy =
Qt::NoFocus;
187 bool m_mouseTrackingEnabled = false;
188 QRect m_normalGeometry;
190 MouseEventRedirector *m_mouseEventRedirector =
nullptr;