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)
 
QSize scaledQSize (const QSize &rSize, 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 193 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 189 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 191 of file qt5/QtTools.hxx.

Typedef Documentation

◆ cairo_surface_t

typedef struct _cairo_surface cairo_surface_t

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

◆ UniqueCairoSurface

typedef std::unique_ptr<cairo_surface_t, CairoDeleter> UniqueCairoSurface

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

Function Documentation

◆ getBitFormat()

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

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

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

◆ getFormatBits()

sal_uInt16 getFormatBits ( QImage::Format  eFormat)
inline

Definition at line 129 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 159 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 159 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 159 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 159 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.

◆ scaledQSize()

QSize scaledQSize ( const QSize &  rSize,
const qreal  fScale 
)
inline

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

◆ 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 86 of file qt5/QtTools.hxx.

References Point.

◆ 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 98 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 82 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 77 of file qt5/QtTools.hxx.

◆ toSize()

Size toSize ( const QSize &  rSize)
inline

Definition at line 84 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 108 of file qt5/QtTools.hxx.

Referenced by getBitFormat(), and getFormatBits().