aboutsummaryrefslogtreecommitdiff
path: root/src/appointment.cpp
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-03-31 15:51:29 -0300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-29 14:37:39 +0200
commit87d2694ceeadee723573b3866a8bc2e3fb49de58 (patch)
tree7f2665a5ed9b48101b4727865c53a3cba2083c01 /src/appointment.cpp
parent8edf035eca04cc0e488b363becc19ee5c4aa709d (diff)
downloadayatana-indicator-datetime-87d2694ceeadee723573b3866a8bc2e3fb49de58.tar.gz
ayatana-indicator-datetime-87d2694ceeadee723573b3866a8bc2e3fb49de58.tar.bz2
ayatana-indicator-datetime-87d2694ceeadee723573b3866a8bc2e3fb49de58.zip
Remove type property from Alarm.
Diffstat (limited to 'src/appointment.cpp')
-rw-r--r--src/appointment.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/appointment.cpp b/src/appointment.cpp
index e014a85..ebd5a47 100644
--- a/src/appointment.cpp
+++ b/src/appointment.cpp
@@ -27,22 +27,21 @@ namespace datetime {
*****
****/
-Alarm::Alarm()
- : type(Alarm::None)
+bool Alarm::operator==(const Alarm& that) const
{
+ return (text==that.text)
+ && (audio_url==that.audio_url)
+ && (this->time==that.time);
}
-Alarm::Alarm(int type_, const std::string &text_, const std::string& audio_url_, const DateTime &time_)
- : type(type_), text(text_), audio_url(audio_url_), time(time_)
+bool Alarm::has_sound() const
{
+ return !audio_url.empty();
}
-bool Alarm::operator==(const Alarm& that) const
+bool Alarm::has_text() const
{
- return (type==that.type)
- && (text==that.text)
- && (audio_url==that.audio_url)
- && (this->time==that.time);
+ return !text.empty();
}
bool Appointment::operator==(const Appointment& that) const