diff --git a/src/Tools/plugins/widget/customwidgets.cpp b/src/Tools/plugins/widget/customwidgets.cpp index 481fe41e97..fcaa4bdc2b 100644 --- a/src/Tools/plugins/widget/customwidgets.cpp +++ b/src/Tools/plugins/widget/customwidgets.cpp @@ -45,22 +45,13 @@ UrlLabel::UrlLabel ( QWidget * parent, Qt::WindowFlags f ) { _url = "http://localhost"; setToolTip(this->_url); + setCursor(Qt::PointingHandCursor); } UrlLabel::~UrlLabel() { } -void UrlLabel::enterEvent ( QEvent * ) -{ - setCursor(Qt::PointingHandCursor); -} - -void UrlLabel::leaveEvent ( QEvent * ) -{ - setCursor(Qt::ArrowCursor); -} - void UrlLabel::mouseReleaseEvent ( QMouseEvent * ) { QMessageBox::information(this, "Browser", @@ -1577,8 +1568,7 @@ UIntSpinBox::UIntSpinBox (QWidget* parent) { d = new UIntSpinBoxPrivate; d->mValidator = new UnsignedValidator(this->minimum(), this->maximum(), this); - connect(this, qOverload(&UIntSpinBox::valueChanged), - this, &UIntSpinBox::valueChange); + connect(this, qOverload(&QSpinBox::valueChanged), this, &UIntSpinBox::valueChange); setRange(0, 99); setValue(0); updateValidator(); @@ -1615,7 +1605,7 @@ void UIntSpinBox::setValue(uint value) void UIntSpinBox::valueChange(int value) { - valueChanged(d->mapToUInt(value)); + unsignedChanged(d->mapToUInt(value)); } uint UIntSpinBox::minimum() const @@ -1758,10 +1748,10 @@ void PrefDoubleSpinBox::setParamGrpPath ( const QByteArray& name ) // ------------------------------------------------------------- ColorButton::ColorButton(QWidget* parent) - : QPushButton(parent), - _allowChange(true), - _drawFrame(true), - _allowTransparency(false) + : QPushButton(parent) + , _allowChange(true) + , _allowTransparency(false) + , _drawFrame(true) { _col = palette().color(QPalette::Active,QPalette::Midlight); connect(this, &ColorButton::clicked, this, &ColorButton::onChooseColor); diff --git a/src/Tools/plugins/widget/customwidgets.h b/src/Tools/plugins/widget/customwidgets.h index c5f9d51091..837ef45f84 100644 --- a/src/Tools/plugins/widget/customwidgets.h +++ b/src/Tools/plugins/widget/customwidgets.h @@ -167,8 +167,6 @@ public Q_SLOTS: void setUrl( const QString &u ); protected: - void enterEvent ( QEvent * ); - void leaveEvent ( QEvent * ); void mouseReleaseEvent ( QMouseEvent * ); private: @@ -582,7 +580,7 @@ public: void setMaximum( uint value ); Q_SIGNALS: - void valueChanged( uint value ); + void unsignedChanged( uint value ); public Q_SLOTS: void setValue( uint value );