labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

macros.h File Reference
#include <KSharedConfig>
#include <KConfigGroup>
#include <QApplication>
#include <QMetaEnum>
#include <iostream>
#include <QDebug>
#include <iomanip>
Include dependency graph for macros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WARN(x)   std::cout << x << std::endl;
 
#define QDEBUG(x)   qDebug() << x;
 
#define DEBUG(x)   std::cout << x << std::endl;
 
#define WAIT_CURSOR   QApplication::setOverrideCursor(QCursor(Qt::WaitCursor))
 
#define RESET_CURSOR   QApplication::restoreOverrideCursor()
 
#define UTF8_QSTRING(str)   QString::fromUtf8(str)
 
#define STDSTRING(qstr)   qstr.toUtf8().constData()
 
#define ENUM_TO_STRING(class, enum, value)    (class::staticMetaObject.enumerator(class::staticMetaObject.indexOfEnumerator(#enum)).valueToKey(static_cast<int>(value)))
 
#define ENUM_COUNT(class, enum)    (class::staticMetaObject.enumerator(class::staticMetaObject.indexOfEnumerator(#enum)).keyCount())
 
#define SET_NUMBER_LOCALE
 
#define SET_INT_FROM_LE(var, le)
 
#define SET_DOUBLE_FROM_LE(var, le)
 
#define BASIC_ACCESSOR(type, var, method, Method)
 
#define CLASS_ACCESSOR(type, var, method, Method)
 
#define BASIC_D_ACCESSOR_DECL(type, method, Method)
 
#define BASIC_D_ACCESSOR_IMPL(classname, type, method, Method, var)
 
#define BASIC_D_READER_IMPL(classname, type, method, var)
 
#define BASIC_SHARED_D_READER_IMPL(classname, type, method, var)
 
#define CLASS_D_ACCESSOR_DECL(type, method, Method)
 
#define CLASS_D_ACCESSOR_IMPL(classname, type, method, Method, var)
 
#define CLASS_D_READER_IMPL(classname, type, method, var)
 
#define CLASS_SHARED_D_READER_IMPL(classname, type, method, var)
 
#define POINTER_D_ACCESSOR_DECL(type, method, Method)
 
#define FLAG_D_ACCESSOR_DECL(Method)
 
#define FLAG_D_ACCESSOR_IMPL(classname, Method, var)
 
#define STD_SETTER_CMD_IMPL(class_name, cmd_name, value_type, field_name)
 
#define STD_SETTER_CMD_IMPL_F(class_name, cmd_name, value_type, field_name, finalize_method)
 
#define STD_SETTER_CMD_IMPL_S(class_name, cmd_name, value_type, field_name)
 
#define STD_SETTER_CMD_IMPL_F_S(class_name, cmd_name, value_type, field_name, finalize_method)
 
#define STD_SETTER_CMD_IMPL_M_F_S(class_name, cmd_name, value_type, field_name, finalize_method)
 
#define STD_SETTER_CMD_IMPL_I(class_name, cmd_name, value_type, field_name, init_method)
 
#define STD_SETTER_CMD_IMPL_IF(class_name, cmd_name, value_type, field_name, init_method, finalize_method)
 
#define STD_SWAP_METHOD_SETTER_CMD_IMPL(class_name, cmd_name, value_type, method_name)
 
#define STD_SWAP_METHOD_SETTER_CMD_IMPL_F(class_name, cmd_name, value_type, method_name, finalize_method)
 
#define STD_SWAP_METHOD_SETTER_CMD_IMPL_I(class_name, cmd_name, value_type, method_name, init_method)
 
#define STD_SWAP_METHOD_SETTER_CMD_IMPL_IF(class_name, cmd_name, value_type, method_name, init_method, finalize_method)
 
#define WRITE_QCOLOR(color)
 
#define READ_QCOLOR(color)
 
#define WRITE_QPEN(pen)
 
#define READ_QPEN(pen)
 
#define WRITE_QFONT(font)
 
#define READ_QFONT(font)
 
#define WRITE_QBRUSH(brush)
 
#define READ_QBRUSH(brush)
 
#define WRITE_COLUMN(column, columnName)
 
#define READ_COLUMN(columnName)
 
#define READ_INT_VALUE(name, var, type)
 
#define READ_DOUBLE_VALUE(name, var)
 
#define READ_STRING_VALUE(name, var)
 
#define RESTORE_COLUMN_POINTER(obj, col, Col)
 
#define WRITE_PATH(obj, name)
 
#define READ_PATH(name)
 
#define RESTORE_POINTER(obj, name, Name, Type, list)
 

Functions

template<class T >
constexpr std::add_const_t< T > & qAsConst (T &t) noexcept
 

Macro Definition Documentation

◆ BASIC_ACCESSOR

#define BASIC_ACCESSOR (   type,
  var,
  method,
  Method 
)
Value:
type method() const { return var; }; \
void set ## Method(const type value) { var = value; }

Definition at line 100 of file macros.h.

◆ BASIC_D_ACCESSOR_DECL

#define BASIC_D_ACCESSOR_DECL (   type,
  method,
  Method 
)
Value:
type method() const; \
void set ## Method(const type value);

Definition at line 107 of file macros.h.

◆ BASIC_D_ACCESSOR_IMPL

#define BASIC_D_ACCESSOR_IMPL (   classname,
  type,
  method,
  Method,
  var 
)
Value:
void classname::set ## Method(const type value) \
{ \
d->var = value; \
} \
type classname::method() const \
{ \
return d->var; \
}

Definition at line 111 of file macros.h.

◆ BASIC_D_READER_IMPL

#define BASIC_D_READER_IMPL (   classname,
  type,
  method,
  var 
)
Value:
type classname::method() const \
{ \
return d->var; \
}

Definition at line 121 of file macros.h.

◆ BASIC_SHARED_D_READER_IMPL

#define BASIC_SHARED_D_READER_IMPL (   classname,
  type,
  method,
  var 
)
Value:
type classname::method() const \
{ \
Q_D(const classname); \
return d->var; \
}

Definition at line 127 of file macros.h.

◆ CLASS_ACCESSOR

#define CLASS_ACCESSOR (   type,
  var,
  method,
  Method 
)
Value:
type method() const { return var; }; \
void set ## Method(const type & value) { var = value; }

Definition at line 103 of file macros.h.

◆ CLASS_D_ACCESSOR_DECL

#define CLASS_D_ACCESSOR_DECL (   type,
  method,
  Method 
)
Value:
type method() const; \
void set ## Method(const type & value);

Definition at line 134 of file macros.h.

◆ CLASS_D_ACCESSOR_IMPL

#define CLASS_D_ACCESSOR_IMPL (   classname,
  type,
  method,
  Method,
  var 
)
Value:
void classname::set ## Method(const type & value) \
{ \
d->var = value; \
} \
type classname::method() const \
{ \
return d->var; \
}

Definition at line 138 of file macros.h.

◆ CLASS_D_READER_IMPL

#define CLASS_D_READER_IMPL (   classname,
  type,
  method,
  var 
)
Value:
type classname::method() const \
{ \
return d->var; \
}

Definition at line 148 of file macros.h.

◆ CLASS_SHARED_D_READER_IMPL

#define CLASS_SHARED_D_READER_IMPL (   classname,
  type,
  method,
  var 
)
Value:
type classname::method() const \
{ \
Q_D(const classname); \
return d->var; \
}

Definition at line 154 of file macros.h.

◆ DEBUG

#define DEBUG (   x)    std::cout << x << std::endl;

Definition at line 50 of file macros.h.

◆ ENUM_COUNT

#define ENUM_COUNT (   class,
  enum 
)     (class::staticMetaObject.enumerator(class::staticMetaObject.indexOfEnumerator(#enum)).keyCount())

Definition at line 71 of file macros.h.

◆ ENUM_TO_STRING

#define ENUM_TO_STRING (   class,
  enum,
  value 
)     (class::staticMetaObject.enumerator(class::staticMetaObject.indexOfEnumerator(#enum)).valueToKey(static_cast<int>(value)))

Definition at line 69 of file macros.h.

◆ FLAG_D_ACCESSOR_DECL

#define FLAG_D_ACCESSOR_DECL (   Method)
Value:
bool is ## Method() const; \
bool has ## Method() const; \
void set ## Method(const bool value = true); \
void enable ## Method(const bool value = true);

Definition at line 165 of file macros.h.

◆ FLAG_D_ACCESSOR_IMPL

#define FLAG_D_ACCESSOR_IMPL (   classname,
  Method,
  var 
)
Value:
void classname::set ## Method(const bool value) \
{ \
d->var = value; \
} \
void classname::enable ## Method(const bool value) \
{ \
d->var = value; \
} \
bool classname::is ## Method() const \
{ \
return d->var; \
} \
bool classname::has ## Method() const \
{ \
return d->var; \
}

Definition at line 171 of file macros.h.

◆ POINTER_D_ACCESSOR_DECL

#define POINTER_D_ACCESSOR_DECL (   type,
  method,
  Method 
)
Value:
type *method() const; \
void set ## Method(type *ptr);

Definition at line 161 of file macros.h.

◆ QDEBUG

#define QDEBUG (   x)    qDebug() << x;

Definition at line 47 of file macros.h.

◆ READ_COLUMN

#define READ_COLUMN (   columnName)
Value:
do { \
str = attribs.value(#columnName).toString(); \
d->columnName ##Path = str; \
} while(0)

Definition at line 462 of file macros.h.

◆ READ_DOUBLE_VALUE

#define READ_DOUBLE_VALUE (   name,
  var 
)
Value:
str = attribs.value(name).toString(); \
if (str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs(name).toString()); \
else \
d->var = str.toDouble();

Definition at line 475 of file macros.h.

◆ READ_INT_VALUE

#define READ_INT_VALUE (   name,
  var,
  type 
)
Value:
str = attribs.value(name).toString(); \
if (str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs(name).toString()); \
else \
d->var = (type)str.toInt();

Definition at line 468 of file macros.h.

◆ READ_PATH

#define READ_PATH (   name)
Value:
do { \
str = attribs.value(#name).toString(); \
d->name ##Path = str; \
} while(0)

Definition at line 514 of file macros.h.

◆ READ_QBRUSH

#define READ_QBRUSH (   brush)
Value:
do { \
str = attribs.value("brush_style").toString(); \
if(str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs("brush_style").toString()); \
else \
brush.setStyle( (Qt::BrushStyle)str.toInt() ); \
\
QColor color; \
str = attribs.value("brush_color_r").toString(); \
if(str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs("brush_color_r").toString()); \
else \
color.setRed( str.toInt() ); \
\
str = attribs.value("brush_color_g").toString(); \
if(str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs("brush_color_g").toString()); \
else \
color.setGreen( str.toInt() ); \
\
str = attribs.value("brush_color_b").toString(); \
if(str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs("brush_color_b").toString()); \
else \
color.setBlue( str.toInt() ); \
\
brush.setColor(color); \
} while(0)

Definition at line 418 of file macros.h.

◆ READ_QCOLOR

#define READ_QCOLOR (   color)
Value:
do { \
str = attribs.value("color_r").toString(); \
if(str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs("color_r").toString()); \
else \
color.setRed( str.toInt() ); \
\
str = attribs.value("color_g").toString(); \
if(str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs("color_g").toString()); \
else \
color.setGreen( str.toInt() ); \
\
str = attribs.value("color_b").toString(); \
if(str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs("color_b").toString()); \
else \
color.setBlue( str.toInt() ); \
} while(0)

Definition at line 293 of file macros.h.

◆ READ_QFONT

#define READ_QFONT (   font)

Definition at line 370 of file macros.h.

◆ READ_QPEN

#define READ_QPEN (   pen)

Definition at line 324 of file macros.h.

◆ READ_STRING_VALUE

#define READ_STRING_VALUE (   name,
  var 
)
Value:
str = attribs.value(name).toString(); \
if (str.isEmpty()) \
reader->raiseWarning(attributeWarning.subs(name).toString()); \
else \
d->var = str;

Definition at line 482 of file macros.h.

◆ RESET_CURSOR

#define RESET_CURSOR   QApplication::restoreOverrideCursor()

Definition at line 64 of file macros.h.

◆ RESTORE_COLUMN_POINTER

#define RESTORE_COLUMN_POINTER (   obj,
  col,
  Col 
)
Value:
do { \
if (!obj->col ##Path().isEmpty()) { \
for (Column* column : columns) { \
if (!column) continue; \
if (column->path() == obj->col ##Path()) { \
obj->set## Col(column); \
break; \
} \
} \
} \
} while(0)
Aspect that manages a column.
Definition: Column.h:42

Definition at line 490 of file macros.h.

◆ RESTORE_POINTER

#define RESTORE_POINTER (   obj,
  name,
  Name,
  Type,
  list 
)
Value:
do { \
if (!obj->name ##Path().isEmpty()) { \
for (AbstractAspect* aspect : list) { \
if (aspect->path() == obj->name ##Path()) { \
auto a = dynamic_cast<Type*>(aspect); \
if (!a) continue; \
obj->set## Name(a); \
break; \
} \
} \
} \
} while(0)
Base class of all persistent objects in a Project.

Definition at line 520 of file macros.h.

◆ SET_DOUBLE_FROM_LE

#define SET_DOUBLE_FROM_LE (   var,
  le 
)
Value:
{ \
bool ok; \
SET_NUMBER_LOCALE \
const double tmp = numberLocale.toDouble((le)->text(), &ok); \
if (ok) \
var = tmp; \
}

Definition at line 90 of file macros.h.

◆ SET_INT_FROM_LE

#define SET_INT_FROM_LE (   var,
  le 
)
Value:
{ \
bool ok; \
SET_NUMBER_LOCALE \
const int tmp = numberLocale.toInt((le)->text(), &ok); \
if (ok) \
var = tmp; \
}

Definition at line 82 of file macros.h.

◆ SET_NUMBER_LOCALE

#define SET_NUMBER_LOCALE
Value:
QLocale::Language numberLocaleLanguage = static_cast<QLocale::Language>(KSharedConfig::openConfig()->group("Settings_General").readEntry( QLatin1String("DecimalSeparatorLocale"), static_cast<int>(QLocale::Language::AnyLanguage) )); \
QLocale numberLocale(numberLocaleLanguage == QLocale::AnyLanguage ? QLocale() : numberLocaleLanguage); \
if (numberLocale.language() == QLocale::Language::C) \
numberLocale.setNumberOptions(QLocale::DefaultNumberOptions);
#define C(a, b)
Definition: Faddeeva.cc:255

Definition at line 75 of file macros.h.

◆ STD_SETTER_CMD_IMPL

#define STD_SETTER_CMD_IMPL (   class_name,
  cmd_name,
  value_type,
  field_name 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSetterCmd<class_name::Private, value_type>(target, &class_name::Private::field_name, newValue, description) {} \
};
Template for simple setter undo commands.

Definition at line 191 of file macros.h.

◆ STD_SETTER_CMD_IMPL_F

#define STD_SETTER_CMD_IMPL_F (   class_name,
  cmd_name,
  value_type,
  field_name,
  finalize_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSetterCmd<class_name::Private, value_type>(target, &class_name::Private::field_name, newValue, description) {} \
virtual void finalize() override { m_target->finalize_method(); } \
};
virtual void finalize()

Definition at line 198 of file macros.h.

◆ STD_SETTER_CMD_IMPL_F_S

#define STD_SETTER_CMD_IMPL_F_S (   class_name,
  cmd_name,
  value_type,
  field_name,
  finalize_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSetterCmd<class_name::Private, value_type>(target, &class_name::Private::field_name, newValue, description) {} \
virtual void finalize() override { m_target->finalize_method(); emit m_target->q->field_name##Changed(m_target->*m_field); } \
};

Definition at line 215 of file macros.h.

◆ STD_SETTER_CMD_IMPL_I

#define STD_SETTER_CMD_IMPL_I (   class_name,
  cmd_name,
  value_type,
  field_name,
  init_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSetterCmd<class_name::Private, value_type>(target, &class_name::Private::field_name, newValue, description) {} \
virtual void initialize() { m_target->init_method(); } \
};
virtual void initialize()

Definition at line 233 of file macros.h.

◆ STD_SETTER_CMD_IMPL_IF

#define STD_SETTER_CMD_IMPL_IF (   class_name,
  cmd_name,
  value_type,
  field_name,
  init_method,
  finalize_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSetterCmd<class_name::Private, value_type>(target, &class_name::Private::field_name, newValue, description) {} \
virtual void initialize() { m_target->init_method(); } \
virtual void finalize() { m_target->finalize_method(); } \
};

Definition at line 241 of file macros.h.

◆ STD_SETTER_CMD_IMPL_M_F_S

#define STD_SETTER_CMD_IMPL_M_F_S (   class_name,
  cmd_name,
  value_type,
  field_name,
  finalize_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardMacroSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardMacroSetterCmd<class_name::Private, value_type>(target, &class_name::Private::field_name, newValue, description) {} \
virtual void finalize() override { m_target->finalize_method(); emit m_target->q->field_name##Changed(m_target->*m_field); } \
virtual void finalizeUndo() override { emit m_target->q->field_name##Changed(m_target->*m_field); } \
};
virtual void finalizeUndo()

Definition at line 224 of file macros.h.

◆ STD_SETTER_CMD_IMPL_S

#define STD_SETTER_CMD_IMPL_S (   class_name,
  cmd_name,
  value_type,
  field_name 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSetterCmd<class_name::Private, value_type>(target, &class_name::Private::field_name, newValue, description) {} \
virtual void finalize() override { emit m_target->q->field_name##Changed(m_target->*m_field); } \
};

Definition at line 207 of file macros.h.

◆ STD_SWAP_METHOD_SETTER_CMD_IMPL

#define STD_SWAP_METHOD_SETTER_CMD_IMPL (   class_name,
  cmd_name,
  value_type,
  method_name 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSwapMethodSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSwapMethodSetterCmd<class_name::Private, value_type>(target, &class_name::Private::method_name, newValue, description) {} \
};
Template for setter undo commands which require a function call.

Definition at line 250 of file macros.h.

◆ STD_SWAP_METHOD_SETTER_CMD_IMPL_F

#define STD_SWAP_METHOD_SETTER_CMD_IMPL_F (   class_name,
  cmd_name,
  value_type,
  method_name,
  finalize_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSwapMethodSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSwapMethodSetterCmd<class_name::Private, value_type>(target, &class_name::Private::method_name, newValue, description) {} \
virtual void finalize() override { m_target->finalize_method(); } \
};

Definition at line 257 of file macros.h.

◆ STD_SWAP_METHOD_SETTER_CMD_IMPL_I

#define STD_SWAP_METHOD_SETTER_CMD_IMPL_I (   class_name,
  cmd_name,
  value_type,
  method_name,
  init_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSwapMethodSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSwapMethodSetterCmd<class_name::Private, value_type>(target, &class_name::Private::method_name, newValue, description) {} \
virtual void initialize() { m_target->init_method(); } \
};

Definition at line 265 of file macros.h.

◆ STD_SWAP_METHOD_SETTER_CMD_IMPL_IF

#define STD_SWAP_METHOD_SETTER_CMD_IMPL_IF (   class_name,
  cmd_name,
  value_type,
  method_name,
  init_method,
  finalize_method 
)
Value:
class class_name ## cmd_name ## Cmd: public StandardSwapMethodSetterCmd<class_name::Private, value_type> { \
public: \
class_name ## cmd_name ## Cmd(class_name::Private *target, value_type newValue, const KLocalizedString &description) \
: StandardSwapMethodSetterCmd<class_name::Private, value_type>(target, &class_name::Private::method_name, newValue, description) {} \
virtual void initialize() { m_target->init_method(); } \
virtual void finalize() { m_target->finalize_method(); } \
};

Definition at line 273 of file macros.h.

◆ STDSTRING

#define STDSTRING (   qstr)    qstr.toUtf8().constData()

Definition at line 67 of file macros.h.

◆ UTF8_QSTRING

#define UTF8_QSTRING (   str)    QString::fromUtf8(str)

Definition at line 66 of file macros.h.

◆ WAIT_CURSOR

#define WAIT_CURSOR   QApplication::setOverrideCursor(QCursor(Qt::WaitCursor))

Definition at line 63 of file macros.h.

◆ WARN

#define WARN (   x)    std::cout << x << std::endl;

File : macros.h Project : LabPlot

Description : Various preprocessor macros

Copyright : (C) 2008 Tilman Benkert (thzs@.nosp@m.gmx..nosp@m.net) Copyright : (C) 2013-2015 Alexander Semke (alexa.nosp@m.nder.nosp@m..semk.nosp@m.e@we.nosp@m.b.de) Copyright : (C) 2016-2020 Stefan Gerlach (stefa.nosp@m.n.ge.nosp@m.rlach.nosp@m.@uni.nosp@m..kn)

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
  • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
  • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 43 of file macros.h.

◆ WRITE_COLUMN

#define WRITE_COLUMN (   column,
  columnName 
)
Value:
do { \
if (column){ \
writer->writeAttribute( #columnName, column->path() ); \
} else { \
writer->writeAttribute( #columnName, QString() ); \
} \
} while(0)

Definition at line 451 of file macros.h.

◆ WRITE_PATH

#define WRITE_PATH (   obj,
  name 
)
Value:
do { \
if (obj){ \
writer->writeAttribute( #name, obj->path() ); \
} else { \
writer->writeAttribute( #name, QString() ); \
} \
} while(0)

Definition at line 505 of file macros.h.

◆ WRITE_QBRUSH

#define WRITE_QBRUSH (   brush)
Value:
do { \
writer->writeAttribute("brush_style", QString::number(brush.style()) ); \
writer->writeAttribute("brush_color_r", QString::number(brush.color().red())); \
writer->writeAttribute("brush_color_g", QString::number(brush.color().green()));\
writer->writeAttribute("brush_color_b", QString::number(brush.color().blue())); \
} while(0)

Definition at line 410 of file macros.h.

◆ WRITE_QCOLOR

#define WRITE_QCOLOR (   color)
Value:
do { \
writer->writeAttribute( "color_r", QString::number(color.red()) ); \
writer->writeAttribute( "color_g", QString::number(color.green()) ); \
writer->writeAttribute( "color_b", QString::number(color.blue()) ); \
} while (0)

Definition at line 286 of file macros.h.

◆ WRITE_QFONT

#define WRITE_QFONT (   font)
Value:
do { \
writer->writeAttribute( "fontFamily", font.family() ); \
writer->writeAttribute( "fontSize", QString::number(font.pixelSize()) ); \
writer->writeAttribute( "fontPointSize", QString::number(font.pointSize()));\
writer->writeAttribute( "fontWeight", QString::number(font.weight()) ); \
writer->writeAttribute( "fontItalic", QString::number(font.italic()) ); \
} while(0)

Definition at line 361 of file macros.h.

◆ WRITE_QPEN

#define WRITE_QPEN (   pen)
Value:
do { \
writer->writeAttribute( "style", QString::number(pen.style()) ); \
writer->writeAttribute( "color_r", QString::number(pen.color().red()) ); \
writer->writeAttribute( "color_g", QString::number(pen.color().green()) ); \
writer->writeAttribute( "color_b", QString::number(pen.color().blue()) ); \
writer->writeAttribute( "width", QString::number(pen.widthF()) ); \
} while (0)

Definition at line 315 of file macros.h.

Function Documentation

◆ qAsConst()