OpenMS  3.0.0
CommonDefs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 OpenMS
 Main OpenMS namespace.
 

Macros

#define CONNECTCAST(class, func, args)   static_cast<void(class::*)args>(&class::func)
 

Enumerations

enum  WidgetHeader { VISIBLE_ONLY, WITH_INVISIBLE }
 Enum to decide which headers(=column) names should be get/set in a table/tree widget. More...
 

Macro Definition Documentation

◆ CONNECTCAST

#define CONNECTCAST (   class,
  func,
  args 
)    static_cast<void(class::*)args>(&class::func)

Macro for Qt's connect() overload resolution (in case signals/slots are overloaded and we need to tell connect what overload to pick without repeating ourselves. This can be solved in Qt 5.7 by using qOverload<>

Note
: provide the brackets for 'args' yourself, since there might be multiple arguments, separated by comma Example: QObject::connect(spinBox, CONNECTCAST(QSpinBox, valueChanged, (double)), slider, &QSlider::setValue);