]> Some of my projects - anidbudpclient.git/commitdiff
Add method to read the vote as double.
authorAPTX <marek321@gmail.com>
Wed, 23 May 2012 22:18:43 +0000 (00:18 +0200)
committerAPTX <marek321@gmail.com>
Wed, 23 May 2012 22:18:43 +0000 (00:18 +0200)
votecommand.cpp
votecommand.h

index 8e9cc50b5d3fb09802fcd691a26e5d8c124721b8..f14b7dbe8159173afed5c973a8702b206e89d11f 100644 (file)
@@ -188,6 +188,11 @@ int VoteReply::value() const
        return m_value;
 }
 
+double VoteReply::vote() const
+{
+       return double(m_value) / 1000;
+}
+
 AniDBUdpClient::VoteCommand::VoteType VoteReply::voteType() const
 {
        return m_voteType;
index cfed933866bc41448079adaa2f82f5605dd1d263..1ee16163e956c774aef1cf5efc4c6aba1e4f388b 100644 (file)
@@ -72,12 +72,14 @@ class ANIDBUDPCLIENTSHARED_EXPORT VoteReply : public AbstractReply
 
        Q_PROPERTY(QString entityName READ entityName);
        Q_PROPERTY(int value READ value);
+       Q_PROPERTY(double vote READ vote);
 //     Q_PROPERTY(AniDBUdpClient::VoteCommand::VoteType voteType READ voteType);
        Q_PROPERTY(int entityId READ entityId);
 
 public:
        QString entityName() const;
        int value() const;
+       double vote() const;
        VoteCommand::VoteType voteType() const;
        int entityId() const;