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
qmargins.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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#include "qmargins.h"
5#include "qdatastream.h"
6
7#include <private/qdebug_p.h>
8
10
32/*****************************************************************************
33 QMargins member functions
34 *****************************************************************************/
35
386/*****************************************************************************
387 QMargins stream functions
388 *****************************************************************************/
389#ifndef QT_NO_DATASTREAM
401{
402 s << m.left() << m.top() << m.right() << m.bottom();
403 return s;
404}
405
417{
418 int left, top, right, bottom;
419 s >> left; m.setLeft(left);
420 s >> top; m.setTop(top);
421 s >> right; m.setRight(right);
422 s >> bottom; m.setBottom(bottom);
423 return s;
424}
425#endif // QT_NO_DATASTREAM
426
427#ifndef QT_NO_DEBUG_STREAM
429{
430 QDebugStateSaver saver(dbg);
431 dbg.nospace();
432 dbg << "QMargins" << '(';
434 dbg << ')';
435 return dbg;
436}
437#endif
438
460/*****************************************************************************
461 QMarginsF member functions
462 *****************************************************************************/
463
773/*****************************************************************************
774 QMarginsF stream functions
775 *****************************************************************************/
776#ifndef QT_NO_DATASTREAM
788{
789 s << double(m.left()) << double(m.top()) << double(m.right()) << double(m.bottom());
790 return s;
791}
792
804{
805 double left, top, right, bottom;
806 s >> left;
807 s >> top;
808 s >> right;
809 s >> bottom;
811 return s;
812}
813#endif // QT_NO_DATASTREAM
814
815#ifndef QT_NO_DEBUG_STREAM
817{
818 QDebugStateSaver saver(dbg);
819 dbg.nospace();
820 dbg << "QMarginsF" << '(';
822 dbg << ')';
823 return dbg;
824}
825#endif
826
\inmodule QtCore\reentrant
Definition qdatastream.h:46
\inmodule QtCore
\inmodule QtCore
\inmodule QtCore
Definition qmargins.h:270
\inmodule QtCore
Definition qmargins.h:24
Combined button and popup list for selecting options.
static void formatQMargins(QDebug &debug, const Margins &margins)
Definition qdebug_p.h:51
QDataStream & operator>>(QDataStream &s, QMargins &m)
Definition qmargins.cpp:416
QDataStream & operator<<(QDataStream &s, const QMargins &m)
Definition qmargins.cpp:400
const GLfloat * m
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint left
GLint GLint bottom
GLdouble s
[6]
Definition qopenglext.h:235
double qreal
Definition qtypes.h:187