Paste image from clipboard.

This commit is contained in:
Jim Evins
2017-03-11 15:02:16 -05:00
parent 79c5dcde81
commit fe1aa77799
5 changed files with 55 additions and 1 deletions
+25
View File
@@ -119,6 +119,31 @@ namespace glabels
}
///
/// Image Property Default Setter
///
void LabelModelImageObject::setImage( const QImage& value )
{
if ( !value.isNull() )
{
if ( mImage )
{
delete mImage;
}
if ( mSvg )
{
delete mSvg;
}
mImage = new QImage(value);
quint16 cs = qChecksum( (const char*)mImage->constBits(), mImage->byteCount() );
mFilenameNode = TextNode( false, QString("%image_%1%").arg( cs ) );
emit changed();
}
}
///
/// naturalSize Property Getter (assumes 72 DPI, i.e. 1pixel == 1pt)
///