diff options
author | Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> | 2011-09-07 12:00:12 +0200 |
---|---|---|
committer | Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> | 2011-09-07 12:14:02 +0200 |
commit | bc661ed43e10e88976d2227217bbbba527e1890a (patch) | |
tree | 15561b91e1d34aca928bf21d97533b8fd83a9bfa /src/mimetypes/qserviceaction.h | |
parent | 4c86d3472bb21e96da68d30677d2500811245274 (diff) |
Cleanup work to match Qt habits.
Change-Id: I6f177c05ac464e13096ed9d517736e0b06773f66
Reviewed-on: http://codereview.qt.nokia.com/4340
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
Diffstat (limited to 'src/mimetypes/qserviceaction.h')
-rw-r--r-- | src/mimetypes/qserviceaction.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/mimetypes/qserviceaction.h b/src/mimetypes/qserviceaction.h new file mode 100644 index 0000000..5fa2e3a --- /dev/null +++ b/src/mimetypes/qserviceaction.h @@ -0,0 +1,45 @@ +#ifndef SERVICE_ACTION_H_INCLUDED +#define SERVICE_ACTION_H_INCLUDED + +#include <QtCore/QScopedPointer> + +class QServiceActionPrivate; + +class QString; + +// ------------------------------------------------------------------------------------------------ + +// A temporary solution in case the type changes until the final release: +typedef QString QServiceActionName; + +// ------------------------------------------------------------------------------------------------ + +class QServiceAction +{ +public: + QServiceAction(); + QServiceAction(const QServiceActionName &theName, + const QString &theDisplayName, + const QString &theIconUrl); + QServiceAction(const QServiceAction &other); + QServiceAction &operator=(const QServiceAction &other); + ~QServiceAction(); + + bool operator==(const QServiceAction &other) const; + + inline bool operator!=(const QServiceAction &other) const + { + return !operator==(other); + } + + bool isValid() const; + + const QServiceActionName &name() const; + QString displayName() const; + QString iconUrl() const; + +private: + QScopedPointer<QServiceActionPrivate> d_ptr; +}; + +#endif |