SALOME style prefences dialog box class. More...
#include <Style_PrefDlg.h>
Classes | |
class | PaletteEditor |
SALOME style palette editor widget. More... | |
Signals | |
void | styleChanged () |
Signals inherited from QtxDialog | |
void | dlgButton (int) |
Emitted when the user button is clicked. More... | |
void | dlgParamChanged () |
This signal can be used in successor classes to signalize about some dialog parameter changing. More... | |
void | dlgHelp () |
Emitted when the "Help" button is clicked. More... | |
void | dlgApply () |
Emitted when the "Apply" button is clicked. More... | |
void | dlgOk () |
Emitted when the "OK" button is clicked. More... | |
void | dlgNo () |
Emitted when the "No" button is clicked. More... | |
void | dlgYes () |
Emitted when the "Yes" button is clicked. More... | |
void | dlgClose () |
Emitted when the "Close" button is clicked. More... | |
void | dlgCancel () |
Emitted when the "Cancel" button is clicked. More... | |
Public Member Functions | |
Style_PrefDlg (QWidget *=0) | |
Constructor. More... | |
~Style_PrefDlg () | |
Destructor. More... | |
void | accept () |
Called when "OK" button is clicked. More... | |
bool | eventFilter (QObject *, QEvent *) |
Process key press event. More... | |
Public Member Functions inherited from QtxDialog | |
QtxDialog (QWidget *=0, bool=false, bool=false, const int=Standard, Qt::WindowFlags=0) | |
Constructor. More... | |
virtual | ~QtxDialog () |
Destructor. More... | |
void | setDialogFlags (const int) |
Set specified dialog box flags. More... | |
void | clearDialogFlags (const int) |
Clear specified the dialog flags. More... | |
bool | testDialogFlags (const int) const |
Test specified dialog flags. More... | |
void | setButtonFlags (const int) |
Add specified control button(s) to the dialog box. More... | |
void | clearButtonFlags (const int) |
Remove specified control button(s) from the dialog box. More... | |
bool | testButtonFlags (const int) const |
Test specified buttons. More... | |
int | buttonPosition (const int) const |
Get specified control button position. More... | |
void | setButtonPosition (const int, const int=-1) |
Set the specified control button(s) position. More... | |
void | setPlacePosition (const int, const int) |
Set button position for all buttons in specified area. More... | |
int | placePolicy (const int) const |
Get buttons layouting policy for the specified area. More... | |
void | setPlacePolicy (const int, const int) |
set buttons layouting policy for the specified area. More... | |
void | setButtonPlace (const int, const int) |
Move specified button(s) into specified area. More... | |
QString | buttonText (const int) |
Get specified button's text. More... | |
void | setButtonText (const int, const QString &text) |
Set specified button's text. More... | |
void | setButtonFocus (const int) |
Sets the keyboard focus to the specified button. More... | |
bool | hasButtonFocus (const int) const |
Check if specified button has keyboard focus. More... | |
bool | isButtonEnabled (const int) const |
Get "enabled" status of the specified button(s). More... | |
void | setButtonEnabled (const bool, const int) |
Enable/disable specified button(s). More... | |
bool | isBorderEnabled (const int) const |
Check if border is enabled. More... | |
void | setBorderEnabled (const bool, const int) |
Show/hide border for the specified button area. More... | |
void | removeButton (const int) |
Remove user button. More... | |
int | insertButton (const QString &, const int=BottomArea) |
Add user button to the dialog box. More... | |
QIntList | userButtonIds () const |
Get all user button IDs. More... | |
QAbstractButton * | userButton (const int) const |
Get user button by the specified id. More... | |
uint | setAlignment (uint align) |
Sets alignment policy. More... | |
Private Types | |
enum | { Current, Default, Global, User } |
enum | { TypeRole = Qt::UserRole + 123, NameRole } |
Private Slots | |
void | onApply () |
Called when "Apply" button is pressed. More... | |
void | onHelp () |
Called when "Help" button is pressed. More... | |
void | onStyleChanged () |
Called when user selects any theme item in the themes list. More... | |
void | onLinesType () |
Called when lines type is changed. More... | |
void | onChanged () |
Called when any style parameter is changed by the user. More... | |
void | onItemChanged (QListWidgetItem *) |
Called when user theme is renamed by the user. More... | |
void | onEffectChanged (QAbstractButton *) |
Called when widget effect is changed. More... | |
Private Member Functions | |
Style_ResourceMgr * | resourceMgr () |
Get SALOME themes resource manager. More... | |
void | fromModel (Style_Model *) |
Initialize dialog box fields from SALOME style model. More... | |
void | toModel (Style_Model *) const |
Save values from dialog box fields to SALOME style model. More... | |
QString | findUniqueName (const QString &, QListWidgetItem *=0, bool=false) |
Find unique name for the theme name. More... | |
Private Attributes | |
Style_ResourceMgr * | myResMgr |
QCheckBox * | myStyleCheck |
QListWidget * | myStylesList |
QTabWidget * | myStylesTab |
PaletteEditor * | myPaletteEditor |
QtxFontEdit * | myFontEdit |
QComboBox * | myLinesCombo |
QSlider * | myLinesTransparency |
QtxDoubleSpinBox * | myEditRound |
QtxDoubleSpinBox * | myButtonRound |
QtxDoubleSpinBox * | myFrameRound |
QtxDoubleSpinBox * | mySliderRound |
QCheckBox * | myAntiAliasing |
QSpinBox * | myHorHandleDelta |
QSpinBox * | myVerHandleDelta |
QSpinBox * | mySplitterLength |
QSpinBox * | mySliderSize |
QRadioButton * | myEffectNone |
QRadioButton * | myEffectHighlight |
QRadioButton * | myEffectAutoRaise |
QRadioButton * | myCurrentEffect |
Additional Inherited Members | |
Public Types inherited from QtxDialog | |
enum | PlacePolicy { Position, Expand, Uniform } |
Buttons alignment type. More... | |
enum | ButtonArea { TopArea, BottomArea, LeftArea, RightArea } |
Buttons area. More... | |
enum | ButtonPosition { Left, Right, Center, Top = Left, Bottom = Right } |
Button position. More... | |
enum | ButtonFlags { None = 0x00000000, OK = 0x00000001, Apply = 0x00000002, Cancel = 0x00000004, Yes = 0x00000008, No = 0x00000010, Close = 0x00000020, Help = 0x00000040, OKCancel = OK | Cancel, YesNo = Yes | No, Standard = OK | Cancel | Help, All = Standard | YesNo | Apply | Close } |
Button ID flags. More... | |
enum | DialogFlags { Accept = 0x000001, Reject = 0x000002, AlignOnce = 0x000004, SetFocus = 0x000008 } |
Dialog box flags. More... | |
Public Slots inherited from QtxDialog | |
void | update () |
Update dialog box. More... | |
virtual void | setVisible (bool) |
Show/hide dialog box, set keyboard focus to the dialog. More... | |
Static Public Member Functions inherited from QtxDialog | |
static void | setUnits (QLabel *, const QString &) |
Set measure units to the specified label. More... | |
Protected Types inherited from QtxDialog | |
typedef QMap< int, QAbstractButton * > | ButtonMap |
button map More... | |
Protected Slots inherited from QtxDialog | |
virtual void | reject () |
Reject the dialog box. More... | |
Protected Member Functions inherited from QtxDialog | |
QFrame * | mainFrame () const |
Get dialog box main frame widget. More... | |
virtual bool | acceptData () const |
Check if data entered by the user is valid. More... | |
virtual bool | rejectData () const |
Check if dialog box can be cancelled. More... | |
virtual QAbstractButton * | createButton (QWidget *) |
Create new user button. More... | |
QAbstractButton * | button (const int) const |
Get button by the specified ID. More... | |
ButtonMap | buttons (const int=All) const |
Get buttons by the specified IDs. More... | |
int | buttonId (const QAbstractButton *) const |
Get specified button's identifier. More... | |
int | buttonPosition (QAbstractButton *) const |
Get position of specified button. More... | |
virtual void | showEvent (QShowEvent *) |
Align this dialog according to the parent widget and alignment policy before the dialog box is shown. More... | |
virtual void | hideEvent (QHideEvent *) |
Process all existing events when dialog box is hidden. More... | |
virtual void | closeEvent (QCloseEvent *) |
Called when user closes dialog box. More... | |
virtual void | childEvent (QChildEvent *) |
Update dialog box layout when the size grip is added. More... | |
virtual void | keyPressEvent (QKeyEvent *) |
Process key pressing event. More... | |
The dialog box lists all SALOME style themes available via the application and allows user to create own schemas.
Style_PrefDlg::Style_PrefDlg | ( | QWidget * | parent = 0 | ) |
parent | parent widget |
References QtxDialog::AlignOnce, QtxDialog::Close, Current, Default, QtxDialog::dlgApply(), QtxDialog::dlgHelp(), Style_ResourceMgr::Global, Global, Style_Model::Horizontal, Horizontal, Style_Model::Inclined, Style_Salome::isActive(), main(), QtxDialog::mainFrame(), MARGIN, myAntiAliasing, myButtonRound, myCurrentEffect, myEditRound, myEffectAutoRaise, myEffectHighlight, myEffectNone, myFontEdit, myFrameRound, myHorHandleDelta, myLinesCombo, myLinesTransparency, myPaletteEditor, mySliderRound, mySliderSize, mySplitterLength, myStyleCheck, myStylesList, myStylesTab, myVerHandleDelta, NameRole, Style_Model::NoLines, onApply(), onChanged(), onEffectChanged(), onHelp(), onItemChanged(), onLinesType(), onStyleChanged(), resourceMgr(), QtxDialog::Right, QtxDialog::setButtonPosition(), QtxDialog::setDialogFlags(), SPACING, styleChanged(), Style_ResourceMgr::styles(), TypeRole, Style_ResourceMgr::User, and User.
Style_PrefDlg::~Style_PrefDlg | ( | ) |
|
virtual |
Reimplemented from QtxDialog.
References QtxDialog::accept(), and onApply().
e | key event |
References myStylesList, NameRole, QtxResourceMgr::remove(), resourceMgr(), QtxResourceMgr::save(), TypeRole, and User.
|
private |
name | theme name template |
item | if not 0, used to be ignored when browsing through items list |
addSuffix | if true , the integrer suffix is always added to the theme name (otherwise suffix is added only if item name is not unique) |
References myStylesList.
|
private |
model | style model |
References Style_Model::antialiasing(), Style_Model::applicationFont(), Style_Model::AutoRaiseEffect, Style_Model::ButtonRadius, Style_Model::color(), Style_Model::EditRadius, Style_Model::FrameRadius, Style_Model::handleDelta(), Style_Model::HighlightEffect, Horizontal, Style_Model::isAutoPalette(), Style_Model::LastColor, Style_Model::linesTransparency(), Style_Model::linesType(), myAntiAliasing, myButtonRound, myEditRound, myEffectAutoRaise, myEffectHighlight, myEffectNone, myFontEdit, myFrameRound, myHorHandleDelta, myLinesCombo, myLinesTransparency, myPaletteEditor, mySliderRound, mySliderSize, mySplitterLength, myVerHandleDelta, Style_Model::NoRole, Style_PrefDlg::PaletteEditor::setAuto(), Style_PrefDlg::PaletteEditor::setColor(), QtxFontEdit::setCurrentFont(), Style_Model::SliderRadius, Style_Model::sliderSize(), Style_Model::splitHandleLength(), Vertical, Style_Model::widgetEffect(), Style_Model::widgetRounding(), and Style_Model::WindowText.
|
privateslot |
|
privateslot |
References Current, findUniqueName(), fromModel(), Style_Salome::model(), myStylesList, NameRole, QtxResourceMgr::remove(), resourceMgr(), Style_Model::save(), toModel(), TypeRole, and User.
|
privateslot |
References myCurrentEffect, and styleChanged().
|
privateslot |
|
privateslot |
References findUniqueName(), myStylesList, and onChanged().
|
privateslot |
References myLinesCombo, myLinesTransparency, Style_Model::NoLines, and styleChanged().
|
privateslot |
References Current, Default, fromModel(), Style_Model::fromResources(), Global, Style_Salome::model(), myStylesList, NameRole, onLinesType(), resourceMgr(), TypeRole, and User.
|
private |
References myResMgr.
|
signal |
|
private |
model | style model |
References Style_Model::AutoRaiseEffect, Style_Model::Button, Style_Model::ButtonRadius, Style_PrefDlg::PaletteEditor::color(), QtxFontEdit::currentFont(), Style_Model::EditRadius, Style_Model::FrameRadius, Style_Model::HighlightEffect, Horizontal, Style_PrefDlg::PaletteEditor::isAuto(), Style_Model::LastColor, myAntiAliasing, myButtonRound, myEditRound, myEffectAutoRaise, myEffectHighlight, myFontEdit, myFrameRound, myHorHandleDelta, myLinesCombo, myLinesTransparency, myPaletteEditor, mySliderRound, mySliderSize, mySplitterLength, myVerHandleDelta, Style_Model::NoEffect, Style_Model::NoRole, Style_Model::setAntialiasing(), Style_Model::setApplicationFont(), Style_Model::setAutoPalette(), Style_Model::setColor(), Style_Model::setHandleDelta(), Style_Model::setLinesTransparency(), Style_Model::setLinesType(), Style_Model::setSliderSize(), Style_Model::setSplitHandleLength(), Style_Model::setWidgetEffect(), Style_Model::setWidgetRounding(), Style_Model::SliderRadius, Vertical, and Style_Model::WindowText.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |