mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-19 12:22:16 +03:00
Add sharedWithMe-related properties to sharemodel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
b687f1b2c2
commit
4fdac399f0
2 changed files with 19 additions and 0 deletions
|
@ -1351,6 +1351,16 @@ QString ShareModel::fileOwnerDisplayName() const
|
||||||
return _fileOwnerDisplayName;
|
return _fileOwnerDisplayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ShareModel::sharedWithMeRemainingTimeString() const
|
||||||
|
{
|
||||||
|
return _sharedWithMeRemainingTimeString;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ShareModel::sharedWithMeExpires() const
|
||||||
|
{
|
||||||
|
return _sharedWithMeExpires;
|
||||||
|
}
|
||||||
|
|
||||||
QVariantList ShareModel::sharees() const
|
QVariantList ShareModel::sharees() const
|
||||||
{
|
{
|
||||||
QVariantList returnSharees;
|
QVariantList returnSharees;
|
||||||
|
|
|
@ -40,6 +40,8 @@ class ShareModel : public QAbstractListModel
|
||||||
Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged)
|
Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged)
|
||||||
Q_PROPERTY(bool displayFileOwner READ displayFileOwner NOTIFY displayFileOwnerChanged)
|
Q_PROPERTY(bool displayFileOwner READ displayFileOwner NOTIFY displayFileOwnerChanged)
|
||||||
Q_PROPERTY(QString fileOwnerDisplayName READ fileOwnerDisplayName NOTIFY fileOwnerDisplayNameChanged)
|
Q_PROPERTY(QString fileOwnerDisplayName READ fileOwnerDisplayName NOTIFY fileOwnerDisplayNameChanged)
|
||||||
|
Q_PROPERTY(bool sharedWithMeExpires READ sharedWithMeExpires NOTIFY sharedWithMeExpiresChanged)
|
||||||
|
Q_PROPERTY(QString sharedWithMeRemainingTimeString READ sharedWithMeRemainingTimeString NOTIFY sharedWithMeRemainingTimeStringChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Roles {
|
enum Roles {
|
||||||
|
@ -130,6 +132,9 @@ public:
|
||||||
|
|
||||||
[[nodiscard]] bool displayFileOwner() const;
|
[[nodiscard]] bool displayFileOwner() const;
|
||||||
[[nodiscard]] QString fileOwnerDisplayName() const;
|
[[nodiscard]] QString fileOwnerDisplayName() const;
|
||||||
|
[[nodiscard]] bool sharedWithMeExpires() const;
|
||||||
|
[[nodiscard]] QString sharedWithMeRemainingTimeString() const;
|
||||||
|
|
||||||
[[nodiscard]] Q_INVOKABLE static QString generatePassword();
|
[[nodiscard]] Q_INVOKABLE static QString generatePassword();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -149,6 +154,8 @@ signals:
|
||||||
void serverAllowsResharingChanged();
|
void serverAllowsResharingChanged();
|
||||||
void displayFileOwnerChanged();
|
void displayFileOwnerChanged();
|
||||||
void fileOwnerDisplayNameChanged();
|
void fileOwnerDisplayNameChanged();
|
||||||
|
void sharedWithMeExpiresChanged();
|
||||||
|
void sharedWithMeRemainingTimeStringChanged();
|
||||||
|
|
||||||
void serverError(const int code, const QString &message) const;
|
void serverError(const int code, const QString &message) const;
|
||||||
void passwordSetError(const QString &shareId, const int code, const QString &message);
|
void passwordSetError(const QString &shareId, const int code, const QString &message);
|
||||||
|
@ -254,6 +261,8 @@ private:
|
||||||
QByteArray _fileRemoteId;
|
QByteArray _fileRemoteId;
|
||||||
bool _displayFileOwner = false;
|
bool _displayFileOwner = false;
|
||||||
QString _fileOwnerDisplayName;
|
QString _fileOwnerDisplayName;
|
||||||
|
bool _sharedWithMeExpires = false;
|
||||||
|
QString _sharedWithMeRemainingTimeString;
|
||||||
|
|
||||||
QSharedPointer<ShareManager> _manager;
|
QSharedPointer<ShareManager> _manager;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue