|
|
@ -867,7 +867,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : |
|
|
|
, mpButtonLayout(NULL) |
|
|
|
, mpButtonLayout(NULL) |
|
|
|
, mpAddPageButton(NULL) |
|
|
|
, mpAddPageButton(NULL) |
|
|
|
, mpAddToLibButton(NULL) |
|
|
|
, mpAddToLibButton(NULL) |
|
|
|
, mpSetAsBackgroundButton(NULL) |
|
|
|
|
|
|
|
, mpObjInfoLabel(NULL) |
|
|
|
, mpObjInfoLabel(NULL) |
|
|
|
, mpObjInfos(NULL) |
|
|
|
, mpObjInfos(NULL) |
|
|
|
, mpThumbnail(NULL) |
|
|
|
, mpThumbnail(NULL) |
|
|
@ -899,10 +898,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : |
|
|
|
mpAddPageButton->setText(tr("Add to page")); |
|
|
|
mpAddPageButton->setText(tr("Add to page")); |
|
|
|
mpButtonLayout->addWidget(mpAddPageButton); |
|
|
|
mpButtonLayout->addWidget(mpAddPageButton); |
|
|
|
|
|
|
|
|
|
|
|
mpSetAsBackgroundButton = new UBFeatureItemButton(); |
|
|
|
|
|
|
|
mpSetAsBackgroundButton->setText(tr("Set as background")); |
|
|
|
|
|
|
|
mpButtonLayout->addWidget(mpSetAsBackgroundButton); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mpAddToLibButton = new UBFeatureItemButton(); |
|
|
|
mpAddToLibButton = new UBFeatureItemButton(); |
|
|
|
mpAddToLibButton->setText(tr("Add to library")); |
|
|
|
mpAddToLibButton->setText(tr("Add to library")); |
|
|
|
mpButtonLayout->addWidget(mpAddToLibButton); |
|
|
|
mpButtonLayout->addWidget(mpAddToLibButton); |
|
|
@ -924,7 +919,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : |
|
|
|
mpLayout->setMargin(0); |
|
|
|
mpLayout->setMargin(0); |
|
|
|
|
|
|
|
|
|
|
|
connect( mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage()) ); |
|
|
|
connect( mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage()) ); |
|
|
|
connect( mpSetAsBackgroundButton, SIGNAL( clicked() ), this, SLOT( onSetAsBackground() ) ); |
|
|
|
|
|
|
|
connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); |
|
|
|
connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -955,11 +949,6 @@ UBFeatureProperties::~UBFeatureProperties() |
|
|
|
delete mpAddPageButton; |
|
|
|
delete mpAddPageButton; |
|
|
|
mpAddPageButton = NULL; |
|
|
|
mpAddPageButton = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
if ( mpSetAsBackgroundButton ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpSetAsBackgroundButton; |
|
|
|
|
|
|
|
mpSetAsBackgroundButton = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpAddToLibButton ) |
|
|
|
if ( mpAddToLibButton ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
delete mpAddToLibButton; |
|
|
|
delete mpAddToLibButton; |
|
|
@ -1047,26 +1036,10 @@ void UBFeatureProperties::showElement(const UBFeature &elem) |
|
|
|
if ( UBApplication::isFromWeb( elem.getFullPath().toString() ) ) |
|
|
|
if ( UBApplication::isFromWeb( elem.getFullPath().toString() ) ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
mpAddToLibButton->show(); |
|
|
|
mpAddToLibButton->show(); |
|
|
|
if( elem.getMetadata()["Type"].toLower().contains("image") ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mpSetAsBackgroundButton->show(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mpSetAsBackgroundButton->hide(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
mpAddToLibButton->hide(); |
|
|
|
mpAddToLibButton->hide(); |
|
|
|
if (UBFileSystemUtils::mimeTypeFromFileName( elem.getFullPath().toLocalFile() ).contains("image")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mpSetAsBackgroundButton->show(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mpSetAsBackgroundButton->hide(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|