tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
Color_Dialog Class Reference

#include <color_dialog.hpp>

Inheritance diagram for Color_Dialog:

Classes

class  Private
 

Public Types

enum  Button_Mode { OkCancel, OkApplyCancel, Close }
 

Public Slots

void setColor (const QColor &c)
 
void showColor (const QColor &oldcolor)
 
void setWheelFlags (Color_Wheel::Display_Flags flags)
 

Signals

void colorChanged (QColor)
 
void colorSelected (QColor)
 
void wheelFlagsChanged (Color_Wheel::Display_Flags flags)
 

Public Member Functions

 Color_Dialog (QWidget *parent=0, Qt::WindowFlags f=0)
 
QColor color () const
 
void setPreviewDisplayMode (Color_Preview::Display_Mode mode)
 
Color_Preview::Display_Mode previewDisplayMode () const
 
void setAlphaEnabled (bool a)
 
bool alphaEnabled () const
 
void setButtonMode (Button_Mode mode)
 
Button_Mode buttonMode () const
 
QSize sizeHint () const
 
Color_Wheel::Display_Flags wheelFlags () const
 

Protected Member Functions

void dragEnterEvent (QDragEnterEvent *event)
 
void dropEvent (QDropEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 

Properties

QColor color
 
Color_Wheel::Display_Flags wheelFlags
 

Member Enumeration Documentation

Enumerator
OkCancel 
OkApplyCancel 
Close 

Constructor & Destructor Documentation

Color_Dialog::Color_Dialog ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)
explicit

Member Function Documentation

bool Color_Dialog::alphaEnabled ( ) const
Color_Dialog::Button_Mode Color_Dialog::buttonMode ( ) const
QColor Color_Dialog::color ( ) const

Get currently selected color

void Color_Dialog::colorChanged ( QColor  )
signal

The current color was changed

void Color_Dialog::colorSelected ( QColor  )
signal

The user selected the new color by pressing Ok/Apply

void Color_Dialog::dragEnterEvent ( QDragEnterEvent *  event)
protected
void Color_Dialog::dropEvent ( QDropEvent *  event)
protected
void Color_Dialog::mouseMoveEvent ( QMouseEvent *  event)
protected
void Color_Dialog::mouseReleaseEvent ( QMouseEvent *  event)
protected
Color_Preview::Display_Mode Color_Dialog::previewDisplayMode ( ) const

Get the color preview diplay mode

void Color_Dialog::setAlphaEnabled ( bool  a)

Set whether the color alpha channel can be edited. If alpha is disabled, the selected color's alpha will always be 255.

void Color_Dialog::setButtonMode ( Button_Mode  mode)

Select which dialog buttons to show

There are three predefined modes: OkCancel - this is useful when the dialog is modal and we just want to return a color OkCancelApply - this is for non-modal dialogs Close - for non-modal dialogs with direct color updates via colorChanged signal

void Color_Dialog::setColor ( const QColor &  c)
slot

Change color

void Color_Dialog::setPreviewDisplayMode ( Color_Preview::Display_Mode  mode)

Set the display mode for the color preview

void Color_Dialog::setWheelFlags ( Color_Wheel::Display_Flags  flags)
slot
void Color_Dialog::showColor ( const QColor &  oldcolor)
slot

Set the current color and show the dialog

QSize Color_Dialog::sizeHint ( ) const
Color_Wheel::Display_Flags Color_Dialog::wheelFlags ( ) const
void Color_Dialog::wheelFlagsChanged ( Color_Wheel::Display_Flags  flags)
signal

Property Documentation

QColor Color_Dialog::color
readwrite
Color_Wheel::Display_Flags Color_Dialog::wheelFlags
readwrite

The documentation for this class was generated from the following files: