|
|
@ -10,7 +10,7 @@ |
|
|
|
#include "globals/UBGlobals.h" |
|
|
|
#include "globals/UBGlobals.h" |
|
|
|
#include "board/UBBoardController.h" |
|
|
|
#include "board/UBBoardController.h" |
|
|
|
|
|
|
|
|
|
|
|
UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPaletteWidget(parent) |
|
|
|
UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPaletteWidget(parent)
|
|
|
|
{ |
|
|
|
{ |
|
|
|
setObjectName(name); |
|
|
|
setObjectName(name); |
|
|
|
mName = "FeaturesWidget"; |
|
|
|
mName = "FeaturesWidget"; |
|
|
@ -82,7 +82,6 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale |
|
|
|
//pathListView->setMovement( QListView::Static );
|
|
|
|
//pathListView->setMovement( QListView::Static );
|
|
|
|
pathListView->setDragDropMode( QAbstractItemView::DropOnly ); |
|
|
|
pathListView->setDragDropMode( QAbstractItemView::DropOnly ); |
|
|
|
|
|
|
|
|
|
|
|
pathScene = new QGraphicsScene(this); |
|
|
|
|
|
|
|
//pathViewer = new UBFeaturesPathViewer( QPixmap(":images/libpalette/home.png"), controller->getRootPath(), pathScene, this );
|
|
|
|
//pathViewer = new UBFeaturesPathViewer( QPixmap(":images/libpalette/home.png"), controller->getRootPath(), pathScene, this );
|
|
|
|
featureProperties = new UBFeatureProperties(this); |
|
|
|
featureProperties = new UBFeatureProperties(this); |
|
|
|
webView = new UBFeaturesWebView(this); |
|
|
|
webView = new UBFeaturesWebView(this); |
|
|
@ -133,6 +132,15 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale |
|
|
|
this, SLOT( onAddDownloadedFileToLibrary( bool, QUrl, QString,QByteArray ) ) ); |
|
|
|
this, SLOT( onAddDownloadedFileToLibrary( bool, QUrl, QString,QByteArray ) ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBFeaturesWidget::~UBFeaturesWidget() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ( thumbSlider != NULL ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete thumbSlider; |
|
|
|
|
|
|
|
thumbSlider = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool UBFeaturesWidget::eventFilter( QObject *target, QEvent *event ) |
|
|
|
bool UBFeaturesWidget::eventFilter( QObject *target, QEvent *event ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ( target == featuresListView && event->type() == QEvent::Resize ) |
|
|
|
if ( target == featuresListView && event->type() == QEvent::Resize ) |
|
|
@ -444,9 +452,7 @@ void UBFeaturesWidget::currentPathChanged(const QString &path) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBFeaturesWidget::~UBFeaturesWidget() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBFeaturesListView::UBFeaturesListView( QWidget* parent, const char* name )
|
|
|
|
UBFeaturesListView::UBFeaturesListView( QWidget* parent, const char* name )
|
|
|
|
: QListView(parent) |
|
|
|
: QListView(parent) |
|
|
@ -537,15 +543,18 @@ UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget( |
|
|
|
|
|
|
|
|
|
|
|
UBFeaturesWebView::~UBFeaturesWebView() |
|
|
|
UBFeaturesWebView::~UBFeaturesWebView() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(NULL != mpSankoreAPI){ |
|
|
|
if( NULL != mpSankoreAPI ) |
|
|
|
|
|
|
|
{ |
|
|
|
delete mpSankoreAPI; |
|
|
|
delete mpSankoreAPI; |
|
|
|
mpSankoreAPI = NULL; |
|
|
|
mpSankoreAPI = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
if(NULL != mpView){ |
|
|
|
if( NULL != mpView ) |
|
|
|
|
|
|
|
{ |
|
|
|
delete mpView; |
|
|
|
delete mpView; |
|
|
|
mpView = NULL; |
|
|
|
mpView = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
if(NULL != mpLayout){ |
|
|
|
if( NULL != mpLayout ) |
|
|
|
|
|
|
|
{ |
|
|
|
delete mpLayout; |
|
|
|
delete mpLayout; |
|
|
|
mpLayout = NULL; |
|
|
|
mpLayout = NULL; |
|
|
|
} |
|
|
|
} |
|
|
@ -661,6 +670,55 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : |
|
|
|
connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); |
|
|
|
connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBFeatureProperties::~UBFeatureProperties() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ( mpOrigPixmap ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpOrigPixmap; |
|
|
|
|
|
|
|
mpOrigPixmap = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpElement ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpElement; |
|
|
|
|
|
|
|
mpElement = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpThumbnail ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpThumbnail; |
|
|
|
|
|
|
|
mpThumbnail = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpButtonLayout ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpButtonLayout; |
|
|
|
|
|
|
|
mpButtonLayout = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpAddPageButton ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpAddPageButton; |
|
|
|
|
|
|
|
mpAddPageButton = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpSetAsBackgroundButton ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpSetAsBackgroundButton; |
|
|
|
|
|
|
|
mpSetAsBackgroundButton = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpAddToLibButton ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpAddToLibButton; |
|
|
|
|
|
|
|
mpAddToLibButton = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpObjInfoLabel ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpObjInfoLabel; |
|
|
|
|
|
|
|
mpObjInfoLabel = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpObjInfos ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpObjInfos; |
|
|
|
|
|
|
|
mpObjInfos = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBFeatureProperties::resizeEvent( QResizeEvent *event ) |
|
|
|
void UBFeatureProperties::resizeEvent( QResizeEvent *event ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Q_UNUSED(event); |
|
|
|
Q_UNUSED(event); |
|
|
@ -787,19 +845,7 @@ void UBFeatureProperties::onSetAsBackground() |
|
|
|
featuresWidget->getFeaturesController()->addItemAsBackground( *mpElement ); |
|
|
|
featuresWidget->getFeaturesController()->addItemAsBackground( *mpElement ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBFeatureProperties::~UBFeatureProperties() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ( mpOrigPixmap ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpOrigPixmap; |
|
|
|
|
|
|
|
mpOrigPixmap = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ( mpElement ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpElement; |
|
|
|
|
|
|
|
mpElement = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBFeatureItemButton::UBFeatureItemButton(QWidget *parent, const char *name):QPushButton(parent) |
|
|
|
UBFeatureItemButton::UBFeatureItemButton(QWidget *parent, const char *name):QPushButton(parent) |
|
|
|
{ |
|
|
|
{ |
|
|
|