LibreOffice Module vcl (master) 1
Classes | Macros | Typedefs | Functions | Variables
qt5/QtTools.hxx File Reference
#include <config_vclplug.h>
#include <QtCore/QPoint>
#include <QtCore/QRect>
#include <QtCore/QSize>
#include <QtCore/QString>
#include <QtGui/QImage>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include <tools/color.hxx>
#include <tools/gen.hxx>
#include <vcl/bitmap/BitmapTypes.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include <memory>
Include dependency graph for qt5/QtTools.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CairoDeleter
 

Macros

#define CHECK_QT5_USING_X11   (QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT5_USING_X11)
 
#define CHECK_QT6_USING_X11   (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT6_USING_X11)
 
#define CHECK_ANY_QT_USING_X11   CHECK_QT5_USING_X11 || CHECK_QT6_USING_X11
 

Typedefs

typedef struct _cairo_surface cairo_surface_t
 
typedef std::unique_ptr< cairo_surface_t, CairoDeleterUniqueCairoSurface
 

Functions

OUString toOUString (const QString &s)
 
QString toQString (const OUString &s)
 
QRect toQRect (const tools::Rectangle &rRect)
 
QRect toQRect (const tools::Rectangle &rRect, const qreal fScale)
 
QRect scaledQRect (const QRect &rRect, const qreal fScale)
 
tools::Rectangle toRectangle (const QRect &rRect)
 
QSize toQSize (const Size &rSize)
 
Size toSize (const QSize &rSize)
 
Point toPoint (const QPoint &rPoint)
 
QColor toQColor (const Color &rColor)
 
Qt::DropActions toQtDropActions (sal_Int8 dragOperation)
 
sal_Int8 toVclDropActions (Qt::DropActions dragOperation)
 
sal_Int8 toVclDropAction (Qt::DropAction dragOperation)
 
Qt::DropAction getPreferredDropAction (sal_Int8 dragOperation)
 
QList< inttoQList (const css::uno::Sequence< sal_Int32 > &aSequence)
 
QImage::Format getBitFormat (vcl::PixelFormat ePixelFormat)
 
sal_uInt16 getFormatBits (QImage::Format eFormat)
 
sal_uInt16 GetKeyModCode (Qt::KeyboardModifiers eKeyModifiers)
 
sal_uInt16 GetMouseModCode (Qt::MouseButtons eButtons)
 
QImage toQImage (const Image &rImage)
 
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< (std::basic_ostream< charT, traits > &stream, const QString &rString)
 
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< (std::basic_ostream< charT, traits > &stream, const QRect &rRect)
 
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< (std::basic_ostream< charT, traits > &stream, const QSize &rSize)
 
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< (std::basic_ostream< charT, traits > &stream, const QPoint &rPoint)
 

Variables

constexpr QImage::Format Qt_DefaultFormat32 = QImage::Format_ARGB32
 

Macro Definition Documentation

◆ CHECK_ANY_QT_USING_X11

#define CHECK_ANY_QT_USING_X11   CHECK_QT5_USING_X11 || CHECK_QT6_USING_X11

Definition at line 186 of file qt5/QtTools.hxx.

◆ CHECK_QT5_USING_X11

#define CHECK_QT5_USING_X11   (QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT5_USING_X11)

Definition at line 182 of file qt5/QtTools.hxx.

◆ CHECK_QT6_USING_X11

#define CHECK_QT6_USING_X11   (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT6_USING_X11)

Definition at line 184 of file qt5/QtTools.hxx.

Typedef Documentation

◆ cairo_surface_t

typedef struct _cairo_surface cairo_surface_t

Definition at line 141 of file qt5/QtTools.hxx.

◆ UniqueCairoSurface

typedef std::unique_ptr<cairo_surface_t, CairoDeleter> UniqueCairoSurface

Definition at line 147 of file qt5/QtTools.hxx.

Function Documentation

◆ getBitFormat()

QImage::Format getBitFormat ( vcl::PixelFormat  ePixelFormat)
inline

Definition at line 105 of file qt5/QtTools.hxx.

References vcl::N24_BPP, vcl::N32_BPP, vcl::N8_BPP, and Qt_DefaultFormat32.

◆ getFormatBits()

sal_uInt16 getFormatBits ( QImage::Format  eFormat)
inline

Definition at line 122 of file qt5/QtTools.hxx.

References Qt_DefaultFormat32.

◆ GetKeyModCode()

sal_uInt16 GetKeyModCode ( Qt::KeyboardModifiers  eKeyModifiers)

◆ GetMouseModCode()

sal_uInt16 GetMouseModCode ( Qt::MouseButtons  eButtons)

◆ getPreferredDropAction()

Qt::DropAction getPreferredDropAction ( sal_Int8  dragOperation)

◆ operator<<() [1/4]

template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< ( std::basic_ostream< charT, traits > &  stream,
const QPoint &  rPoint 
)
inline

Definition at line 152 of file qt5/QtTools.hxx.

◆ operator<<() [2/4]

template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< ( std::basic_ostream< charT, traits > &  stream,
const QRect &  rRect 
)
inline

Definition at line 152 of file qt5/QtTools.hxx.

◆ operator<<() [3/4]

template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< ( std::basic_ostream< charT, traits > &  stream,
const QSize &  rSize 
)
inline

Definition at line 152 of file qt5/QtTools.hxx.

◆ operator<<() [4/4]

template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< ( std::basic_ostream< charT, traits > &  stream,
const QString &  rString 
)
inline

Definition at line 152 of file qt5/QtTools.hxx.

References stream.

◆ scaledQRect()

QRect scaledQRect ( const QRect &  rRect,
const qreal  fScale 
)
inline

Definition at line 66 of file qt5/QtTools.hxx.

Referenced by QtPainter::update().

◆ toOUString()

OUString toOUString ( const QString &  s)
inline

Definition at line 44 of file qt5/QtTools.hxx.

◆ toPoint()

Point toPoint ( const QPoint &  rPoint)
inline

Definition at line 81 of file qt5/QtTools.hxx.

◆ toQColor()

QColor toQColor ( const Color rColor)
inline

◆ toQImage()

QImage toQImage ( const Image rImage)

◆ toQList()

QList< int > toQList ( const css::uno::Sequence< sal_Int32 > &  aSequence)
inline

Definition at line 93 of file qt5/QtTools.hxx.

References i.

◆ toQRect() [1/2]

QRect toQRect ( const tools::Rectangle rRect)
inline

◆ toQRect() [2/2]

QRect toQRect ( const tools::Rectangle rRect,
const qreal  fScale 
)
inline

◆ toQSize()

QSize toQSize ( const Size rSize)
inline

Definition at line 77 of file qt5/QtTools.hxx.

References Size::Height(), and Size::Width().

◆ toQString()

QString toQString ( const OUString &  s)
inline

Definition at line 50 of file qt5/QtTools.hxx.

◆ toQtDropActions()

Qt::DropActions toQtDropActions ( sal_Int8  dragOperation)

◆ toRectangle()

tools::Rectangle toRectangle ( const QRect &  rRect)
inline

Definition at line 72 of file qt5/QtTools.hxx.

◆ toSize()

Size toSize ( const QSize &  rSize)
inline

Definition at line 79 of file qt5/QtTools.hxx.

◆ toVclDropAction()

sal_Int8 toVclDropAction ( Qt::DropAction  dragOperation)

◆ toVclDropActions()

sal_Int8 toVclDropActions ( Qt::DropActions  dragOperation)

Variable Documentation

◆ Qt_DefaultFormat32

constexpr QImage::Format Qt_DefaultFormat32 = QImage::Format_ARGB32
constexpr

Definition at line 103 of file qt5/QtTools.hxx.

Referenced by getBitFormat(), and getFormatBits().