fixed issue 1253

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 17c42091f2
commit bd818d1647
  1. 13
      src/board/UBBoardPaletteManager.cpp
  2. 2
      src/board/UBFeaturesController.cpp
  3. 2
      src/board/UBFeaturesController.h
  4. 20
      src/gui/UBFeaturesWidget.cpp
  5. 2
      src/gui/UBFeaturesWidget.h

@ -94,13 +94,12 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
UBBoardPaletteManager::~UBBoardPaletteManager() UBBoardPaletteManager::~UBBoardPaletteManager()
{ {
delete mAddItemPalette;
if(NULL != mStylusPalette) // mAddedItemPalette is delete automatically because of is parent
{ // that changes depending on the mode
delete mStylusPalette;
mStylusPalette = NULL; // mMainWindow->centralWidget is the parent of mStylusPalette
} // do not delete this here.
} }
void UBBoardPaletteManager::initPalettesPosAtStartup() void UBBoardPaletteManager::initPalettesPosAtStartup()
@ -958,8 +957,8 @@ void UBBoardPaletteManager::changeStylusPaletteOrientation(QVariant var)
// Clean the old palette // Clean the old palette
if(NULL != mStylusPalette) if(NULL != mStylusPalette)
{ {
// TODO : check why this line creates a crash in the application.
delete mStylusPalette; delete mStylusPalette;
mStylusPalette = NULL;
} }
// Create the new palette // Create the new palette

@ -1089,7 +1089,7 @@ UBFeaturesController::~UBFeaturesController()
} }
} }
void UBFeaturesController::assignFeaturesListVeiw(UBFeaturesListView *pList) void UBFeaturesController::assignFeaturesListView(UBFeaturesListView *pList)
{ {
pList->setDragDropMode( QAbstractItemView::DragDrop ); pList->setDragDropMode( QAbstractItemView::DragDrop );
pList->setSelectionMode( QAbstractItemView::ContiguousSelection ); pList->setSelectionMode( QAbstractItemView::ContiguousSelection );

@ -187,7 +187,7 @@ public:
static const QString virtualRootName; static const QString virtualRootName;
void assignFeaturesListVeiw(UBFeaturesListView *pList); void assignFeaturesListView(UBFeaturesListView *pList);
void assignPathListView(UBFeaturesListView *pList); void assignPathListView(UBFeaturesListView *pList);
public: public:

@ -42,7 +42,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name)
controller->assignPathListView(pathListView); controller->assignPathListView(pathListView);
centralWidget = new UBFeaturesCentralWidget(this); centralWidget = new UBFeaturesCentralWidget(this);
controller->assignFeaturesListVeiw(centralWidget->listView()); controller->assignFeaturesListView(centralWidget->listView());
centralWidget->setSliderPosition(UBSettings::settings()->featureSliderPosition->get().toInt()); centralWidget->setSliderPosition(UBSettings::settings()->featureSliderPosition->get().toInt());
//Bottom actionbar for DnD, quick search etc //Bottom actionbar for DnD, quick search etc
@ -430,7 +430,7 @@ void UBFeaturesListView::thumbnailSizeChanged( int value )
} }
UBFeaturesNavigatorWidget::UBFeaturesNavigatorWidget(QWidget *parent, const char *name) : UBFeaturesNavigatorWidget::UBFeaturesNavigatorWidget(QWidget *parent, const char *name) :
QWidget(parent), mListView(0), mListSlder(0) QWidget(parent), mListView(0), mListSlider(0)
{ {
name = "UBFeaturesNavigatorWidget"; name = "UBFeaturesNavigatorWidget";
@ -440,26 +440,26 @@ UBFeaturesNavigatorWidget::UBFeaturesNavigatorWidget(QWidget *parent, const char
mListView = new UBFeaturesListView(this, UBFeaturesWidget::objNameFeatureList); mListView = new UBFeaturesListView(this, UBFeaturesWidget::objNameFeatureList);
mListSlder = new QSlider(Qt::Horizontal, this); mListSlider = new QSlider(Qt::Horizontal, this);
mListSlder->setMinimum(UBFeaturesWidget::minThumbnailSize); mListSlider->setMinimum(UBFeaturesWidget::minThumbnailSize);
mListSlder->setMaximum(UBFeaturesWidget::maxThumbnailSize); mListSlider->setMaximum(UBFeaturesWidget::maxThumbnailSize);
mListSlder->setValue(UBFeaturesWidget::minThumbnailSize); mListSlider->setValue(UBFeaturesWidget::minThumbnailSize);
mListSlder->setMinimumHeight(20); mListSlider->setMinimumHeight(20);
mListView->setParent(this); mListView->setParent(this);
QVBoxLayout *mainLayer = new QVBoxLayout(this); QVBoxLayout *mainLayer = new QVBoxLayout(this);
mainLayer->addWidget(mListView, 1); mainLayer->addWidget(mListView, 1);
mainLayer->addWidget(mListSlder, 0); mainLayer->addWidget(mListSlider, 0);
mainLayer->setMargin(0); mainLayer->setMargin(0);
connect(mListSlder, SIGNAL(valueChanged(int)), mListView, SLOT(thumbnailSizeChanged(int))); connect(mListSlider, SIGNAL(valueChanged(int)), mListView, SLOT(thumbnailSizeChanged(int)));
} }
void UBFeaturesNavigatorWidget::setSliderPosition(int pValue) void UBFeaturesNavigatorWidget::setSliderPosition(int pValue)
{ {
mListSlder->setValue(pValue); mListSlider->setValue(pValue);
} }
UBFeaturesCentralWidget::UBFeaturesCentralWidget(QWidget *parent) : QWidget(parent) UBFeaturesCentralWidget::UBFeaturesCentralWidget(QWidget *parent) : QWidget(parent)

@ -154,7 +154,7 @@ public:
private: private:
UBFeaturesListView *mListView; UBFeaturesListView *mListView;
QSlider *mListSlder; QSlider *mListSlider;
}; };

Loading…
Cancel
Save