diff options
author | jkobus <jaroslaw.kobus@theqtcompany.com> | 2014-12-18 14:59:52 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@theqtcompany.com> | 2015-01-19 16:27:58 +0100 |
commit | 668e053c62d4a2dae5f38e454fac00df74eeeb03 (patch) | |
tree | 6d7f8acffc163c44db404979d0db2d8f624536b5 /src/libs/installer/component_p.h | |
parent | 46b8eb8d6713e0e592c94b090baece0613b2503a (diff) |
Introduce InstallAction property for component
Fixes calculation of component size inside
maintenance tool. Don't manipulate check state
of components while calculating dependencies.
Prepare feature: live preview of dependencies.
Change-Id: I0485df8383bc9149a996456e09878fc5676bb27b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/component_p.h')
-rw-r--r-- | src/libs/installer/component_p.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/libs/installer/component_p.h b/src/libs/installer/component_p.h index 15834d1f2..87e067ba4 100644 --- a/src/libs/installer/component_p.h +++ b/src/libs/installer/component_p.h @@ -93,18 +93,28 @@ class INSTALLER_EXPORT ComponentModelHelper { public: enum Roles { - LocalDisplayVersion = Qt::UserRole + 1, + Action = Qt::UserRole + 1, + LocalDisplayVersion, RemoteDisplayVersion, ReleaseDate, UncompressedSize }; + enum InstallAction { + Install, + Uninstall, + KeepInstalled, + KeepUninstalled + }; + enum Column { NameColumn = 0, + ActionColumn, InstalledVersionColumn, NewVersionColumn, ReleaseDateColumn, - UncompressedSizeColumn + UncompressedSizeColumn, + LastColumn }; explicit ComponentModelHelper(); @@ -125,6 +135,9 @@ public: bool isSelectable() const; void setSelectable(bool selectable); + InstallAction installAction() const; + void setInstallAction(InstallAction action); + Qt::ItemFlags flags() const; void setFlags(Qt::ItemFlags flags); @@ -148,4 +161,6 @@ private: } // namespace QInstaller +Q_DECLARE_METATYPE(QInstaller::ComponentModelHelper::InstallAction) + #endif // COMPONENT_P_H |