]> Git trees. - libqmvoc.git/commitdiff
API changes:
authorPino Toscano <pino@kde.org>
Fri, 16 Feb 2007 20:36:36 +0000 (20:36 +0000)
committerPino Toscano <pino@kde.org>
Fri, 16 Feb 2007 20:36:36 +0000 (20:36 +0000)
- improve the naming of the propert for object tooltip
- unvirtualize getters and setters for the paddings

svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=634304

kdeeduplot/kplotwidget.cpp
kdeeduplot/kplotwidget.h

index ea722fa75f306a9a5e2a7e41962a6c451096a3b2..e8c0a9c1494fb257fad66959798f28c410f19070 100644 (file)
@@ -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<KPlotPoint*> 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<QHelpEvent*>( e );
                        QList<KPlotPoint*> pts = pointsUnderPoint( he->pos() - QPoint( leftPadding(), topPadding() ) - contentsRect().topLeft() );
index 2a67ffaa9d0f7bfd10db1a113a3ccfddbfc75a8a..32017cca15dee922019fab3925ffea627a0784c9 100644 (file)
@@ -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;