32 : QLineEdit( pParent )
34 , m_bFixedFont( bFixedFont )
35 , m_bUseRedFont( false )
36 , m_bIsActive( bIsActive )
38 setReadOnly( ! bIsActive );
39 setEnabled( bIsActive );
41 setFocusPolicy( Qt::NoFocus );
43 setAlignment( Qt::AlignCenter );
44 setLocale( QLocale( QLocale::C, QLocale::AnyCountry ) );
50 QFont currentFont = font();
54 switch ( pPref->getFontSize() ) {
68 if ( ! size.isNull() ) {
129 QColor textColor, textColorActive;
131 textColor = pPref->getColorTheme()->m_buttonRedColor;
132 textColorActive = pPref->getColorTheme()->m_buttonRedColor;
134 textColor = pPref->getColorTheme()->m_windowTextColor;
135 textColorActive = pPref->getColorTheme()->m_widgetTextColor;
137 QColor backgroundColor = pPref->getColorTheme()->m_windowColor;
139 QColor backgroundColorActive = pPref->getColorTheme()->m_widgetColor;
141 QString sStyleSheet = QString(
"\
144 background-color: %2; \
146QLineEdit:disabled { \
148 background-color: %4; \
150 .arg( textColorActive.name() )
151 .arg( backgroundColorActive.name() )
152 .arg( textColor.name() )
153 .arg( backgroundColor.name() );
158 sStyleSheet.append( QString(
"\
163 .arg( font().pixelSize() )
164 .arg( font().family() ) );
167 setStyleSheet( sStyleSheet );