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

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 |
typedef QMap<QPalette::ColorGroup, QtxColorButton*> Style_PrefDlg.PaletteEditor.Btns [private] |
| Style_PrefDlg.PaletteEditor::PaletteEditor | ( | QWidget * | parent = 0 | ) |
| parent | parent widget |
References Style_PrefDlg.PaletteEditor.addColumn(), Style_PrefDlg.PaletteEditor.addItem(), Style_Model.BorderTop, test_table.l, Style_Model.LastColor, MARGIN, Style_PrefDlg.PaletteEditor.myAutoCheck, Style_PrefDlg.PaletteEditor.myContainer, Style_PrefDlg.PaletteEditor.myQuickButton, Style_Model.NColorRoles, Style_Model.NoRole, Style_PrefDlg.PaletteEditor.onAuto(), Style_PrefDlg.PaletteEditor.onQuick(), SPACING, and Style_Model.WindowText.
| Style_PrefDlg.PaletteEditor::~PaletteEditor | ( | ) |
| void Style_PrefDlg.PaletteEditor::addColumn | ( | const QString & | title | ) |
| title | column title |
References test_table.l, test_many_objects.myContainer, and SPACING.
| void Style_PrefDlg.PaletteEditor::addItem | ( | int | id | ) |
| id | color palette identifier (Style_Model.ColorRole) |
References test_table.l, and test_many_objects.myContainer.
| QList< int > Style_PrefDlg.PaletteEditor::items | ( | ) | const |
| void Style_PrefDlg.PaletteEditor::setColor | ( | int | id, |
| QPalette::ColorGroup | cg, | ||
| const QColor & | c | ||
| ) |
| id | item identifier (Style_Model.ColorRole) |
| cg | color group |
| c | color value |
| void Style_PrefDlg.PaletteEditor::setColor | ( | int | id, |
| const QColor & | active, | ||
| const QColor & | inactive = QColor(), |
||
| const QColor & | disabled = QColor() |
||
| ) |
| 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) |
| QColor Style_PrefDlg.PaletteEditor::color | ( | int | id, |
| QPalette::ColorGroup | cg | ||
| ) | const |
| id | item identifier (Style_Model.ColorRole) |
| cg | color group |
References test_table.c.
| bool Style_PrefDlg.PaletteEditor::isAuto | ( | ) | const |
true if inactive/disabled palette colors should be calculated from active one | void Style_PrefDlg.PaletteEditor::setAuto | ( | bool | on | ) |
| on | if true, inactive/disabled palette colors should be calculated from active one |
| void Style_PrefDlg.PaletteEditor::fromColor | ( | const QColor & | 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.
| QString Style_PrefDlg.PaletteEditor::idToName | ( | int | id | ) | [static, private] |
| 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.
| QWidget * Style_PrefDlg.PaletteEditor::line | ( | ) | [private] |
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] |
friend class Style_PrefDlg [friend] |
QFrame* Style_PrefDlg.PaletteEditor.myContainer [private] |
QPushButton* Style_PrefDlg.PaletteEditor.myQuickButton [private] |
QCheckBox* Style_PrefDlg.PaletteEditor.myAutoCheck [private] |
QLabel* Style_PrefDlg.PaletteEditor.myActiveLab [private] |
QLabel* Style_PrefDlg.PaletteEditor.myInactiveLab [private] |
QLabel* Style_PrefDlg.PaletteEditor.myDisabledLab [private] |
QMap<int, Btns> Style_PrefDlg.PaletteEditor.myButtons [private] |
int Style_PrefDlg.PaletteEditor.myCurrentRow [private] |
int Style_PrefDlg.PaletteEditor.myCurrentColumn [private] |