logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

QwtLegendData - Attributes of an entry on a legend.

Author

       Generated automatically by Doxygen for Qwt User's Guide from the source code.

Version 6.1.4                                    Wed Jan 2 2019                                 QwtLegendData(3)

Detailed Description

       Attributes of an entry on a legend.

       QwtLegendData is an abstract container ( like QAbstractModel ) to exchange attributes, that are only
       known between to the plot item and the legend.

       By overloading QwtPlotItem::legendData() any other set of attributes could be used, that can be handled
       by a modified ( or completely different ) implementation of a legend.

       Seealso:QwtLegend, QwtPlotLegendItemNote:
           The stockchart example implements a legend as a tree with checkable items

Member Enumeration Documentation

enumQwtLegendData::Mode
       Mode defining how a legend entry interacts.

       EnumeratorReadOnly
              The legend item is not interactive, like a label.

       Clickable
              The legend item is clickable, like a push button.

       Checkable
              The legend item is checkable, like a checkable button.

Member Function Documentation

boolQwtLegendData::hasRole(introle)constParameters:role Attribute role

       Returns:
           True, when the internal map has an entry for role

   QwtGraphicQwtLegendData::icon()constReturns:
           Value of the IconRole attribute

   boolQwtLegendData::isValid()constReturns:
           True, when the internal map is empty

   QwtLegendData::ModeQwtLegendData::mode()constReturns:
           Value of the ModeRole attribute

   voidQwtLegendData::setValue(introle,constQVariant&data)
       Set an attribute value

       Parameters:role Attribute role
           data Attribute value

       Seealso:value()voidQwtLegendData::setValues(constQMap<int,QVariant>&map)
       Set the legend attributes

       QwtLegendData actually is a QMap<int, QVariant> with some convenience interfaces

       Parameters:map Values

       Seealso:values()QwtTextQwtLegendData::title()constReturns:
           Value of the TitleRole attribute

   QVariantQwtLegendData::value(introle)constParameters:role Attribute role

       Returns:
           Attribute value for a specific role

   constQMap<int,QVariant>&QwtLegendData::values()constReturns:
           Legend attributes

       Seealso:setValues()

Name

       QwtLegendData - Attributes of an entry on a legend.

Synopsis

       #include <qwt_legend_data.h>

   PublicTypes
       enum Mode { ReadOnly, Clickable, Checkable }
           Mode defining how a legend entry interacts.
       enum Role { ModeRole, TitleRole, IconRole, UserRole = 32 }
           Identifier how to interprete a QVariant.

   PublicMemberFunctionsQwtLegendData ()
           Constructor.
       ~QwtLegendData ()
           Destructor.
       void setValues (const QMap< int, QVariant > &)
       const QMap< int, QVariant > & values () const
       void setValue (int role, const QVariant &)
       QVariant value (int role) const
       bool hasRole (int role) const
       bool isValid () const
       QwtGraphicicon () const
       QwtTexttitle () const
       Modemode () const

See Also