mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-21 13:14:30 +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
src/gui/filedetails
|
@ -1351,6 +1351,16 @@ QString ShareModel::fileOwnerDisplayName() const
|
|||
return _fileOwnerDisplayName;
|
||||
}
|
||||
|
||||
QString ShareModel::sharedWithMeRemainingTimeString() const
|
||||
{
|
||||
return _sharedWithMeRemainingTimeString;
|
||||
}
|
||||
|
||||
bool ShareModel::sharedWithMeExpires() const
|
||||
{
|
||||
return _sharedWithMeExpires;
|
||||
}
|
||||
|
||||
QVariantList ShareModel::sharees() const
|
||||
{
|
||||
QVariantList returnSharees;
|
||||
|
|
|
@ -40,6 +40,8 @@ class ShareModel : public QAbstractListModel
|
|||
Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged)
|
||||
Q_PROPERTY(bool displayFileOwner READ displayFileOwner NOTIFY displayFileOwnerChanged)
|
||||
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:
|
||||
enum Roles {
|
||||
|
@ -130,6 +132,9 @@ public:
|
|||
|
||||
[[nodiscard]] bool displayFileOwner() const;
|
||||
[[nodiscard]] QString fileOwnerDisplayName() const;
|
||||
[[nodiscard]] bool sharedWithMeExpires() const;
|
||||
[[nodiscard]] QString sharedWithMeRemainingTimeString() const;
|
||||
|
||||
[[nodiscard]] Q_INVOKABLE static QString generatePassword();
|
||||
|
||||
signals:
|
||||
|
@ -149,6 +154,8 @@ signals:
|
|||
void serverAllowsResharingChanged();
|
||||
void displayFileOwnerChanged();
|
||||
void fileOwnerDisplayNameChanged();
|
||||
void sharedWithMeExpiresChanged();
|
||||
void sharedWithMeRemainingTimeStringChanged();
|
||||
|
||||
void serverError(const int code, const QString &message) const;
|
||||
void passwordSetError(const QString &shareId, const int code, const QString &message);
|
||||
|
@ -254,6 +261,8 @@ private:
|
|||
QByteArray _fileRemoteId;
|
||||
bool _displayFileOwner = false;
|
||||
QString _fileOwnerDisplayName;
|
||||
bool _sharedWithMeExpires = false;
|
||||
QString _sharedWithMeRemainingTimeString;
|
||||
|
||||
QSharedPointer<ShareManager> _manager;
|
||||
|
||||
|
|
Loading…
Reference in a new issue