|
|
@ -32,9 +32,7 @@ TextField::TextField(QWidget *parent) |
|
|
|
QCoreApplication::processEvents(); |
|
|
|
QCoreApplication::processEvents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TextField::~TextField() |
|
|
|
TextField::~TextField() {} |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
TextField::setBackgroundColor(const QColor &color) |
|
|
|
TextField::setBackgroundColor(const QColor &color) |
|
|
@ -199,7 +197,8 @@ TextField::paintEvent(QPaintEvent *event) |
|
|
|
|
|
|
|
|
|
|
|
if (text().isEmpty()) { |
|
|
|
if (text().isEmpty()) { |
|
|
|
painter.setOpacity(1 - state_machine_->progress()); |
|
|
|
painter.setOpacity(1 - state_machine_->progress()); |
|
|
|
// painter.fillRect(rect(), parentWidget()->palette().color(backgroundRole()));
|
|
|
|
// painter.fillRect(rect(),
|
|
|
|
|
|
|
|
// parentWidget()->palette().color(backgroundRole()));
|
|
|
|
painter.fillRect(rect(), backgroundColor()); |
|
|
|
painter.fillRect(rect(), backgroundColor()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -273,9 +272,7 @@ TextFieldStateMachine::TextFieldStateMachine(TextField *parent) |
|
|
|
connect(text_field_, SIGNAL(textChanged(QString)), this, SLOT(setupProperties())); |
|
|
|
connect(text_field_, SIGNAL(textChanged(QString)), this, SLOT(setupProperties())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TextFieldStateMachine::~TextFieldStateMachine() |
|
|
|
TextFieldStateMachine::~TextFieldStateMachine() {} |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
TextFieldStateMachine::setLabel(TextFieldLabel *label) |
|
|
|
TextFieldStateMachine::setLabel(TextFieldLabel *label) |
|
|
@ -352,9 +349,7 @@ TextFieldLabel::TextFieldLabel(TextField *parent) |
|
|
|
setFont(font); |
|
|
|
setFont(font); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TextFieldLabel::~TextFieldLabel() |
|
|
|
TextFieldLabel::~TextFieldLabel() {} |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
TextFieldLabel::paintEvent(QPaintEvent *) |
|
|
|
TextFieldLabel::paintEvent(QPaintEvent *) |
|
|
|