10#include "parentreference_p.h"
11#include "permission_p.h"
15#include <QJsonDocument>
18using namespace KGAPI2::Drive;
22class Q_DECL_HIDDEN
File::Labels::Private
26 Private(
const Private &other);
31 bool restricted =
false;
35File::Labels::Private::Private()
39File::Labels::Private::Private(
const Private &other)
40 : starred(other.starred)
41 , hidden(other.hidden)
42 , trashed(other.trashed)
43 , restricted(other.restricted)
44 , viewed(other.viewed)
53File::Labels::Labels(
const Labels &other)
54 : d(new Private(*(other.d)))
58File::Labels::~Labels()
63bool File::Labels::operator==(
const Labels &other)
const
68 GAPI_COMPARE(restricted)
100 d->trashed = trashed;
105 return d->restricted;
110 d->restricted = restricted;
125class Q_DECL_HIDDEN
File::IndexableText::Private
129 Private(
const Private &other);
134File::IndexableText::Private::Private()
138File::IndexableText::Private::Private(
const Private &other)
143File::IndexableText::IndexableText()
148File::IndexableText::IndexableText(
const IndexableText &other)
149 : d(new Private(*(other.d)))
153File::IndexableText::~IndexableText()
158bool File::IndexableText::operator==(
const IndexableText &other)
const
176class Q_DECL_HIDDEN
File::ImageMediaMetadata::Location::Private
180 Private(
const Private &other);
187File::ImageMediaMetadata::Location::Private::Private()
194File::ImageMediaMetadata::Location::Private::Private(
const Private &other)
195 : latitude(other.latitude)
196 , longitude(other.longitude)
197 , altitude(other.altitude)
201File::ImageMediaMetadata::Location::Location()
206File::ImageMediaMetadata::Location::Location(
const Location &other)
207 : d(new Private(*(other.d)))
211File::ImageMediaMetadata::Location::~Location()
216bool File::ImageMediaMetadata::Location::operator==(
const Location &other)
const
218 GAPI_COMPARE(latitude)
219 GAPI_COMPARE(longitude)
220 GAPI_COMPARE(altitude)
241class Q_DECL_HIDDEN
File::ImageMediaMetadata::Private
245 Private(
const Private &other);
265 float maxApertureValue;
270File::ImageMediaMetadata::Private::Private()
280 , maxApertureValue(-1)
281 , subjectDistance(-1)
285File::ImageMediaMetadata::Private::Private(
const Private &other)
287 , height(other.height)
288 , rotation(other.rotation)
291 , cameraMake(other.cameraMake)
292 , cameraModel(other.cameraModel)
293 , exposureTime(other.exposureTime)
294 , aperture(other.aperture)
295 , flashUsed(other.flashUsed)
296 , focalLength(other.focalLength)
297 , isoSpeed(other.isoSpeed)
298 , meteringMode(other.meteringMode)
299 , sensor(other.sensor)
300 , exposureMode(other.exposureMode)
301 , colorSpace(other.colorSpace)
302 , whiteBalance(other.whiteBalance)
303 , exposureBias(other.exposureBias)
304 , maxApertureValue(other.maxApertureValue)
305 , subjectDistance(other.subjectDistance)
310File::ImageMediaMetadata::ImageMediaMetadata(
const QVariantMap &map)
313 d->width =
map[QStringLiteral(
"width")].toInt();
314 d->height =
map[QStringLiteral(
"height")].toInt();
315 d->rotation =
map[QStringLiteral(
"rotation")].toInt();
316 d->date =
map[QStringLiteral(
"date")].toString();
317 d->cameraMake =
map[QStringLiteral(
"cameraMake")].toString();
318 d->cameraModel =
map[QStringLiteral(
"cameraModel")].toString();
319 d->exposureTime =
map[QStringLiteral(
"exposureTime")].toFloat();
320 d->aperture =
map[QStringLiteral(
"aperture")].toFloat();
321 d->flashUsed =
map[QStringLiteral(
"flashUsed")].toBool();
322 d->focalLength =
map[QStringLiteral(
"focalLength")].toFloat();
323 d->isoSpeed =
map[QStringLiteral(
"isoSpeed")].toInt();
324 d->meteringMode =
map[QStringLiteral(
"meteringMode")].toString();
325 d->sensor =
map[QStringLiteral(
"sensor")].toString();
326 d->exposureMode =
map[QStringLiteral(
"exposureMode")].toString();
327 d->colorSpace =
map[QStringLiteral(
"colorSpace")].toString();
328 d->whiteBalance =
map[QStringLiteral(
"whiteBalance")].toString();
329 d->exposureBias =
map[QStringLiteral(
"exposureBias")].toFloat();
330 d->maxApertureValue =
map[QStringLiteral(
"maxApertureValue")].toFloat();
331 d->subjectDistance =
map[QStringLiteral(
"subjectDistance")].toFloat();
332 d->lens =
map[QStringLiteral(
"lens")].toString();
334 const QVariantMap locationData =
map[QStringLiteral(
"location")].toMap();
336 location->d->latitude = locationData[QStringLiteral(
"latitude")].
toReal();
337 location->d->longitude = locationData[QStringLiteral(
"longitude")].
toReal();
338 location->d->altitude = locationData[QStringLiteral(
"altitude")].
toReal();
341File::ImageMediaMetadata::ImageMediaMetadata(
const ImageMediaMetadata &other)
342 : d(new Private(*(other.d)))
346File::ImageMediaMetadata::~ImageMediaMetadata()
351bool File::ImageMediaMetadata::operator==(
const ImageMediaMetadata &other)
const
355 GAPI_COMPARE(rotation)
356 GAPI_COMPARE_SHAREDPTRS(location)
358 GAPI_COMPARE(cameraMake)
359 GAPI_COMPARE(cameraModel)
360 GAPI_COMPARE(exposureTime)
361 GAPI_COMPARE(aperture)
362 GAPI_COMPARE(flashUsed)
363 GAPI_COMPARE(focalLength)
364 GAPI_COMPARE(isoSpeed)
365 GAPI_COMPARE(meteringMode)
367 GAPI_COMPARE(exposureMode)
368 GAPI_COMPARE(colorSpace)
369 GAPI_COMPARE(whiteBalance)
370 GAPI_COMPARE(exposureBias)
371 GAPI_COMPARE(maxApertureValue)
372 GAPI_COMPARE(subjectDistance)
397QString File::ImageMediaMetadata::date()
const
402QString File::ImageMediaMetadata::cameraMake()
const
404 return d->cameraMake;
407QString File::ImageMediaMetadata::cameraModel()
const
409 return d->cameraModel;
412float File::ImageMediaMetadata::exposureTime()
const
414 return d->exposureTime;
417float File::ImageMediaMetadata::aperture()
const
422bool File::ImageMediaMetadata::flashUsed()
const
427float File::ImageMediaMetadata::focalLength()
const
429 return d->focalLength;
432int File::ImageMediaMetadata::isoSpeed()
const
437QString File::ImageMediaMetadata::meteringMode()
const
439 return d->meteringMode;
442QString File::ImageMediaMetadata::sensor()
const
447QString File::ImageMediaMetadata::exposureMode()
const
449 return d->exposureMode;
452QString File::ImageMediaMetadata::colorSpace()
const
454 return d->colorSpace;
457QString File::ImageMediaMetadata::whiteBalance()
const
459 return d->whiteBalance;
462float File::ImageMediaMetadata::exposureBias()
const
464 return d->exposureBias;
467float File::ImageMediaMetadata::maxApertureValue()
const
469 return d->maxApertureValue;
472int File::ImageMediaMetadata::subjectDistance()
const
474 return d->subjectDistance;
477QString File::ImageMediaMetadata::lens()
const
484class Q_DECL_HIDDEN
File::Thumbnail::Private
488 Private(
const Private &other);
494File::Thumbnail::Private::Private()
498File::Thumbnail::Private::Private(
const Private &other)
504File::Thumbnail::Thumbnail(
const QVariantMap &map)
509 d->mimeType =
map[Fields::MimeType].toString();
512File::Thumbnail::Thumbnail(
const File::Thumbnail &other)
513 : d(new Private(*(other.d)))
517File::Thumbnail::~Thumbnail()
522bool File::Thumbnail::operator==(
const Thumbnail &other)
const
529QImage File::Thumbnail::image()
const
534QString File::Thumbnail::mimeType()
const
541File::Private::Private()
552File::Private::Private(
const Private &other)
586 , webViewLink(other.webViewLink)
587 , iconLink(other.iconLink)
588 , shared(other.shared)
589 , owners(other.owners)
590 , lastModifyingUser(other.lastModifyingUser)
594bool File::operator==(
const File &other)
const
596 if (!Object::operator==(other)) {
604 GAPI_COMPARE_SHAREDPTRS(
labels)
618 GAPI_COMPARE_CONTAINERS(
parents)
632 GAPI_COMPARE(webViewLink)
633 GAPI_COMPARE(iconLink)
635 GAPI_COMPARE_CONTAINERS(owners)
636 GAPI_COMPARE_SHAREDPTRS(lastModifyingUser)
640FilePtr File::Private::fromJSON(
const QVariantMap &map)
642 if (!
map.contains(File::Fields::Kind) || map[File::Fields::Kind].toString() !=
QLatin1StringView(
"drive#file")) {
647 file->setEtag(map[Fields::Etag].
toString());
648 file->d->id =
map[Fields::Id].toString();
649 file->d->selfLink =
map[Fields::SelfLink].toUrl();
650 file->d->title =
map[Fields::Title].toString();
651 file->d->mimeType =
map[Fields::MimeType].toString();
652 file->d->description =
map[Fields::Description].toString();
654 const QVariantMap labelsData =
map[Fields::Labels].toMap();
656 labels->d->starred = labelsData[QStringLiteral(
"starred")].toBool();
657 labels->d->hidden = labelsData[QStringLiteral(
"hidden")].toBool();
658 labels->d->trashed = labelsData[QStringLiteral(
"trashed")].toBool();
659 labels->d->restricted = labelsData[QStringLiteral(
"restricted")].toBool();
660 labels->d->viewed = labelsData[QStringLiteral(
"viewed")].toBool();
667 file->d->downloadUrl =
map[Fields::DownloadUrl].toUrl();
669 const QVariantMap indexableTextData =
map[Fields::IndexableText].toMap();
671 indexableText->d->text = indexableTextData[QStringLiteral(
"text")].toString();
674 const QVariantMap userPermissionData =
map[Fields::UserPermission].toMap();
675 file->d->userPermission = Permission::Private::fromJSON(userPermissionData);
677 file->d->fileExtension =
map[Fields::FileExtension].toString();
678 file->d->md5Checksum =
map[Fields::Md5Checksum].toString();
679 file->d->fileSize =
map[Fields::FileSize].toLongLong();
680 file->d->alternateLink =
map[Fields::AlternateLink].toUrl();
681 file->d->embedLink =
map[Fields::EmbedLink].toUrl();
682 file->d->version =
map[Fields::Version].toLongLong();
685 const QVariantList
parents =
map[Fields::Parents].toList();
687 file->d->parents << ParentReference::Private::fromJSON(parent.toMap());
690 const QVariantMap exportLinksData =
map[Fields::ExportLinks].toMap();
691 QVariantMap::ConstIterator iter = exportLinksData.constBegin();
692 for (; iter != exportLinksData.constEnd(); ++iter) {
693 file->d->exportLinks.insert(iter.key(), iter.value().toUrl());
696 file->d->originalFileName =
map[QStringLiteral(
"originalFileName")].toString();
697 file->d->quotaBytesUsed =
map[QStringLiteral(
"quotaBytesUsed")].toLongLong();
698 file->d->ownerNames =
map[Fields::OwnerNames].toStringList();
699 file->d->lastModifyingUserName =
map[QStringLiteral(
"lastModifyingUserName")].toString();
700 file->d->editable =
map[Fields::Editable].toBool();
701 file->d->writersCanShare =
map[Fields::WritersCanShare].toBool();
702 file->d->thumbnailLink =
map[Fields::ThumbnailLink].toUrl();
704 file->d->webContentLink =
map[Fields::WebContentLink].toUrl();
705 file->d->explicitlyTrashed =
map[Fields::ExplicitlyTrashed].toBool();
707 const QVariantMap imageMetaData =
map[Fields::ImageMediaMetadata].toMap();
710 const QVariantMap thumbnailData =
map[Fields::Thumbnail].toMap();
714 file->d->webViewLink =
map[Fields::WebViewLink].toUrl();
715 file->d->iconLink =
map[Fields::IconLink].toUrl();
716 file->d->shared =
map[Fields::Shared].toBool();
718 const QVariantList ownersList =
map[Fields::Owners].toList();
719 for (
const QVariant &owner : ownersList) {
720 file->d->owners << User::fromJSON(owner.toMap());
723 const QVariantMap lastModifyingUser =
map[Fields::LastModifyingUser].toMap();
724 file->d->lastModifyingUser = User::fromJSON(lastModifyingUser);
735File::File(
const File &other)
737 , d(new Private(*(other.d)))
748 return QStringLiteral(
"application/vnd.google-apps.folder");
783 return d->description;
803 return d->createdDate;
808 return d->modifiedDate;
818 return d->modifiedByMeDate;
823 return d->downloadUrl;
828 return d->indexableText;
833 return d->userPermission;
838 return d->fileExtension;
843 return d->md5Checksum;
853 return d->alternateLink;
868 return d->sharedWithMeDate;
883 return d->exportLinks;
888 return d->originalFileName;
893 return d->quotaBytesUsed;
898 return d->ownerNames;
903 return d->lastModifyingUserName;
913 return d->writersCanShare;
918 return d->thumbnailLink;
923 return d->lastViewedByMeDate;
933 return d->webContentLink;
938 return d->explicitlyTrashed;
943 return d->imageMediaMetadata;
951QUrl File::webViewLink()
const
953 return d->webViewLink;
956QUrl File::iconLink()
const
961bool File::shared()
const
971UserPtr File::lastModifyingUser()
const
973 return d->lastModifyingUser;
976bool File::isFolder()
const
981const QString File::Fields::Kind = QStringLiteral(
"kind");
982const QString File::Fields::Items = QStringLiteral(
"items");
983const QString File::Fields::NextLink = QStringLiteral(
"nextLink");
984const QString File::Fields::NextPageToken = QStringLiteral(
"nextPageToken");
985const QString File::Fields::SelfLink = QStringLiteral(
"selfLink");
986const QString File::Fields::Etag = QStringLiteral(
"etag");
987const QString File::Fields::Id = QStringLiteral(
"id");
988const QString File::Fields::Title = QStringLiteral(
"title");
989const QString File::Fields::MimeType = QStringLiteral(
"mimeType");
990const QString File::Fields::Description = QStringLiteral(
"description");
991const QString File::Fields::Labels = QStringLiteral(
"labels");
992const QString File::Fields::CreatedDate = QStringLiteral(
"createdDate");
993const QString File::Fields::ModifiedDate = QStringLiteral(
"modifiedDate");
994const QString File::Fields::ModifiedByMeDate = QStringLiteral(
"modifiedByMeDate");
995const QString File::Fields::DownloadUrl = QStringLiteral(
"downloadUrl");
996const QString File::Fields::IndexableText = QStringLiteral(
"indexableText");
997const QString File::Fields::UserPermission = QStringLiteral(
"userPermission");
998const QString File::Fields::FileExtension = QStringLiteral(
"fileExtension");
999const QString File::Fields::Md5Checksum = QStringLiteral(
"md5Checksum");
1000const QString File::Fields::FileSize = QStringLiteral(
"fileSize");
1001const QString File::Fields::AlternateLink = QStringLiteral(
"alternateLink");
1002const QString File::Fields::EmbedLink = QStringLiteral(
"embedLink");
1003const QString File::Fields::SharedWithMeDate = QStringLiteral(
"sharedWithMeDate");
1004const QString File::Fields::Parents = QStringLiteral(
"parents");
1005const QString File::Fields::ExportLinks = QStringLiteral(
"exportLinks");
1006const QString File::Fields::OriginalFilename = QStringLiteral(
"originalFilename");
1007const QString File::Fields::OwnerNames = QStringLiteral(
"ownerNames");
1008const QString File::Fields::LastModifiedByMeDate = QStringLiteral(
"lastModifiedByMeDate");
1009const QString File::Fields::Editable = QStringLiteral(
"editable");
1010const QString File::Fields::WritersCanShare = QStringLiteral(
"writersCanShare");
1011const QString File::Fields::ThumbnailLink = QStringLiteral(
"thumbnailLink");
1012const QString File::Fields::LastViewedByMeDate = QStringLiteral(
"lastViewedByMeDate");
1013const QString File::Fields::WebContentLink = QStringLiteral(
"webContentLink");
1014const QString File::Fields::ExplicitlyTrashed = QStringLiteral(
"explicitlyTrashed");
1015const QString File::Fields::ImageMediaMetadata = QStringLiteral(
"imageMediaMetadata");
1016const QString File::Fields::Thumbnail = QStringLiteral(
"thumbnail");
1017const QString File::Fields::WebViewLink = QStringLiteral(
"webViewLink");
1018const QString File::Fields::IconLink = QStringLiteral(
"iconLink");
1019const QString File::Fields::Shared = QStringLiteral(
"shared");
1020const QString File::Fields::Owners = QStringLiteral(
"owners");
1021const QString File::Fields::LastModifyingUser = QStringLiteral(
"lastModifyingUser");
1022const QString File::Fields::AppDataContents = QStringLiteral(
"appDataContents");
1023const QString File::Fields::OpenWithLinks = QStringLiteral(
"openWithLinks");
1024const QString File::Fields::DefaultOpenWithLink = QStringLiteral(
"defaultOpenWithLink");
1025const QString File::Fields::HeadRevisionId = QStringLiteral(
"headRevisionId");
1026const QString File::Fields::Copyable = QStringLiteral(
"copyable");
1027const QString File::Fields::Properties = QStringLiteral(
"properties");
1028const QString File::Fields::MarkedViewedByMeDate = QStringLiteral(
"markedViewedByMeDate");
1029const QString File::Fields::Version = QStringLiteral(
"version");
1030const QString File::Fields::SharingUser = QStringLiteral(
"sharingUser");
1031const QString File::Fields::Permissions = QStringLiteral(
"permissions");
1040 return Private::fromJSON(data.
toMap());
1043FilePtr File::fromJSON(
const QVariantMap &jsonData)
1045 if (jsonData.isEmpty()) {
1048 return Private::fromJSON(jsonData);
1058 const QVariantMap
map = data.
toMap();
1059 if (!
map.contains(File::Fields::Kind) || map[Fields::Kind].toString() !=
QLatin1StringView(
"drive#fileList")) {
1064 const QVariantList items =
map[File::Fields::Items].toList();
1065 for (
const QVariant &item : items) {
1066 const FilePtr file = Private::fromJSON(item.toMap());
1073 if (
map.contains(File::Fields::NextLink)) {
1085 if (!file->description().isEmpty()) {
1086 map[Fields::Description] = file->description();
1089 if (file->indexableText() && !file->indexableText()->text().isEmpty()) {
1091 indexableText[QStringLiteral(
"text")] = file->indexableText()->text();
1095 if (file->labels()) {
1097 labels[QStringLiteral(
"hidden")] = file->labels()->hidden();
1098 labels[QStringLiteral(
"restricted")] = file->labels()->restricted();
1099 labels[QStringLiteral(
"starred")] = file->labels()->starred();
1100 labels[QStringLiteral(
"trashed")] = file->labels()->trashed();
1101 labels[QStringLiteral(
"viewed")] = file->labels()->viewed();
1105 if (file->lastViewedByMeDate().isValid()) {
1106 map[Fields::LastViewedByMeDate] = file->lastViewedByMeDate().toString(
Qt::ISODate);
1109 if (!file->mimeType().isEmpty()) {
1110 map[Fields::MimeType] = file->mimeType();
1113 if (file->modifiedDate().isValid()) {
1114 map[Fields::ModifiedDate] = file->modifiedDate().toString(
Qt::ISODate);
1117 map[Fields::CreatedDate] = file->createdDate().toString(
Qt::ISODate);
1119 if (file->modifiedByMeDate().isValid()) {
1120 map[Fields::ModifiedByMeDate] = file->modifiedByMeDate().toString(
Qt::ISODate);
1123 if (file->fileSize() > 0) {
1124 map[Fields::FileSize] = file->fileSize();
1127 if (!file->title().isEmpty()) {
1128 map[Fields::Title] = file->title();
1132 const auto parentReferences = file->parents();
1135 parents << ParentReference::Private::toJSON(parent);
1140 if (!file->etag().isEmpty()) {
1141 map[Fields::Etag] = file->etag();
1143 if (!file->d->id.isEmpty()) {
1144 map[Fields::Id] = file->d->id;
1146 if (!file->d->selfLink.isEmpty()) {
1147 map[Fields::SelfLink] = file->d->selfLink;
1149 if (!file->d->downloadUrl.isEmpty()) {
1150 map[Fields::DownloadUrl] = file->d->downloadUrl;
1153 if (!file->d->fileExtension.isEmpty()) {
1154 map[Fields::FileExtension] = file->d->fileExtension;
1156 if (!file->d->md5Checksum.isEmpty()) {
1157 map[Fields::Md5Checksum] = file->d->md5Checksum;
1159 if (!file->d->alternateLink.isEmpty()) {
1160 map[Fields::AlternateLink] = file->d->alternateLink;
1162 if (!file->d->embedLink.isEmpty()) {
1163 map[Fields::EmbedLink] = file->d->embedLink;
1165 if (!file->d->sharedWithMeDate.isNull()) {
1166 map[Fields::SharedWithMeDate] = file->d->sharedWithMeDate.toString(
Qt::ISODate);
1169 if (!file->d->originalFileName.isEmpty()) {
1170 map[QStringLiteral(
"originalFileName")] = file->d->originalFileName;
1172 if (file->d->quotaBytesUsed > 0) {
1173 map[QStringLiteral(
"quotaBytesUsed")] = file->d->quotaBytesUsed;
1175 if (!file->d->ownerNames.isEmpty()) {
1176 map[Fields::OwnerNames] =
QVariant(file->d->ownerNames);
1178 if (!file->d->lastModifyingUserName.isEmpty()) {
1179 map[QStringLiteral(
"lastModifyingUserName")] = file->d->lastModifyingUserName;
1181 if (!file->d->editable) {
1182 map[Fields::Editable] = file->d->editable;
1184 if (file->d->writersCanShare) {
1185 map[Fields::WritersCanShare] = file->d->writersCanShare;
1187 if (!file->d->thumbnailLink.isEmpty()) {
1188 map[Fields::ThumbnailLink] = file->d->thumbnailLink;
1190 if (!file->d->lastViewedByMeDate.isNull()) {
1191 map[Fields::LastViewedByMeDate] = file->d->lastViewedByMeDate.toString(
Qt::ISODate);
1193 if (!file->d->webContentLink.isEmpty()) {
1194 map[Fields::WebContentLink] = file->d->webContentLink;
1196 if (file->d->explicitlyTrashed) {
1197 map[Fields::ExplicitlyTrashed] = file->d->explicitlyTrashed;
1200 if (!file->d->webViewLink.isEmpty()) {
1201 map[Fields::WebViewLink] = file->d->webViewLink;
1203 if (!file->d->iconLink.isEmpty()) {
1204 map[Fields::IconLink] = file->d->iconLink;
1206 if (file->d->shared) {
1207 map[Fields::Shared] = file->d->shared;
1212 file->d->userPermission = Permission::Private::fromJSON(userPermissionData);
1217 file->d->parents << ParentReference::Private::fromJSON(parent.toMap());
1221 QVariantMap::ConstIterator iter = exportLinksData.constBegin();
1222 for ( ; iter != exportLinksData.constEnd(); ++iter) {
1223 file->d->exportLinks.insert(iter.key(), iter.value().toUrl());
1228 file->d->imageMediaMetadata =
1237 for (
const QVariant &owner : ownersList) {
1238 file->d->owners << User::fromJSON(owner.toMap());
1242 file->d->lastModifyingUser = User::fromJSON(lastModifyingUser);
DriveFile::IndexableText holds the structure used for indexableText property.
QString text() const
Returns the text to be indexed for this file.
void setText(const QString &text)
Sets the text to be indexed for this file.
DriveFile::Labels holds the structure used for labels property.
bool trashed() const
Returns whether this file has been trashed.
bool starred() const
Returns whether this file is starred by the user.
void setStarred(bool starred)
Sets whether this file is starred by the user.
bool viewed() const
Returns whether this file has been viewed by this user.
void setRestricted(bool restricted)
Sets whether viewers are prevented from downloading this file.
void setViewed(bool viewed)
Sets whether this file has been viewed by this user.
bool restricted() const
Returns whether viewers are prevented from downloading this file.
void setTrashed(bool trashed)
Sets whether this file has been trashed.
KGAPIDRIVE_DEPRECATED void setHidden(bool hidden)
Sets whether this file has the 'hidden' label set.
KGAPIDRIVE_DEPRECATED bool hidden() const
Returns whether this file has the 'hidden' label set.
File contains metadata for a file.
qlonglong version() const
Returns the version of the file;.
void setLabels(const LabelsPtr &labels)
Sets a group of labels for the file.
QString fileExtension() const
Returns the file extension used when downloading this file.
qlonglong quotaBytesUsed() const
Returns the number of quota bytes used by this file.
void setLastViewedByMeDate(const QDateTime &lastViewedByMeDate)
Sets the last time this file was viewed by the user.
QString lastModifyingUserName() const
Returns the name of the last user to modify this file.
ParentReferencesList parents() const
Returns the collection of parent folders which contain this file.
QUrl webContentLink() const
Returns a link for downloading the content of the file in a browser using cookie based authentication...
File::LabelsPtr labels() const
Returns a group of labels for the file.
QMap< QString, QUrl > exportLinks() const
Returns the links for exporting Google Docs to specific formats.
QUrl downloadUrl() const
Returns a short lived download URL for the file.
QString mimeType() const
Returns the MIME type of the file.
void setMimeType(const QString &mimeType)
Sets the MIME type of the file.
QUrl thumbnailLink() const
Returns a link to the file's thumbnail.
@ ExcludeCreationDate
Exclude 'createdDate' entry. This is necessary when renaming URLs.
void setDescription(const QString &description)
Sets a short description of the file.
File::IndexableTextPtr & indexableText()
Returns the indexable text attributes for the file.
QDateTime modifiedDate() const
Returns the last time this file was modified by anyone.
static QString folderMimeType()
Returns mimetype of folders.
void setTitle(const QString &title)
Sets the title of this file.
void setModifiedDate(const QDateTime &modifiedDate)
Sets the last time this file was modified by anyone.
QString originalFileName() const
Returns the original filename if the file was uploaded manually, or the original title if the file wa...
qlonglong fileSize() const
Returns the size of the file in bytes.
QString id() const
Returns the id of the file.
bool editable() const
Returns whether the file can be edited by the current user.
QString md5Checksum() const
Returns an MD5 checksum for the content of this file.
File::ImageMediaMetadataPtr imageMediaMetadata() const
Returns metadata about image media.
QUrl selfLink() const
Returns a link back to this file.
QDateTime sharedWithMeDate() const
Returns the time at which this file was shared with the user.
QDateTime createdDate() const
Returns the create time for this file.
QString description() const
Returns a short description of the file.
QUrl alternateLink() const
Returns a link for opening the file in using a relevant Google editor or viewer.
QDateTime modifiedByMeDate() const
Returns the last time this file was modified by the currently authenticated user.
QStringList ownerNames() const
Return the name(s) of the owner(s) of this file.
PermissionPtr userPermission() const
Returns the permissions for the authenticated user on this file.
void setParents(const ParentReferencesList &parents)
Sets the collection of parent folders which contain this file.
QUrl embedLink() const
Returns a link for embedding the file.
QDateTime lastViewedByMeDate() const
Returns the last time this file was viewed by the user.
ThumbnailPtr thumbnail() const
Returns thumbnail for the file.
bool explicitlyTrashed() const
Returns whether this file has been explicitly trashed, as opposed to recursively trashed.
QString title() const
Returns the title of this file.
bool writersCanShare() const
Returns whether writers can share the document with other users.
Structure to store additional information about a feed.
QUrl nextPageUrl
Link to next page of feed.
Represents a single record about geographical location provided by Google Latitude service.
Base class for all objects.
char * toString(const EngineQuery &query)
KCALUTILS_EXPORT QString mimeType()
A job to fetch a single map tile described by a StaticMapUrl.
QVariant location(const QVariant &res)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
QByteArray fromBase64(const QByteArray &base64, Base64Options options)
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
QImage fromData(QByteArrayView data, const char *format)
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonDocument fromVariant(const QVariant &variant)
bool isNull() const const
QByteArray toJson(JsonFormat format) const const
QVariant toVariant() const const
bool isEmpty() const const
void reserve(qsizetype size)
bool isNull() const const
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
QMap< QString, QVariant > toMap() const const
qreal toReal(bool *ok) const const