//setSortValue(index, InChanger.toInt() );
}
+void ItemFormatterBase::setFileType(int index, const QString &type)
+{
+ setPixmap(index, QPixmap(":images/"+type+".png"));
+ //setSortValue(index, InChanger.toInt() );
+}
+
void ItemFormatterBase::setTextFld(int index, const QString &fld, bool center)
{
setText(index, fld.trimmed());
}
}
+void ItemFormatterBase::setDateFld(int index, utime_t fld, bool center)
+{
+ char buf[200];
+ bstrutime(buf, sizeof(buf), fld);
+ setText(index, QString(buf).trimmed());
+ if (center) {
+ setTextAlignment(index, Qt::AlignCenter);
+ }
+}
+
void ItemFormatterBase::setRightFld(int index, const QString &fld)
{
setText(index, fld.trimmed());
/* Normal text field. Centers field if center true*/
void setTextFld(int index, const QString &fld, bool center = false);
+ /* Normal date field. Centers field if center true*/
+ void setDateFld(int index, utime_t fld, bool center = false);
+
/* Right-aligned text field. */
void setRightFld(int index, const QString &fld);
/* fld value interpreted as Online/Offline */
void setInChanger(int index, const QString &InChanger);
+ /* fld value interpreted as file or folder */
+ void setFileType(int index, const QString &type);
+
static void setBytesConversion(BYTES_CONVERSION b) {
cnvFlag = b;
}