Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Style_PrefDlg::PaletteEditor Class Reference

SALOME style palette editor widget. More...

#include <Style_PrefDlg.h>

Inheritance diagram for Style_PrefDlg::PaletteEditor:
Inheritance graph

Signals

void changed ()
 

Public Member Functions

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

Private Types

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

Private Slots

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

Private Member Functions

QWidgetline ()
 Create horizontal line widget. More...
 

Static Private Member Functions

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

Private Attributes

QFramemyContainer
 
QPushButton * myQuickButton
 
QCheckBox * myAutoCheck
 
QLabelmyActiveLab
 
QLabelmyInactiveLab
 
QLabelmyDisabledLab
 
QMap< int, BtnsmyButtons
 
int myCurrentRow
 
int myCurrentColumn
 

Friends

class Style_PrefDlg
 

Detailed Description

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 SPACING.

void Style_PrefDlg::PaletteEditor::addItem ( int  id)
Parameters
idcolor palette identifier (Style_Model::ColorRole)
See Also
addColumn(), items()
void Style_PrefDlg::PaletteEditor::changed ( )
signal
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()
bool Style_PrefDlg::PaletteEditor::isAuto ( ) const
Returns
true if inactive/disabled palette colors should be calculated from active one
See Also
setAuto()
QList< int > Style_PrefDlg::PaletteEditor::items ( ) const
Returns
list of items identifiers (Style_Model::ColorRole)
See Also
addColumn(), addItem()
QWidget * Style_PrefDlg::PaletteEditor::line ( )
private
Returns
new line widget
void Style_PrefDlg::PaletteEditor::onAuto ( )
privateslot
void Style_PrefDlg::PaletteEditor::onQuick ( )
privateslot
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::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()

Friends And Related Function Documentation

friend class Style_PrefDlg
friend

Member Data Documentation

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

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