49 explicit Labels(
const Labels &other);
51 bool operator==(
const Labels &other)
const;
52 bool operator!=(
const Labels &other)
const
54 return !operator==(other);
60 [[nodiscard]]
bool starred()
const;
74#ifndef KGAPIDRIVE_NO_DEPRECATED
75 KGAPIDRIVE_DEPRECATED
bool hidden()
const;
82#ifndef KGAPIDRIVE_NO_DEPRECATED
113 [[nodiscard]]
bool viewed()
const;
125 friend class Private;
126 friend class File::Private;
138 explicit IndexableText(
const IndexableText &other);
139 virtual ~IndexableText();
140 bool operator==(
const IndexableText &other)
const;
141 bool operator!=(
const IndexableText &other)
const
143 return !operator==(other);
159 explicit IndexableText();
163 friend class Private;
164 friend class File::Private;
173 class ImageMediaMetadata
183 explicit Location(
const Location &other);
185 bool operator==(
const Location &other)
const;
186 bool operator!=(
const Location &other)
const
188 return !operator==(other);
211 friend class Private;
212 friend class ImageMediaMetadata;
217 explicit ImageMediaMetadata(
const ImageMediaMetadata &other);
218 virtual ~ImageMediaMetadata();
219 bool operator==(
const ImageMediaMetadata &other)
const;
220 bool operator!=(
const ImageMediaMetadata &other)
const
222 return !operator==(other);
245 [[nodiscard]]
QString date()
const;
247 [[nodiscard]]
QString cameraMake()
const;
249 [[nodiscard]]
QString cameraModel()
const;
251 [[nodiscard]]
float exposureTime()
const;
253 [[nodiscard]]
float aperture()
const;
255 [[nodiscard]]
bool flashUsed()
const;
257 [[nodiscard]]
float focalLength()
const;
259 [[nodiscard]]
int isoSpeed()
const;
261 [[nodiscard]]
QString meteringMode()
const;
263 [[nodiscard]]
QString sensor()
const;
265 [[nodiscard]]
QString exposureMode()
const;
267 [[nodiscard]]
QString colorSpace()
const;
269 [[nodiscard]]
QString whiteBalance()
const;
271 [[nodiscard]]
float exposureBias()
const;
273 [[nodiscard]]
float maxApertureValue()
const;
275 [[nodiscard]]
int subjectDistance()
const;
277 [[nodiscard]]
QString lens()
const;
280 explicit ImageMediaMetadata(
const QVariantMap &jsonMap);
284 friend class Private;
285 friend class File::Private;
293 explicit Thumbnail(
const Thumbnail &other);
294 virtual ~Thumbnail();
295 bool operator==(
const Thumbnail &other)
const;
296 bool operator!=(
const Thumbnail &other)
const
298 return !operator==(other);
301 [[nodiscard]]
QImage image()
const;
303 [[nodiscard]]
QString mimeType()
const;
306 explicit Thumbnail(
const QVariantMap &jsonMap);
310 friend class Private;
311 friend class File::Private;
324 Q_DECLARE_FLAGS(SerializationOptions, SerializationOption)
329 bool operator==(
const File &other)
const;
330 bool operator!=(
const File &other)
const
332 return !operator==(other);
601 [[nodiscard]]
QUrl webViewLink()
const;
603 [[nodiscard]]
QUrl iconLink()
const;
605 [[nodiscard]]
bool shared()
const;
607 [[nodiscard]] UsersList owners()
const;
609 [[nodiscard]] UserPtr lastModifyingUser()
const;
611 [[nodiscard]]
bool isFolder()
const;
619 static const QString NextPageToken;
623 static const QString Description;
625 static const QString CreatedDate;
626 static const QString ModifiedDate;
627 static const QString ModifiedByMeDate;
628 static const QString DownloadUrl;
630 static const QString UserPermission;
631 static const QString FileExtension;
632 static const QString Md5Checksum;
634 static const QString AlternateLink;
635 static const QString EmbedLink;
636 static const QString SharedWithMeDate;
638 static const QString ExportLinks;
639 static const QString OriginalFilename;
640 static const QString OwnerNames;
641 static const QString LastModifiedByMeDate;
643 static const QString WritersCanShare;
644 static const QString ThumbnailLink;
645 static const QString LastViewedByMeDate;
646 static const QString WebContentLink;
647 static const QString ExplicitlyTrashed;
649 static const QString Thumbnail;
650 static const QString WebViewLink;
654 static const QString LastModifyingUser;
655 static const QString AppDataContents;
656 static const QString OpenWithLinks;
657 static const QString DefaultOpenWithLink;
658 static const QString HeadRevisionId;
660 static const QString Properties;
661 static const QString MarkedViewedByMeDate;
663 static const QString SharingUser;
664 static const QString Permissions;
667 static FilePtr fromJSON(
const QByteArray &jsonData);
669 static QByteArray toJSON(
const FilePtr &file, SerializationOptions options = NoOptions);
671 static FilePtr fromJSON(
const QVariantMap &jsonData);
675 friend class Private;
676 friend class Change::Private;
685Q_DECLARE_OPERATORS_FOR_FLAGS(KGAPI2::Drive::File::SerializationOptions)
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.
SerializationOption
JSON serialization options.
@ NoOptions
No option set.
@ 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.
ParentReference contains a reference to a file's parent.
Permission contains a permission for a file.
Structure to store additional information about a feed.
Base class for all objects.
A job to fetch a single map tile described by a StaticMapUrl.