diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 011021d9c..eb8dde989 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -350,14 +350,14 @@ private slots: void on_CurrentPiecePositionChanged(); /** - * @brief PieceCarrouselLocationChanged When the Piece Carrousel's location + * @brief PieceCarrouselLocationChanged When the piece carrousel's location * has been changed - * @param area The new area where the Piece Carrousel has been placed + * @param area The new area where the piece carrousel has been placed */ void on_PieceCarrouselLocationChanged(Qt::DockWidgetArea area); /** - * @brief on_PieceSelected When a been has been selected + * @brief on_PieceSelected When a piece has been selected * @param piece the piece that was selected */ void on_PieceSelected(VPuzzlePiece* piece); diff --git a/src/app/puzzle/vpiececarrousellayer.cpp b/src/app/puzzle/vpiececarrousellayer.cpp index 20cecd43d..d00ed6ecb 100644 --- a/src/app/puzzle/vpiececarrousellayer.cpp +++ b/src/app/puzzle/vpiececarrousellayer.cpp @@ -35,7 +35,10 @@ Q_LOGGING_CATEGORY(pCarrouselLayer, "p.carrouselLayer") //--------------------------------------------------------------------------------------------------------------------- -VPieceCarrouselLayer::VPieceCarrouselLayer(VPuzzleLayer *layer, QWidget *parent) : QWidget(parent), m_layer(layer) +VPieceCarrouselLayer::VPieceCarrouselLayer(VPuzzleLayer *layer, QWidget *parent) : + QWidget(parent), + m_layer(layer), + m_carrouselPieces(QList()) { Init(); } diff --git a/src/app/puzzle/vpiececarrouselpiece.cpp b/src/app/puzzle/vpiececarrouselpiece.cpp index ae690b0ae..3ce4771a1 100644 --- a/src/app/puzzle/vpiececarrouselpiece.cpp +++ b/src/app/puzzle/vpiececarrouselpiece.cpp @@ -37,7 +37,9 @@ Q_LOGGING_CATEGORY(pCarrouselPiece, "p.carrouselPiece") //--------------------------------------------------------------------------------------------------------------------- -VPieceCarrouselPiece::VPieceCarrouselPiece(VPuzzlePiece *piece, QWidget *parent) : QFrame(parent), m_piece(piece) +VPieceCarrouselPiece::VPieceCarrouselPiece(VPuzzlePiece *piece, QWidget *parent) : + QFrame(parent), + m_piece(piece) { Init(); } @@ -97,6 +99,7 @@ void VPieceCarrouselPiece::Refresh() // update the graphic view / the scene // TODO / FIXME : not perfect and maybe not the right way, still need to work on this + // for instance: use a painter to habve a better quality, less pixeled. QVector points = m_piece->GetCuttingLine(); QPen pen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); @@ -117,8 +120,8 @@ void VPieceCarrouselPiece::Refresh() QString clippedText = metrix.elidedText(m_piece->GetName(), Qt::ElideRight, width); m_label->setText(clippedText); + // set the tooltip setToolTip(m_piece->GetName()); - } //---------------------------------------------------------------------------------------------------------------------