Skip to content
Snippets Groups Projects
Select Git revision
  • d288cbf5e68b5811be6a15ec81ea86d574e0016d
  • master default protected
  • order_matters
  • code-cleanup
  • fixes
  • v0.3.1
  • v0.3.0
  • v0.2.1
  • v0.2.0
  • v0.1.0
10 results

identicon.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    identicon.h 786 B
    #ifndef IDENTICON_H
    #define IDENTICON_H
    
    #include <QByteArray>
    #include "rendering/icongenerator.h"
    #include "identiconstyle.h"
    #include "rendering/svgrenderer.h"
    #include "rendering/rectangle.h"
    
    class Identicon
    {
    private:
        QByteArray hash_;
        int size_;
        rendering::IconGenerator iconGenerator_;
        IdenticonStyle style_;
        static IdenticonStyle defaultStyle_;
    public:
        Identicon(QByteArray &hash, int size);
        int size() { return size_ ; }
        rendering::Rectangle getIconBounds();
        static Identicon fromHash(QByteArray &hash, int size);
        static Identicon fromHash(QString &hash, int size);
        static QString generateSvg(Identicon &identicon, bool fragment);
        void draw(rendering::Renderer &renderer, rendering::Rectangle &rect);
    
    };
    
    #endif // IDENTICON_H