#include "metadatadialog.h" #include #include #include #include "metadatamodel.h" MetadataDialog::MetadataDialog(QWidget *parent) : QDialog(parent) , m_treeView(new QTreeView(this)) { // m_treeView->setRootIsDecorated(false); m_treeView->setIndentation(0); setWindowTitle(tr("Image Metadata")); QDialogButtonBox * buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); setLayout(new QVBoxLayout); layout()->addWidget(m_treeView); layout()->addWidget(buttonBox); connect(buttonBox, &QDialogButtonBox::close, this, &QDialog::close); } MetadataDialog::~MetadataDialog() { } void MetadataDialog::setMetadataModel(MetadataModel * model) { m_treeView->setModel(model); m_treeView->expandAll(); } QSize MetadataDialog::sizeHint() const { return QSize(520, 350); }