MColorPickerUtilities Class Reference

#include <MColorPickerUtilities.h>

Class Description

Utilities for the Color Picker.

Static Public Member Functions

static bool isRegisteredToColorPicking (QWidget *)
 Returns whether the widget registered to the Color Picking mechanism. More...
 
static MStatus doRegisterToColorPicking (QWidget *, MColorPickerCallback *)
 Register the widget to the Color Picking mechanism. More...
 
static MStatus unregisterFromColorPicking (QWidget *)
 Unregister the widget from the Color Picking mechanism. More...
 
static const char * className ()
 Returns the name of this class. More...
 

Member Function Documentation

bool isRegisteredToColorPicking ( QWidget *  widget)
static

Returns whether the widget registered to the Color Picking mechanism.

Note
The widget could be either the registered one or one of its parent.
Parameters
[in]widgetThe widget to test
Note
The widget could the one picked or one of its parent. It allows to register the third-party main window and click on a specific child of that window (instead of registering all children).
Returns
true if widget is registered
MStatus doRegisterToColorPicking ( QWidget *  widget,
MColorPickerCallback callback 
)
static

Register the widget to the Color Picking mechanism.

Parameters
[in]widgetThe widget to register
[in]callbackThe callback to get a color at a specifc position
Note
Registering a widget only means that itself or one of its children could be selected for the color computation.
The callback instance creation/deletion must be managed by the caller.
Returns
status code
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed - the callback object has already been registered
  • MS::kInvalidParameter invalid widget or callback object provided
MStatus unregisterFromColorPicking ( QWidget *  widget)
static

Unregister the widget from the Color Picking mechanism.

Parameters
[in]widgetThe widget to unregister
Returns
status code
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed - the callback object has already been unregistered
  • MS::kInvalidParameter invalid callback object provided
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files:
  • MColorPickerUtilities.h
  • MColorPickerUtilities.cpp