Added similar list to NewLabelDialog.
This commit is contained in:
@@ -42,6 +42,9 @@ namespace gLabels
|
||||
pageSizeUsRadio->isChecked(),
|
||||
pageSizeOtherRadio->isChecked() );
|
||||
|
||||
similarBrowser->setAttribute(Qt::WA_TranslucentBackground);
|
||||
similarBrowser->viewport()->setAutoFillBackground(false);
|
||||
|
||||
connect( searchEntry, SIGNAL(textChanged(const QString &)),
|
||||
this, SLOT(searchEntryTextChanged(const QString &)) );
|
||||
|
||||
@@ -123,6 +126,25 @@ namespace gLabels
|
||||
|
||||
QString layoutString = frame->layoutDescription();
|
||||
layoutLabel->setText( layoutString );
|
||||
|
||||
QStringList list = libglabels::Db::getNameListOfSimilarTemplates( tmplate->name() );
|
||||
if ( list.isEmpty() )
|
||||
{
|
||||
similarLabel->hide();
|
||||
similarBrowser->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
similarLabel->show();
|
||||
similarBrowser->show();
|
||||
|
||||
QString similarListString;
|
||||
foreach ( QString name, list )
|
||||
{
|
||||
similarListString += name + "\n";
|
||||
}
|
||||
similarBrowser->setText( similarListString );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -245,9 +245,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<widget class="QLabel" name="similarLabel">
|
||||
<property name="text">
|
||||
<string>Similar products:</string>
|
||||
<string>Similar to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -261,7 +261,7 @@
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user