! Constructs a QCPAbstractLegendItem and associates it with the QCPLegend \a parent. This does not cause the item to be added to \a parent, so \ref QCPLegend::addItem must be called separately. */
| 18750 | cause the item to be added to \a parent, so \ref QCPLegend::addItem must be called separately. |
| 18751 | */ |
| 18752 | QCPAbstractLegendItem::QCPAbstractLegendItem(QCPLegend *parent) : |
| 18753 | QCPLayoutElement(parent->parentPlot()), |
| 18754 | mParentLegend(parent), |
| 18755 | mFont(parent->font()), |
| 18756 | mTextColor(parent->textColor()), |
| 18757 | mSelectedFont(parent->selectedFont()), |
| 18758 | mSelectedTextColor(parent->selectedTextColor()), |
| 18759 | mSelectable(true), |
| 18760 | mSelected(false) |
| 18761 | { |
| 18762 | setLayer(QLatin1String("legend")); |
| 18763 | setMargins(QMargins(0, 0, 0, 0)); |
| 18764 | } |
| 18765 | |
| 18766 | /*! |
| 18767 | Sets the default font of this specific legend item to \a font. |