Skip to content
This repository
tree: a1b8a91b57
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 24 lines (19 sloc) 0.465 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include "tools.h"

#include <QPolygon>
#include <QString>

/*
THANKS TO Slyshyk Oleksly for fixes
*/

QPolygon toPoly(const QList<QPoint>& ps, QPoint center)
{
    QPolygon poly;
    foreach(const QPoint& point, ps)
        poly << center + point;
    return poly;
}

QString time2string(int time)
{
    int mm = time/60;
    int ss = time - mm*60;
    return mm ? QString::number(mm) + ":" + (ss>=10 ? "":"0")+QString::number(ss) : QString::number(ss);
}
Something went wrong with that request. Please try again.