From: Pino Toscano Date: Fri, 16 Feb 2007 20:36:36 +0000 (+0000) Subject: API changes: X-Git-Tag: v3.80.3~47 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=a1a125cf1b3bdbbb25b37f0a58863892de040558;p=libqmvoc.git API changes: - improve the naming of the propert for object tooltip - unvirtualize getters and setters for the paddings svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=634304 --- diff --git a/kdeeduplot/kplotwidget.cpp b/kdeeduplot/kplotwidget.cpp index ea722fa..e8c0a9c 100644 --- a/kdeeduplot/kplotwidget.cpp +++ b/kdeeduplot/kplotwidget.cpp @@ -45,7 +45,7 @@ class KPlotWidget::Private Private( KPlotWidget *qq ) : q( qq ), cBackground( Qt::black ), cForeground( Qt::white ), cGrid( Qt::gray ), - showGrid( false ), showObjectToolTips( true ), useAntialias( false ) + showGrid( false ), showObjectToolTip( true ), useAntialias( false ) { // create the axes and setting their default properties KPlotAxis *leftAxis = new KPlotAxis(); @@ -71,7 +71,7 @@ class KPlotWidget::Private //Colors QColor cBackground, cForeground, cGrid; //draw options - bool showGrid, showObjectToolTips, useAntialias; + bool showGrid, showObjectToolTip, useAntialias; //padding int leftPadding, rightPadding, topPadding, bottomPadding; // hashmap with the axes we have @@ -284,9 +284,9 @@ bool KPlotWidget::isGridShown() const return d->showGrid; } -bool KPlotWidget::areObjectToolTipsShown() const +bool KPlotWidget::isObjectToolTipShown() const { - return d->showObjectToolTips; + return d->showObjectToolTip; } bool KPlotWidget::antialias() const @@ -305,9 +305,9 @@ void KPlotWidget::setShowGrid( bool show ) { update(); } -void KPlotWidget::setShowObjectToolTips( bool show ) +void KPlotWidget::setObjectToolTipShown( bool show ) { - d->showObjectToolTips = show; + d->showObjectToolTip = show; } @@ -337,7 +337,7 @@ QList KPlotWidget::pointsUnderPoint( const QPoint& p ) const { bool KPlotWidget::event( QEvent* e ) { if ( e->type() == QEvent::ToolTip ) { - if ( d->showObjectToolTips ) + if ( d->showObjectToolTip ) { QHelpEvent *he = static_cast( e ); QList pts = pointsUnderPoint( he->pos() - QPoint( leftPadding(), topPadding() ) - contentsRect().topLeft() ); diff --git a/kdeeduplot/kplotwidget.h b/kdeeduplot/kplotwidget.h index 2a67ffa..32017cc 100644 --- a/kdeeduplot/kplotwidget.h +++ b/kdeeduplot/kplotwidget.h @@ -81,7 +81,7 @@ class KDEEDUPLOT_EXPORT KPlotWidget : public QFrame { Q_PROPERTY(QColor foregroundColor READ foregroundColor WRITE setForegroundColor) Q_PROPERTY(QColor gridColor READ gridColor WRITE setGridColor) Q_PROPERTY(bool grid READ isGridShown WRITE setShowGrid) - Q_PROPERTY(bool objectToolTip READ areObjectToolTipsShown WRITE setShowObjectToolTips) + Q_PROPERTY(bool objectToolTip READ isObjectToolTipShown WRITE setObjectToolTipShown) public: /** * @deprecated use the normal constructor and setLimits() @@ -252,7 +252,7 @@ public: /** * @return whether the tooltip for the point objects are shown */ - bool areObjectToolTipsShown() const; + bool isObjectToolTipShown() const; bool antialias() const; @@ -263,46 +263,46 @@ public: * Padding values are set to -1 by default; if unchanged, this function will try to guess * a good value, based on whether ticklabels and/or axis labels are to be drawn. */ - virtual int leftPadding() const; + int leftPadding() const; /** * @return the number of pixels to the right of the plot area. * Padding values are set to -1 by default; if unchanged, this function will try to guess * a good value, based on whether ticklabels and/or axis labels are to be drawn. */ - virtual int rightPadding() const; + int rightPadding() const; /** * @return the number of pixels above the plot area. * Padding values are set to -1 by default; if unchanged, this function will try to guess * a good value, based on whether ticklabels and/or axis labels are to be drawn. */ - virtual int topPadding() const; + int topPadding() const; /** * @return the number of pixels below the plot area. * Padding values are set to -1 by default; if unchanged, this function will try to guess * a good value, based on whether ticklabels and/or axis labels are to be drawn. */ - virtual int bottomPadding() const; + int bottomPadding() const; /** * Set the number of pixels to the left of the plot area. * Set this to -1 to revert to automatic determination of padding values. */ - virtual void setLeftPadding( int padding ); + void setLeftPadding( int padding ); /** * Set the number of pixels to the right of the plot area. * Set this to -1 to revert to automatic determination of padding values. */ - virtual void setRightPadding( int padding ); + void setRightPadding( int padding ); /** * Set the number of pixels above the plot area. * Set this to -1 to revert to automatic determination of padding values. */ - virtual void setTopPadding( int padding ); + void setTopPadding( int padding ); /** * Set the number of pixels below the plot area. * Set this to -1 to revert to automatic determination of padding values. */ - virtual void setBottomPadding( int padding ); + void setBottomPadding( int padding ); /** * Revert all four padding values to be automatically determined. @@ -378,7 +378,7 @@ public slots: * Toggle whether the tooltip for point objects are shown. * @param show if true, the tooltips will be shown. */ - void setShowObjectToolTips( bool show ); + void setObjectToolTipShown( bool show ); private: class Private;