aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/models/threadedsonglist/mediaelement.cpp
blob: 6d93cd55eaae2a61551e44a647175b3ab4afab36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#include "mediaelement.h"

MediaElement::MediaElement() {}

MediaElement::MediaElement(QStringView songName,
                           QStringView artistName,
                           QStringView albumName,
                           const QUrl& albumArt)
    : m_isValid{true}
    , m_song{songName}
    , m_artist{artistName}
    , m_album{albumName}
    , m_albumArtUrl{albumArt}
{}

bool MediaElement::isValid() const
{
    return m_isValid;
}

QUrl MediaElement::albumArtFile() const
{
    return m_albumArtUrl;
}

QString MediaElement::song() const
{
    return m_song;
}

QString MediaElement::artist() const
{
    return m_artist;
}

QString MediaElement::album() const
{
    return m_album;
}