Method SetTemplate.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-08-14 20:00:19 +03:00
parent 10e1c2fbfa
commit b9bd1b60e4
2 changed files with 3 additions and 4 deletions

View File

@ -361,7 +361,7 @@ void DialogEditLabel::ImportTemplate()
{
VLabelTemplate ltemplate;
ltemplate.setXMLContent(VLabelTemplateConverter(fileName).Convert());
InitEditLines(ltemplate.ReadLines());
SetTemplate(ltemplate.ReadLines());
}
catch (VException &e)
{
@ -516,7 +516,7 @@ QVector<VLabelTemplateLine> DialogEditLabel::GetTemplate() const
}
//---------------------------------------------------------------------------------------------------------------------
void DialogEditLabel::InitEditLines(const QVector<VLabelTemplateLine> &lines)
void DialogEditLabel::SetTemplate(const QVector<VLabelTemplateLine> &lines)
{
ui->listWidgetEdit->blockSignals(true);
ui->listWidgetEdit->clear();

View File

@ -50,6 +50,7 @@ public:
virtual ~DialogEditLabel();
QVector<VLabelTemplateLine> GetTemplate() const;
void SetTemplate(const QVector<VLabelTemplateLine> &lines);
private slots:
void ShowLineDetails();
@ -78,8 +79,6 @@ private:
QString ReplacePlaceholders(QString line) const;
void InitEditLines(const QVector<VLabelTemplateLine> &lines);
void InitPreviewLines(const QVector<VLabelTemplateLine> &lines);
};