+void ItemFormatterBase::setPercent(int index, float value)
+{
+ char buf[100];
+ bsnprintf(buf, sizeof(buf), "%.2f%%", value);
+ QString val = buf;
+ QString pix;
+ if (value < 8) {
+ pix = ":images/0p.png";
+ } else if (value < 24) {
+ pix = ":images/16p.png";
+ } else if (value < 40) {
+ pix = ":images/32p.png";
+ } else if (value < 56) {
+ pix = ":images/48p.png";
+ } else if (value < 72) {
+ pix = ":images/64p.png";
+ } else if (value < 88) {
+ pix = ":images/80p.png";
+ } else {
+ pix = ":images/96p.png";
+ }
+ setPixmap(index, QPixmap(pix), val);
+ //setSortValue(index, (int) value);
+ //setBackground(index, Qt::green);
+}
+
+/* By default, the setPixmap implementation with tooltip don't implement
+ * the tooltip stuff
+ */
+void ItemFormatterBase::setPixmap(int index, const QPixmap &pix,
+ const QString & /* tip */)
+{
+ setPixmap(index, pix);
+}
+
+void ItemFormatterBase::setInChanger(int index, const QString &InChanger)
+{
+ setPixmap(index, QPixmap(":images/inflag"+InChanger+".png"));
+ //setSortValue(index, InChanger.toInt() );
+}
+