OpenMS  2.6.0
Classes | Namespaces | Macros
GUIHelpers.h File Reference
#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
Include dependency graph for GUIHelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GUIHelpers
 Class which holds static GUI-related helper functions. More...
 

Namespaces

 OpenMS
 Main OpenMS namespace.
 

Macros

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

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);