File indexing completed on 2024-05-12 11:56:47

0001 /*
0002  * This file is part of KQuickCharts
0003  * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl>
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006  */
0007 
0008 #include "ChartDataSource.h"
0009 
0010 #include <QColor>
0011 #include <QVariant>
0012 
0013 ChartDataSource::ChartDataSource(QObject *parent)
0014     : QObject(parent)
0015 {
0016 }
0017 
0018 QVariant ChartDataSource::first() const
0019 {
0020     return item(0);
0021 }
0022 
0023 bool ChartDataSource::variantCompare(const QVariant &lhs, const QVariant &rhs)
0024 {
0025 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0026     return lhs < rhs;
0027 #else
0028     return QVariant::compare(lhs, rhs) == QPartialOrdering::Less;
0029 #endif
0030 }
0031 
0032 #include "moc_ChartDataSource.cpp"