Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlpreviewposition.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLPREVIEWPOSITION_H
5#define QQMLPREVIEWPOSITION_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qvector.h>
19#include <QtCore/qpoint.h>
20#include <QtCore/qurl.h>
21#include <QtCore/qtimer.h>
22#include <QtCore/qsettings.h>
23#include <QtCore/qrect.h>
24#include <QtCore/qdatastream.h>
25
27
28class QWindow;
29
31{
32public:
33 class ScreenData {
34 public:
38 };
49
52
53
57
58private:
60 QByteArray fromPositionToByteArray(const Position &position);
61 void readLastPositionFromByteArray(const QByteArray &array);
62 void saveWindowPosition();
63
64 bool m_hasPosition = false;
65 InitializeState m_initializeState = InitializePosition;
66 QSettings m_settings;
67 QString m_settingsKey;
68 QTimer m_savePositionTimer;
69 Position m_lastWindowPosition;
70 QVector<QWindow *> m_positionedWindows;
71
72 QVector<ScreenData> m_currentInitScreensData;
73};
74
76
77#endif // QQMLPREVIEWPOSITION_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore\reentrant
Definition qpoint.h:25
bool operator==(const QQmlPreviewPosition::ScreenData &other) const
void loadWindowPositionSettings(const QUrl &url)
void takePosition(QWindow *window, InitializeState state=PositionInitialized)
void initLastSavedWindowPosition(QWindow *window)
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsettings.h:30
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qtimer.h:20
\inmodule QtCore
Definition qurl.h:94
\inmodule QtGui
Definition qwindow.h:63
else opt state
[0]
Combined button and popup list for selecting options.
n void setPosition(void) \n\
GLenum array
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
QUrl url("example.com")
[constructor-url-reference]
QSharedPointer< T > other(t)
[5]
aWidget window() -> setWindowTitle("New Window Title")
[2]