File indexing completed on 2024-05-19 16:31:38
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Dominik Haumann <dhaumann@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 #include "QuotaItem.h" 0007 0008 #include <QDebug> 0009 0010 QuotaItem::QuotaItem() 0011 : m_iconName(QStringLiteral("quota")) 0012 , m_mountPoint() 0013 , m_usage(0) 0014 , m_mountString() 0015 , m_usedString() 0016 { 0017 } 0018 0019 QString QuotaItem::iconName() const 0020 { 0021 return m_iconName; 0022 } 0023 0024 void QuotaItem::setIconName(const QString &name) 0025 { 0026 m_iconName = name; 0027 } 0028 0029 QString QuotaItem::mountPoint() const 0030 { 0031 return m_mountPoint; 0032 } 0033 0034 void QuotaItem::setMountPoint(const QString &mountPoint) 0035 { 0036 m_mountPoint = mountPoint; 0037 } 0038 0039 int QuotaItem::usage() const 0040 { 0041 return m_usage; 0042 } 0043 0044 void QuotaItem::setUsage(int usage) 0045 { 0046 m_usage = usage; 0047 } 0048 0049 QString QuotaItem::mountString() const 0050 { 0051 return m_mountString; 0052 } 0053 0054 void QuotaItem::setMountString(const QString &mountString) 0055 { 0056 m_mountString = mountString; 0057 } 0058 0059 QString QuotaItem::usedString() const 0060 { 0061 return m_usedString; 0062 } 0063 0064 void QuotaItem::setUsedString(const QString &usedString) 0065 { 0066 m_usedString = usedString; 0067 } 0068 0069 QString QuotaItem::freeString() const 0070 { 0071 return m_freeString; 0072 } 0073 0074 void QuotaItem::setFreeString(const QString &freeString) 0075 { 0076 m_freeString = freeString; 0077 } 0078 0079 bool QuotaItem::operator==(const QuotaItem &other) const 0080 { 0081 // clang-format off 0082 return m_mountPoint == other.m_mountPoint 0083 && m_iconName == other.m_iconName 0084 && m_usage == other.m_usage 0085 && m_mountString == other.m_mountString 0086 && m_usedString == other.m_usedString 0087 && m_freeString == other.m_freeString; 0088 // clang-format on 0089 } 0090 0091 bool QuotaItem::operator!=(const QuotaItem &other) const 0092 { 0093 return !(*this == other); 0094 }