mirror of
https://github.com/QuasarApp/Heart.git
synced 2025-05-04 05:29:41 +00:00
53 lines
954 B
C++
53 lines
954 B
C++
/*
|
|
* Copyright (C) 2021-2025 QuasarApp.
|
|
* Distributed under the lgplv3 software license, see the accompanying
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
* of this license document, but changing it is not allowed.
|
|
*/
|
|
|
|
|
|
#include "bigdatabase.h"
|
|
|
|
namespace QH {
|
|
namespace PKG {
|
|
|
|
BigDataBase::BigDataBase()
|
|
{
|
|
|
|
}
|
|
|
|
int BigDataBase::packageId() const {
|
|
return _packageId;
|
|
}
|
|
|
|
void BigDataBase::setPackageId(int newPackageId) {
|
|
_packageId = newPackageId;
|
|
}
|
|
|
|
QDataStream &BigDataBase::fromStream(QDataStream &stream) {
|
|
|
|
stream >> _packageId;
|
|
|
|
return stream;
|
|
}
|
|
|
|
QDataStream &BigDataBase::toStream(QDataStream &stream) const {
|
|
stream << _packageId;
|
|
|
|
return stream;
|
|
}
|
|
|
|
bool BigDataBase::isValid() const {
|
|
return AbstractData::isValid() && _packageId >= 0;
|
|
|
|
}
|
|
|
|
QString BigDataBase::toString() const {
|
|
return AbstractData::toString() +
|
|
" packageId: " +
|
|
QString::number(_packageId);
|
|
}
|
|
|
|
}
|
|
}
|