Commit 761e7aec authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

CalendarDecoration::Element: make property getters const

parent 2f6dc205
......@@ -26,17 +26,17 @@ QString Element::elementInfo() const
return QString();
}
QString Element::shortText()
QString Element::shortText() const
{
return QString();
}
QString Element::longText()
QString Element::longText() const
{
return QString();
}
QString Element::extensiveText()
QString Element::extensiveText() const
{
return QString();
}
......@@ -46,7 +46,7 @@ QPixmap Element::newPixmap(const QSize &)
return QPixmap();
}
QUrl Element::url()
QUrl Element::url() const
{
return QUrl();
}
......@@ -90,7 +90,7 @@ void StoredElement::setShortText(const QString &t)
mShortText = t;
}
QString StoredElement::shortText()
QString StoredElement::shortText() const
{
return mShortText;
}
......@@ -100,7 +100,7 @@ void StoredElement::setLongText(const QString &t)
mLongText = t;
}
QString StoredElement::longText()
QString StoredElement::longText() const
{
return mLongText;
}
......@@ -110,7 +110,7 @@ void StoredElement::setExtensiveText(const QString &t)
mExtensiveText = t;
}
QString StoredElement::extensiveText()
QString StoredElement::extensiveText() const
{
return mExtensiveText;
}
......@@ -120,7 +120,7 @@ void StoredElement::setPixmap(const QPixmap &p)
mPixmap = p;
}
QPixmap StoredElement::pixmap()
QPixmap StoredElement::pixmap() const
{
return mPixmap;
}
......@@ -130,7 +130,7 @@ void StoredElement::setUrl(const QUrl &u)
mUrl = u;
}
QUrl StoredElement::url()
QUrl StoredElement::url() const
{
return mUrl;
}
......
......@@ -52,7 +52,7 @@ public:
Return a short text for a given date,
usually only a few words.
*/
Q_REQUIRED_RESULT virtual QString shortText();
Q_REQUIRED_RESULT virtual QString shortText() const;
/**
Return a long text for a given date.
......@@ -61,14 +61,14 @@ public:
Can for example be used as a tool tip.
*/
Q_REQUIRED_RESULT virtual QString longText();
Q_REQUIRED_RESULT virtual QString longText() const;
/**
Return an extensive text for a given date.
This text can be of any length,
but usually it will have one or a few paragraphs.
*/
Q_REQUIRED_RESULT virtual QString extensiveText();
Q_REQUIRED_RESULT virtual QString extensiveText() const;
/**
Return a pixmap for a given date and a given size.
......@@ -79,7 +79,7 @@ public:
Return a URL pointing to more information about the content of the
element.
*/
Q_REQUIRED_RESULT virtual QUrl url();
Q_REQUIRED_RESULT virtual QUrl url() const;
Q_SIGNALS:
void gotNewPixmap(const QPixmap &);
......@@ -107,19 +107,19 @@ public:
StoredElement(const QString &id, const QPixmap &pixmap);
virtual void setShortText(const QString &t);
QString shortText() override;
QString shortText() const override;
virtual void setLongText(const QString &t);
QString longText() override;
QString longText() const override;
virtual void setExtensiveText(const QString &t);
QString extensiveText() override;
QString extensiveText() const override;
virtual void setPixmap(const QPixmap &p);
virtual QPixmap pixmap();
virtual QPixmap pixmap() const;
virtual void setUrl(const QUrl &u);
QUrl url() override;
QUrl url() const override;
protected:
QString mShortText;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment