Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.465 kb
#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);
Jump to Line
Something went wrong with that request. Please try again.