X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fqt-console%2Futil%2Ffmtwidgetitem.cpp;h=3971fc5eb7861d6b67afb50edc6321d3807f470d;hb=d76603975728987c18d8dd84c12562fc0805dfc4;hp=348d2b2ef7e7f57428734709ccf581beed30dbfe;hpb=2472f76428fa178bf77e7517dbf70f8d1ea0d89e;p=bacula%2Fbacula diff --git a/bacula/src/qt-console/util/fmtwidgetitem.cpp b/bacula/src/qt-console/util/fmtwidgetitem.cpp index 348d2b2ef7..3971fc5eb7 100644 --- a/bacula/src/qt-console/util/fmtwidgetitem.cpp +++ b/bacula/src/qt-console/util/fmtwidgetitem.cpp @@ -232,6 +232,12 @@ void ItemFormatterBase::setInChanger(int index, const QString &InChanger) //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()); @@ -240,6 +246,16 @@ void ItemFormatterBase::setTextFld(int index, const QString &fld, bool center) } } +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()); @@ -288,6 +304,9 @@ void ItemFormatterBase::setBytesFld(int index, const QString &fld) case BYTES_CONVERSION_SI: msg = convertBytesSI(qfld); break; + default: + msg = " "; + break; } setNumericFld(index, msg, qfld);