Version: 6.3.1
Signals | Public Member Functions | Private Types | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | Friends

Style_PrefDlg.PaletteEditor Class Reference

SALOME style palette editor widget.

#include <Style_PrefDlg.h>

Inheritance diagram for Style_PrefDlg.PaletteEditor:
Inheritance graph

Signals

void changed ()

Public Member Functions

 PaletteEditor (QWidget *=0)
 Constructor.
 ~PaletteEditor ()
 Destructor.
void addColumn (const QString &)
 Add new color properties column to the widget.
void addItem (int)
 Add color item to the widget (to the current column)
QList< int > items () const
 Get list of currently available color items.
void setColor (int, QPalette::ColorGroup, const QColor &)
 Set color value to the item.
void setColor (int, const QColor &, const QColor &=QColor(), const QColor &=QColor())
 Set color value to the item.
QColor color (int, QPalette::ColorGroup) const
 Get color value assigned to the item.
bool isAuto () const
 Get 'auto-palette' flag value.
void setAuto (bool)
 Set/clear 'auto-palette' flag value.
void fromColor (const QColor &)
 Initialize all palette colors from color c.

Private Types

typedef QMap
< QPalette::ColorGroup,
QtxColorButton * > 
Btns

Private Slots

void onQuick ()
 Called when "Quick" button is clicked.
void onAuto ()
 Called when "Auto" check box is clicked.

Private Member Functions

QWidget * line ()
 Create horizontal line widget.

Static Private Member Functions

static QString idToName (int)
 Get title of the item.

Private Attributes

QFrame * myContainer
QPushButton * myQuickButton
QCheckBox * myAutoCheck
QLabel * myActiveLab
QLabel * myInactiveLab
QLabel * myDisabledLab
QMap< int, Btns > myButtons
int myCurrentRow
int myCurrentColumn

Friends

class Style_PrefDlg

Member Typedef Documentation

typedef QMap<QPalette::ColorGroup, QtxColorButton*> Style_PrefDlg.PaletteEditor.Btns [private]

Constructor & Destructor Documentation

Style_PrefDlg.PaletteEditor::PaletteEditor ( QWidget *  parent = 0)
Style_PrefDlg.PaletteEditor::~PaletteEditor ( )

Member Function Documentation

void Style_PrefDlg.PaletteEditor::addColumn ( const QString &  title)
Parameters:
titlecolumn title
See also:
addItem()

References test_table.l, test_many_objects.myContainer, and SPACING.

void Style_PrefDlg.PaletteEditor::addItem ( int  id)
Parameters:
idcolor palette identifier (Style_Model.ColorRole)
See also:
addColumn(), items()

References test_table.l, and test_many_objects.myContainer.

QList< int > Style_PrefDlg.PaletteEditor::items ( ) const
Returns:
list of items identifiers (Style_Model.ColorRole)
See also:
addColumn(), addItem()
void Style_PrefDlg.PaletteEditor::setColor ( int  id,
QPalette::ColorGroup  cg,
const QColor &  c 
)
Parameters:
iditem identifier (Style_Model.ColorRole)
cgcolor group
ccolor value
See also:
color()
void Style_PrefDlg.PaletteEditor::setColor ( int  id,
const QColor &  active,
const QColor &  inactive = QColor(),
const QColor &  disabled = QColor() 
)
Parameters:
iditem identifier (Style_Model.ColorRole)
activecolor to be used with active color group (QPalette.Active)
inactivecolor to be used with inactive color group (QPalette.Inactive)
disabledcolor to be used with disabled color group (QPalette.Disabled)
See also:
color()
QColor Style_PrefDlg.PaletteEditor::color ( int  id,
QPalette::ColorGroup  cg 
) const
Parameters:
iditem identifier (Style_Model.ColorRole)
cgcolor group
Returns:
color value
See also:
setColor()

References test_table.c.

bool Style_PrefDlg.PaletteEditor::isAuto ( ) const
Returns:
true if inactive/disabled palette colors should be calculated from active one
See also:
setAuto()
void Style_PrefDlg.PaletteEditor::setAuto ( bool  on)
Parameters:
onif true, inactive/disabled palette colors should be calculated from active one
See also:
isAuto()
void Style_PrefDlg.PaletteEditor::fromColor ( const QColor &  c)
QString Style_PrefDlg.PaletteEditor::idToName ( int  id) [static, private]
QWidget * Style_PrefDlg.PaletteEditor::line ( ) [private]
Returns:
new line widget

References test_many_objects.myContainer.

void Style_PrefDlg.PaletteEditor::onQuick ( ) [private, slot]

References test_table.c.

void Style_PrefDlg.PaletteEditor::onAuto ( ) [private, slot]
void Style_PrefDlg.PaletteEditor.changed ( ) [signal]

Friends And Related Function Documentation

friend class Style_PrefDlg [friend]

Field Documentation

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS