SALOME style palette editor widget. More...
#include <Style_PrefDlg.h>

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 | |
| QWidget * | line () |
| Create horizontal line widget. More... | |
Static Private Member Functions | |
| static QString | idToName (int) |
| Get title of the item. More... | |
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 |
SALOME style palette editor widget.
|
private |
| Style_PrefDlg::PaletteEditor::PaletteEditor | ( | QWidget * | parent = 0 | ) |
Constructor.
| parent | parent widget |
References addColumn(), addItem(), Style_Model::BorderTop, Style_Model::LastColor, MARGIN, myAutoCheck, myContainer, myQuickButton, Style_Model::NColorRoles, Style_Model::NoRole, onAuto(), onQuick(), SPACING, and Style_Model::WindowText.
| Style_PrefDlg::PaletteEditor::~PaletteEditor | ( | ) |
Destructor.
| void Style_PrefDlg::PaletteEditor::addColumn | ( | const QString & | title | ) |
| void Style_PrefDlg::PaletteEditor::addItem | ( | int | id | ) |
Add color item to the widget (to the current column)
| id | color palette identifier (Style_Model::ColorRole) |
|
signal |
| QColor Style_PrefDlg::PaletteEditor::color | ( | int | id, |
| QPalette::ColorGroup | cg | ||
| ) | const |
Get color value assigned to the item.
| id | item identifier (Style_Model::ColorRole) |
| cg | color group |
| void Style_PrefDlg::PaletteEditor::fromColor | ( | const QColor & | c | ) |
Initialize all palette colors from color c.
| c | button color value |
References Style_Model::BorderBottom, Style_Model::BorderTop, Style_Model::Checked, Style_Model::FieldDark, Style_Model::FieldLight, Style_Model::GridLine, Style_Model::Header, Style_Model::HighlightBorder, Style_Model::HighlightWidget, Style_Model::Lines, Style_Model::NColorRoles, Style_Model::Pointer, Style_Model::ProgressBar, Style_Model::Slider, Style_Model::TabBorderBottom, and Style_Model::TabBorderTop.
|
staticprivate |
Get title of the item.
| id | item identifier (Style_Model::ColorRole) |
References Style_Model::AlternateBase, Style_Model::Base, Style_Model::BorderBottom, Style_Model::BorderTop, Style_Model::BrightText, Style_Model::Button, Style_Model::ButtonText, Style_Model::Checked, Style_Model::Dark, Style_Model::FieldDark, Style_Model::FieldLight, Style_Model::GridLine, Style_Model::Header, Style_Model::Highlight, Style_Model::HighlightBorder, Style_Model::HighlightedText, Style_Model::HighlightWidget, Style_Model::Light, Style_Model::Lines, Style_Model::Link, Style_Model::LinkVisited, Style_Model::Mid, Style_Model::Midlight, Style_Model::Pointer, Style_Model::ProgressBar, Style_Model::Shadow, Style_Model::Slider, Style_Model::TabBorderBottom, Style_Model::TabBorderTop, Style_Model::Text, Style_Model::ToolTipBase, Style_Model::ToolTipText, Style_Model::Window, and Style_Model::WindowText.
| bool Style_PrefDlg::PaletteEditor::isAuto | ( | ) | const |
Get 'auto-palette' flag value.
true if inactive/disabled palette colors should be calculated from active one | QList< int > Style_PrefDlg::PaletteEditor::items | ( | ) | const |
Get list of currently available color items.
|
private |
Create horizontal line widget.
|
privateslot |
Called when "Auto" check box is clicked.
|
privateslot |
Called when "Quick" button is clicked.
| void Style_PrefDlg::PaletteEditor::setAuto | ( | bool | on | ) |
Set/clear 'auto-palette' flag value.
| on | if true, inactive/disabled palette colors should be calculated from active one |
| void Style_PrefDlg::PaletteEditor::setColor | ( | int | id, |
| const QColor & | active, | ||
| const QColor & | inactive = QColor(), |
||
| const QColor & | disabled = QColor() |
||
| ) |
Set color value to the item.
| id | item identifier (Style_Model::ColorRole) |
| active | color to be used with active color group (QPalette::Active) |
| inactive | color to be used with inactive color group (QPalette::Inactive) |
| disabled | color to be used with disabled color group (QPalette::Disabled) |
| void Style_PrefDlg::PaletteEditor::setColor | ( | int | id, |
| QPalette::ColorGroup | cg, | ||
| const QColor & | c | ||
| ) |
Set color value to the item.
| id | item identifier (Style_Model::ColorRole) |
| cg | color group |
| c | color value |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |