Exemplo n.º 1
0
void
AttachmentModel::retranslateUi() {
  setHorizontalHeaderLabels(          QStringList{} << QY("Name") << QY("MIME type") << QY("Description") << QY("Attach to") << QY("Source file name") << QY("Directory"));
  Util::setSymbolicColumnNames(*this, QStringList{} <<  Q("name") <<  Q("mimeType")  <<  Q("description") <<  Q("attachTo")  <<  Q("sourceFileName")   <<  Q("directory"));

  for (auto row = 0, numRows = rowCount(); row < numRows; ++row)
    setRowData(itemsForRow(row), *attachmentForRow(row));
}
Exemplo n.º 2
0
void
AttachmentModel::retranslateUi() {
  Util::setDisplayableAndSymbolicColumnNames(*this, {
    { QY("Name"),             Q("name")           },
    { QY("MIME type"),        Q("mimeType")       },
    { QY("Description"),      Q("description")    },
    { QY("Attach to"),        Q("attachTo")       },
    { QY("Source file name"), Q("sourceFileName") },
    { QY("Directory"),        Q("directory")      },
    { QY("Size"),             Q("size")           },
  });

  for (auto row = 0, numRows = rowCount(); row < numRows; ++row)
    setRowData(itemsForRow(row), *attachmentForRow(row));
}
Exemplo n.º 3
0
void
AttachmentModel::attachmentUpdated(Attachment const &attachment) {
  auto row = rowForAttachment(attachment);
  if (-1 != row)
    setRowData(itemsForRow(row), attachment);
}