Merged in ValentinaZhuravska/valentina/feature (pull request #76)
Added help label to detail mode --HG-- branch : develop
This commit is contained in:
commit
7ec438d9b4
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
|
@ -5,13 +5,18 @@ Inherits=gnome,hicolor
|
||||||
Example=x-directory-normal
|
Example=x-directory-normal
|
||||||
|
|
||||||
#Directories
|
#Directories
|
||||||
Directories=16x16/actions,24x24/actions,32x32/actions,32x32/emblems
|
Directories=16x16/actions,16x16/status,24x24/actions,32x32/actions,32x32/emblems
|
||||||
|
|
||||||
[16x16/actions]
|
[16x16/actions]
|
||||||
Size=16
|
Size=16
|
||||||
Context=Actions
|
Context=Actions
|
||||||
Type=Fixed
|
Type=Fixed
|
||||||
|
|
||||||
|
[16x16/status]
|
||||||
|
Size=16
|
||||||
|
Context=Status
|
||||||
|
Type=Fixed
|
||||||
|
|
||||||
[24x24/actions]
|
[24x24/actions]
|
||||||
Size=24
|
Size=24
|
||||||
Context=Actions
|
Context=Actions
|
||||||
|
|
|
@ -80,5 +80,6 @@
|
||||||
<file alias="16x16/actions/go-previous.png">icons/win.icon.theme/16x16/actions/go-previous.png</file>
|
<file alias="16x16/actions/go-previous.png">icons/win.icon.theme/16x16/actions/go-previous.png</file>
|
||||||
<file alias="24x24/actions/go-previous.png">icons/win.icon.theme/24x24/actions/go-previous.png</file>
|
<file alias="24x24/actions/go-previous.png">icons/win.icon.theme/24x24/actions/go-previous.png</file>
|
||||||
<file alias="32x32/actions/go-previous.png">icons/win.icon.theme/32x32/actions/go-previous.png</file>
|
<file alias="32x32/actions/go-previous.png">icons/win.icon.theme/32x32/actions/go-previous.png</file>
|
||||||
|
<file alias="16x16/status/dialog-warning.png">icons/win.icon.theme/16x16/status/dialog-warning.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -455,14 +455,27 @@ void DialogDetail::ScrollDown()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
bool DialogDetail::DetailIsValid() const
|
bool DialogDetail::DetailIsValid() const
|
||||||
{
|
{
|
||||||
|
const QIcon icon = QIcon::fromTheme("dialog-warning",
|
||||||
|
QIcon(":/icons/win.icon.theme/16x16/status/dialog-warning.png"));
|
||||||
|
|
||||||
|
const QPixmap pixmap = icon.pixmap(QSize(16, 16));
|
||||||
|
QByteArray byteArray;
|
||||||
|
QBuffer buffer(&byteArray);
|
||||||
|
pixmap.save(&buffer, "PNG");
|
||||||
|
QString url = QString("<img src=\"data:image/png;base64,") + byteArray.toBase64() + "\"/>";
|
||||||
|
|
||||||
if (ui.listWidget->count() < 3)
|
if (ui.listWidget->count() < 3)
|
||||||
{
|
{
|
||||||
|
url += QString(" ") + tr("You need more points!");
|
||||||
|
ui.helpLabel->setText(url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (FirstPointEqualLast())
|
if (FirstPointEqualLast())
|
||||||
{
|
{
|
||||||
|
url += QString(" ") +tr("First point can not equal the last point!");
|
||||||
|
ui.helpLabel->setText(url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -474,11 +487,14 @@ bool DialogDetail::DetailIsValid() const
|
||||||
|
|
||||||
if (QString::compare(previousRow, nextRow) == 0)
|
if (QString::compare(previousRow, nextRow) == 0)
|
||||||
{
|
{
|
||||||
|
url += QString(" ") +tr("You have double points!");
|
||||||
|
ui.helpLabel->setText(url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ui.helpLabel->setText(tr("Ready!"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -390,6 +390,19 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="helpLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ready!</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::RichText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user