QtBase  v6.3.1
controllerwidget.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2021 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the test suite of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
21 ** included in the packaging of this file. Please review the following
22 ** information to ensure the GNU General Public License requirements will
23 ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
24 **
25 ** $QT_END_LICENSE$
26 **
27 ****************************************************************************/
28 
29 #include "controllerwidget.h"
30 #include <controls.h>
31 
32 #include <QtWidgets>
33 #include <QWindow>
34 #include <QBackingStore>
35 #include <QPaintDevice>
36 #include <QPainter>
37 #include <QRandomGenerator>
38 #include <QResizeEvent>
39 
41 {
42  m_x->setMinimum(-2000);
43  m_x->setMaximum(2000);
44  connect(m_x, SIGNAL(valueChanged(int)), this, SLOT(spinBoxChanged()));
45  m_y->setMinimum(-2000);
46  m_y->setMaximum(2000);
47  connect(m_y, SIGNAL(valueChanged(int)), this, SLOT(spinBoxChanged()));
48  QHBoxLayout *l = new QHBoxLayout(this);
49  l->setSpacing(2);
50  l->addWidget(m_x);
51  l->addWidget(new QLabel(sep));
52  l->addWidget(m_y);
53 }
54 
55 void CoordinateControl::setCoordinates(int x, int y)
56 {
57  m_x->blockSignals(true);
58  m_y->blockSignals(true);
59  m_x->setValue(x);
60  m_y->setValue(y);
61  m_x->blockSignals(false);
62  m_y->blockSignals(false);
63 }
64 
65 QPair<int, int> CoordinateControl::coordinates() const
66 {
67  return QPair<int, int>(m_x->value(), m_y->value());
68 }
69 
70 void CoordinateControl::spinBoxChanged()
71 {
72  const int x = m_x->value();
73  const int y = m_y->value();
76 }
77 
79  : m_point(new CoordinateControl(QLatin1String("+")))
80  , m_size(new CoordinateControl(QLatin1String("x")))
81 {
82  QHBoxLayout *l = new QHBoxLayout(this);
83  l->setSpacing(0);
84  l->setMargin(ControlLayoutMargin);
85  connect(m_point, SIGNAL(pointValueChanged(QPoint)), this, SLOT(handleChanged()));
86  connect(m_point, SIGNAL(pointValueChanged(QPoint)), this, SIGNAL(positionChanged(QPoint)));
87  l->addWidget(m_point);
89  connect(m_size, SIGNAL(sizeValueChanged(QSize)), this, SLOT(handleChanged()));
90  connect(m_size, SIGNAL(sizeValueChanged(QSize)), this, SIGNAL(sizeChanged(QSize)));
91  l->addWidget(m_size);
92 }
93 
95 {
96  m_point->setPointValue(r.topLeft());
97  m_size->setSizeValue(r.size());
98 }
99 
101 {
102  return QRect(m_point->pointValue(), m_size->sizeValue());
103 }
104 
105 void RectControl::handleChanged()
106 {
108 }
109 
111  : m_layout(new QGridLayout(this))
112  , m_object(w)
113  , m_geometry(new RectControl)
114  , m_framePosition(new CoordinateControl(QLatin1String("x")))
115  , m_moveEventLabel(new QLabel(tr("Move events")))
116  , m_resizeEventLabel(new QLabel(tr("Resize events")))
117  , m_mouseEventLabel(new QLabel(tr("Mouse events")))
118  , m_moveCount(0)
119  , m_resizeCount(0)
120 {
122  m_geometry->setTitle(tr("Geometry"));
123  int row = 0;
124  m_layout->addWidget(m_geometry, row, 0, 1, 2);
125  m_layout->setMargin(ControlLayoutMargin);
126  QGroupBox *frameGB = new QGroupBox(tr("Frame"));
127  QVBoxLayout *frameL = new QVBoxLayout(frameGB);
128  frameL->setSpacing(0);
129  frameL->setMargin(ControlLayoutMargin);
130  frameL->addWidget(m_framePosition);
131  m_layout->addWidget(frameGB, row, 2);
132 
133  QGroupBox *eventGroupBox = new QGroupBox(tr("Events"));
134  QVBoxLayout *l = new QVBoxLayout(eventGroupBox);
135  l->setSpacing(0);
136  l->setMargin(ControlLayoutMargin);
137  l->addWidget(m_moveEventLabel);
138  l->addWidget(m_resizeEventLabel);
139  l->addWidget(m_mouseEventLabel);
140  m_layout->addWidget(eventGroupBox, ++row, 2);
141 
142  connect(m_geometry, SIGNAL(positionChanged(QPoint)), this, SLOT(posChanged(QPoint)));
143  connect(m_geometry, SIGNAL(sizeChanged(QSize)), this, SLOT(sizeChanged(QSize)));
144  connect(m_framePosition, SIGNAL(pointValueChanged(QPoint)), this, SLOT(framePosChanged(QPoint)));
145 }
146 
148 {
149  switch (e->type()) {
150  case QEvent::Resize: {
151  const QResizeEvent *re = static_cast<const QResizeEvent *>(e);
152  m_resizeEventLabel->setText(tr("Resize %1x%2 (#%3)")
153  .arg(re->size().width()).arg(re->size().height())
154  .arg(++m_resizeCount));
155  refresh();
156  }
157  break;
158  case QEvent::Move: {
159  const QMoveEvent *me = static_cast<const QMoveEvent *>(e);
160  m_moveEventLabel->setText(tr("Move %1,%2 (#%3)")
161  .arg(me->pos().x()).arg(me->pos().y())
162  .arg(++m_moveCount));
163  refresh();
164  }
165  break;
166  case QEvent::MouseMove: {
167  const QMouseEvent *me = static_cast<const QMouseEvent *>(e);
168  const QPoint pos = me->pos();
169  QPoint globalPos = objectMapToGlobal(m_object, pos);
170  m_mouseEventLabel->setText(tr("Mouse: %1,%2 Global: %3,%4 ").
171  arg(pos.x()).arg(pos.y()).arg(globalPos.x()).arg(globalPos.y()));
172  }
173  break;
175  refresh();
176  default:
177  break;
178  }
179  return false;
180 }
181 
182 void BaseWindowControl::posChanged(const QPoint &p)
183 {
184  QRect geom = objectGeometry(m_object);
185  geom.moveTopLeft(p);
186  setObjectGeometry(m_object, geom);
187 }
188 
189 void BaseWindowControl::sizeChanged(const QSize &s)
190 {
191  QRect geom = objectGeometry(m_object);
192  geom.setSize(s);
193  setObjectGeometry(m_object, geom);
194 }
195 
196 void BaseWindowControl::framePosChanged(const QPoint &p)
197 {
198  setObjectFramePosition(m_object, p);
199 }
200 
202 {
203  m_geometry->setRectValue(objectGeometry(m_object));
204  m_framePosition->setPointValue(objectFramePosition(m_object));
205 }
206 
207 // A control for a QWidget
209 {
210  Q_OBJECT
211 public:
212  explicit WidgetWindowControl(QWidget *w);
213 
214  virtual void refresh();
215 
216 private slots:
217  void statesChanged();
218 
219 private:
220  virtual QRect objectGeometry(const QObject *o) const
221  { return static_cast<const QWidget *>(o)->geometry(); }
222  virtual void setObjectGeometry(QObject *o, const QRect &r) const
223  { static_cast<QWidget *>(o)->setGeometry(r); }
224  virtual QPoint objectFramePosition(const QObject *o) const
225  { return static_cast<const QWidget *>(o)->pos(); }
226  virtual void setObjectFramePosition(QObject *o, const QPoint &p) const
227  { static_cast<QWidget *>(o)->move(p); }
228  virtual QPoint objectMapToGlobal(const QObject *o, const QPoint &p) const
229  { return static_cast<const QWidget *>(o)->mapToGlobal(p); }
230  virtual Qt::WindowFlags objectWindowFlags(const QObject *o) const
231  { return static_cast<const QWidget *>(o)->windowFlags(); }
232  virtual void setObjectWindowFlags(QObject *o, Qt::WindowFlags f);
233 
234  WindowStatesControl *m_statesControl;
235 };
236 
239  , m_statesControl(new WindowStatesControl)
240 {
241  setTitle(w->windowTitle());
242  m_layout->addWidget(m_statesControl, 2, 0);
243  connect(m_statesControl, SIGNAL(changed()), this, SLOT(statesChanged()));
244 }
245 
246 void WidgetWindowControl::setObjectWindowFlags(QObject *o, Qt::WindowFlags f)
247 {
248  QWidget *w = static_cast<QWidget *>(o);
249  const bool visible = w->isVisible();
250  w->setWindowFlags(f); // hides.
251  if (visible)
252  w->show();
253 }
254 
256 {
257  const QWidget *w = static_cast<const QWidget *>(m_object);
258  m_statesControl->setVisibleValue(w->isVisible());
259  m_statesControl->setStates(w->windowState());
261 }
262 
263 void WidgetWindowControl::statesChanged()
264 {
265  QWidget *w = static_cast<QWidget *>(m_object);
266  w->setVisible(m_statesControl->visibleValue());
267  w->setWindowState(m_statesControl->states());
268 }
269 
270 // Test window drawing diagonal lines
271 class Window : public QWindow
272 {
273 public:
274  explicit Window(QWindow *parent = nullptr)
275  : QWindow(parent)
276  , m_backingStore(new QBackingStore(this))
277  , m_color(Qt::GlobalColor(QRandomGenerator::global()->bounded(18)))
278  {
279  setObjectName(QStringLiteral("window"));
280  setTitle(tr("TestWindow"));
281  setProperty("_q_platform_MacUseNSWindow", QVariant(true));
282  }
283 
284 protected:
289  { render(); }
290 
291 private:
292  QBackingStore *m_backingStore;
293  Qt::GlobalColor m_color;
294  QPoint m_mouseDownPosition;
295  void render();
296 };
297 
299 {
300  if (m_mouseDownPosition.isNull())
301  return;
302 
303  QPoint delta = ev->pos() - m_mouseDownPosition;
304  QPoint newPosition = position() + delta;
305  setPosition(newPosition);
306 // qDebug() << "diff" << delta << newPosition;
307 }
308 
310 {
311  m_mouseDownPosition = ev->pos();
312 }
313 
315 {
316  m_mouseDownPosition = QPoint();
317 }
318 
319 void Window::render()
320 {
321  QRect rect(QPoint(), geometry().size());
322  m_backingStore->resize(rect.size());
323  m_backingStore->beginPaint(rect);
324  if (!rect.size().isEmpty()) {
325  QPaintDevice *device = m_backingStore->paintDevice();
326  QPainter p(device);
327  p.fillRect(rect, m_color);
328  p.drawLine(0, 0, rect.width(), rect.height());
329  p.drawLine(0, rect.height(), rect.width(), 0);
330  }
331  m_backingStore->endPaint();
332  m_backingStore->flush(rect);
333 }
334 
335 // A control for a QWindow
337 {
338  Q_OBJECT
339 public:
340  explicit WindowControl(QWindow *w);
341 
342  virtual void refresh();
343 
344 private slots:
345  void showWindow();
346  void hideWindow();
347  void raiseWindow();
348  void lowerWindow();
349  void toggleAttachWindow();
350  void addChildWindow();
351 private:
352  virtual QRect objectGeometry(const QObject *o) const
353  { return static_cast<const QWindow *>(o)->geometry(); }
354  virtual void setObjectGeometry(QObject *o, const QRect &r) const
355  { static_cast<QWindow *>(o)->setGeometry(r); }
356  virtual QPoint objectFramePosition(const QObject *o) const
357  { return static_cast<const QWindow *>(o)->framePosition(); }
358  virtual void setObjectFramePosition(QObject *o, const QPoint &p) const
359  { static_cast<QWindow *>(o)->setFramePosition(p); }
360  virtual QPoint objectMapToGlobal(const QObject *o, const QPoint &p) const
361  { return static_cast<const QWindow *>(o)->mapToGlobal(p); }
362  virtual void setObjectWindowFlags(QObject *o, Qt::WindowFlags f)
363  { static_cast<QWindow *>(o)->setFlags(f); }
364 
365  WindowStatesControl *m_statesControl;
366  QWindow *m_window;
367  QWindow *m_detachedParent; // set when this window is detached. This is the window we should re-attach to.
368 };
369 
372  , m_statesControl(new WindowStatesControl)
373  , m_window(w)
374  , m_detachedParent(0)
375 {
376  setTitle(w->title());
377 
378  QPushButton *button = new QPushButton("Show Window");
379  connect(button, SIGNAL(clicked()), SLOT(showWindow()));
380  m_layout->addWidget(button, 1, 0);
381 
382  button = new QPushButton("hide Window");
383  connect(button, SIGNAL(clicked()), SLOT(hideWindow()));
384  m_layout->addWidget(button, 1, 1);
385 
386  button = new QPushButton("Rase Window");
387  connect(button, SIGNAL(clicked()), SLOT(raiseWindow()));
388  m_layout->addWidget(button, 2, 0);
389 
390  button = new QPushButton("Lower Window");
391  connect(button, SIGNAL(clicked()), SLOT(lowerWindow()));
392  m_layout->addWidget(button, 2, 1);
393 
394  button = new QPushButton("Toggle attach");
395  connect(button, SIGNAL(clicked()), SLOT(toggleAttachWindow()));
396  m_layout->addWidget(button, 3, 0);
397 
398  button = new QPushButton("Add Child Window");
399  connect(button, SIGNAL(clicked()), SLOT(addChildWindow()));
400  m_layout->addWidget(button, 3, 1);
401 }
402 
404 {
406 }
407 
408 void WindowControl::showWindow()
409 {
410  m_window->show();
411 }
412 
413 void WindowControl::hideWindow()
414 {
415  m_window->hide();
416 }
417 
418 void WindowControl::raiseWindow()
419 {
420  m_window->raise();
421 }
422 
423 void WindowControl::lowerWindow()
424 {
425  m_window->lower();
426 }
427 
428 void WindowControl::toggleAttachWindow()
429 {
430  if (m_detachedParent) {
431  m_window->hide();
432  m_window->setParent(m_detachedParent);
433  m_window->show();
434  m_detachedParent = 0;
435  } else {
436  m_detachedParent = m_window->parent();
437  m_window->hide();
438  m_window->setParent(0);
439  m_window->show();
440  }
441 }
442 
443 void WindowControl::addChildWindow()
444 {
445  qDebug() << "WindowControl::addChildWindow";
446  Window *childWindow = new Window(m_window);
447 
448  QRect childGeometry(50, 50, 40, 40);
449  childWindow->setGeometry(childGeometry);
450  WindowControl *control = new WindowControl(childWindow);
451  control->show();
452 }
453 
456  , m_testWindow(new Window)
457 {
458  QMenu *fileMenu = menuBar()->addMenu(tr("File"));
459  QAction *exitAction = fileMenu->addAction(tr("Exit"));
460  exitAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q));
461  connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
462 
463  QString title = QLatin1String("Child Window Geometry test, (Qt ");
464  title += QLatin1String(QT_VERSION_STR);
465  title += QLatin1String(", ");
466  title += qApp->platformName();
467  title += QLatin1Char(')');
469 
470  int x = 100;
471  int y = 100;
473  const int offsetArgIndex = args.indexOf(QLatin1String("-offset"));
474  if (offsetArgIndex >=0 && offsetArgIndex < args.size() - 1)
475  y += args.at(offsetArgIndex + 1).toInt();
476 
477  move(x, y);
478 
479  x += 800;
480 
481  x += 300;
485  m_testWindow->setFramePosition(QPoint(x, y));
486  m_testWindow->resize(200, 200);
487  m_testWindow->setTitle(tr("TestWindow"));
488 
489  QWidget *central = new QWidget ;
490  QVBoxLayout *l = new QVBoxLayout(central);
491 
492  const QString labelText = tr(
493  "<html><head/><body><p>This example lets you control the geometry"
494  " of QWindows and child QWindows");
495 
496  l->addWidget(new QLabel(labelText));
497 
498  WindowControl *windowControl = new WindowControl(m_testWindow.data());
499  l->addWidget(windowControl);
500 
501  setCentralWidget(central);
502 }
503 
505 {
506 
507 
508 }
509 
510 #include "controllerwidget.moc"
QGridLayout * m_layout
virtual void refresh()
virtual bool eventFilter(QObject *, QEvent *)
BaseWindowControl(QObject *w)
ControllerWidget(QWidget *parent=nullptr)
CoordinateControl(const QString &sep)
void sizeValueChanged(const QSize &s)
void pointValueChanged(const QPoint &p)
QPoint pointValue() const
QSize sizeValue() const
void setPointValue(const QPoint &p)
void setSizeValue(const QSize &s)
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition: qaction.h:65
The QBackingStore class provides a drawing area for QWindow.
Definition: qbackingstore.h:60
QPaintDevice * paintDevice()
void beginPaint(const QRegion &)
void flush(const QRegion &region, QWindow *window=nullptr, const QPoint &offset=QPoint())
void resize(const QSize &size)
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
void setSpacing(int spacing) override
Definition: qboxlayout.cpp:605
static QStringList arguments()
The QEvent class is the base class of all event classes. Event objects contain event parameters.
Definition: qcoreevent.h:58
@ WindowStateChange
Definition: qcoreevent.h:156
@ MouseMove
Definition: qcoreevent.h:76
@ Resize
Definition: qcoreevent.h:86
@ Move
Definition: qcoreevent.h:85
The QExposeEvent class contains event parameters for expose events. \inmodule QtGui.
Definition: qevent.h:574
QGraphicsObject * parent
the parent of the item
QRectF geometry
the geometry of the widget
QSizeF size
the size of the widget
The QGridLayout class lays out widgets in a grid.
Definition: qgridlayout.h:57
void addWidget(QWidget *w)
Definition: qgridlayout.h:100
The QGroupBox widget provides a group box frame with a title.
Definition: qgroupbox.h:53
QGroupBox(QWidget *parent=nullptr)
Definition: qgroupbox.cpp:180
void clicked(bool checked=false)
void setTitle(const QString &title)
Definition: qgroupbox.cpp:223
The QHBoxLayout class lines up widgets horizontally.
Definition: qboxlayout.h:114
The QKeySequence class encapsulates a key sequence as used by shortcuts.
Definition: qkeysequence.h:71
The QLabel widget provides a text or image display.
Definition: qlabel.h:56
void setText(const QString &)
Definition: qlabel.cpp:297
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
Definition: qstring.h:84
The QMainWindow class provides a main application window.\inmodule QtWidgets.
Definition: qmainwindow.h:61
void setCentralWidget(QWidget *widget)
QAction * addMenu(QMenu *menu)
Definition: qmenubar.cpp:789
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.
Definition: qmenu.h:62
void addAction(QAction *action)
Definition: qwidget.cpp:3129
The QMouseEvent class contains parameters that describe a mouse event.
Definition: qevent.h:231
QPoint pos() const
Definition: qevent.h:254
The QMoveEvent class contains event parameters for move events. \inmodule QtGui.
Definition: qevent.h:558
const QPoint & pos() const
Definition: qevent.h:566
The QObject class is the base class of all Qt objects.
Definition: qobject.h:125
void installEventFilter(QObject *filterObj)
Definition: qobject.cpp:2235
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Definition: qobject.cpp:2772
friend class QWidget
Definition: qobject.h:445
bool blockSignals(bool b) noexcept
Definition: qobject.cpp:1514
void setObjectName(const QString &name)
Definition: qobject.cpp:1261
bool setProperty(const char *name, const QVariant &value)
Definition: qobject.cpp:4063
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:82
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:52
constexpr bool isNull() const noexcept
Definition: qpoint.h:150
constexpr int x() const noexcept
Definition: qpoint.h:155
constexpr int y() const noexcept
Definition: qpoint.h:160
The QPushButton widget provides a command button.
Definition: qpushbutton.h:56
The QRandomGenerator class allows one to obtain random values from a high-quality Random Number Gener...
Definition: qrandom.h:57
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:59
constexpr void moveTopLeft(const QPoint &p) noexcept
Definition: qrect.h:331
constexpr int height() const noexcept
Definition: qrect.h:266
constexpr void setSize(const QSize &s) noexcept
Definition: qrect.h:414
constexpr QSize size() const noexcept
Definition: qrect.h:269
constexpr int width() const noexcept
Definition: qrect.h:263
The QResizeEvent class contains event parameters for resize events. \inmodule QtGui.
Definition: qevent.h:612
const QSize & size() const
Definition: qevent.h:620
T * data() const noexcept
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:55
constexpr int height() const noexcept
Definition: qsize.h:160
constexpr int width() const noexcept
Definition: qsize.h:157
constexpr bool isEmpty() const noexcept
Definition: qsize.h:151
@ MinimumExpanding
Definition: qsizepolicy.h:70
The QSpacerItem class provides blank space in a layout.
Definition: qlayoutitem.h:93
The QSpinBox class provides a spin box widget.
Definition: qspinbox.h:52
void setValue(int val)
Definition: qspinbox.cpp:229
void setMinimum(int min)
Definition: qspinbox.cpp:372
int value
the value of the spin box
Definition: qspinbox.h:62
void setMaximum(int max)
Definition: qspinbox.cpp:400
The QString class provides a Unicode character string.
Definition: qstring.h:388
The QStringList class provides a list of strings.
The QVBoxLayout class lines up widgets vertically.
Definition: qboxlayout.h:127
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:95
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:133
void setGeometry(int x, int y, int w, int h)
Definition: qwidget.h:919
Qt::WindowFlags windowFlags() const
Definition: qwidget.h:836
QPointF mapToGlobal(const QPointF &) const
QRect geometry
the geometry of the widget relative to its parent and excluding the window frame
Definition: qwidget.h:140
QPoint pos
the position of the widget within its parent widget
Definition: qwidget.h:145
void move(int x, int y)
Definition: qwidget.h:913
QRect rect
the internal geometry of the widget excluding any window frame
Definition: qwidget.h:150
void show()
Definition: qwidget.cpp:7825
virtual void setVisible(bool visible)
Definition: qwidget.cpp:8198
void setWindowTitle(const QString &)
Definition: qwidget.cpp:6119
bool visible
whether the widget is visible
Definition: qwidget.h:178
The QWindow class represents a window in the underlying windowing system.
Definition: qwindow.h:99
void show()
Definition: qwindow.cpp:2167
void hide()
Definition: qwindow.cpp:2185
void setTitle(const QString &)
Definition: qwindow.cpp:972
void raise()
Definition: qwindow.cpp:1057
void lower()
Definition: qwindow.cpp:1072
void changed(const QRect &r)
void setRectValue(const QRect &r)
QRect rectValue() const
void positionChanged(const QPoint &s)
void sizeChanged(const QSize &s)
WidgetWindowControl(QWidget *w)
virtual void refresh()
WindowControl(QWindow *w)
[Window class definition]
Definition: window.h:64
void mousePressEvent(QMouseEvent *ev)
void mouseMoveEvent(QMouseEvent *ev)
void mousePressEvent(QMouseEvent *) override
Definition: window.cpp:107
void mouseReleaseEvent(QMouseEvent *e)
void mouseMoveEvent(QMouseEvent *) override
Definition: window.cpp:112
Window(QWindow *parent=nullptr)
void mouseReleaseEvent(QMouseEvent *) override
Definition: window.cpp:124
void exposeEvent(QExposeEvent *)
Qt::WindowStates states() const
Definition: controls.cpp:218
void setVisibleValue(bool)
Definition: controls.cpp:237
bool visibleValue() const
Definition: controls.cpp:232
void setStates(Qt::WindowStates s)
Definition: controls.cpp:226
QPushButton
[1]
@ ControlLayoutMargin
Definition: controls.h:40
#define this
Definition: dialogs.cpp:56
QPushButton * button
[2]
double e
QHighDpiScaling::Point position(T, QHighDpiScaling::Point::Kind)
Definition: qnamespace.h:55
@ CTRL
Definition: qnamespace.h:1096
GlobalColor
Definition: qnamespace.h:58
@ Key_Q
Definition: qnamespace.h:588
@ Window
Definition: qnamespace.h:232
@ WindowFullscreenButtonHint
Definition: qnamespace.h:270
@ WindowMaximizeButtonHint
Definition: qnamespace.h:254
@ WindowMinimizeButtonHint
Definition: qnamespace.h:253
@ WindowTitleHint
Definition: qnamespace.h:251
@ WindowSystemMenuHint
Definition: qnamespace.h:252
@ WindowCloseButtonHint
Definition: qnamespace.h:266
std::pair< T1, T2 > QPair
Definition: qcontainerfwd.h:56
#define qApp
#define qDebug
[1]
Definition: qlogging.h:177
#define SLOT(a)
Definition: qobjectdefs.h:87
#define SIGNAL(a)
Definition: qobjectdefs.h:88
GLint GLint GLint GLint GLint x
[0]
GLboolean r
[2]
GLfloat GLfloat GLfloat w
[0]
GLfloat GLfloat f
GLint y
GLenum GLenum GLsizei void * row
Definition: qopenglext.h:2747
GLdouble s
[6]
Definition: qopenglext.h:235
GLfloat GLfloat p
[1]
Definition: qopenglext.h:12698
SSL_CTX int(*) void arg)
#define QStringLiteral(str)
#define tr(X)
#define Q_OBJECT
Definition: qtmetamacros.h:158
#define slots
Definition: qtmetamacros.h:76
#define emit
Definition: qtmetamacros.h:85
struct Window Window
Definition: sqlite3.c:14312
QString title
[35]
QMenuBar * menuBar
[0]
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:53
QWindow * m_window
Definition: main.mm:56
Global global
Definition: main.cpp:114
QAction * triggered
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent