#include "meditimgitem.h"
#include "ui_meditimgitem.h"
MEditImgItem::MEditImgItem(QString const & name,QString const & file,bool collection,QWidget *parent) :
QDialog(parent),
ui(new Ui::MEditImgItem)
{
ui->setupUi(this);
if(collection)
{
setWindowTitle(tr("update collection"));
ui->frBook->hide();
ui->txtColName->setText(name);
ui->txtColDir->setText(file);
adjustSize();
setMinimumHeight(height());
setMaximumHeight(height());
}
else
{
setWindowTitle(tr("update map"));
ui->frCol->hide();
ui->txtBookName->setText(name);
ui->txtBookFile->setText(file);
adjustSize();
setMinimumHeight(height());
setMaximumHeight(height());
}
}
MEditImgItem::~MEditImgItem()
{
delete ui;
}
QString MEditImgItem::dir() const
{
return ui->txtColDir->text();
}
QString MEditImgItem::file() const
{
return ui->txtBookFile->text();
}
QString MEditImgItem::colName() const
{
return ui->txtColName->text();
}
QString MEditImgItem::bookName() const
{
return ui->txtBookName->text();
}