X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdvdwizardmenu.h;h=85522e72ea3f4b907dd0341a058a6747a1ae22be;hb=8391434d0cdba5bc4c00afea00eb426d1f8a3e22;hp=3854d8b950c8d713587a4484fb8ab60b55b31aec;hpb=9ad93a6f43ea95f4f43acd9bdd226ec2253621e1;p=kdenlive diff --git a/src/dvdwizardmenu.h b/src/dvdwizardmenu.h index 3854d8b9..85522e72 100644 --- a/src/dvdwizardmenu.h +++ b/src/dvdwizardmenu.h @@ -61,6 +61,18 @@ private: int m_height; }; +class DvdButtonUnderline : public QGraphicsRectItem +{ + +public: + DvdButtonUnderline( const QRectF & rect, QGraphicsItem * parent = 0 ) : QGraphicsRectItem(rect, parent) {} + + int type() const { + // Enable the use of qgraphicsitem_cast with this item. + return UserType + 2; + } +}; + class DvdButton : public QGraphicsTextItem { @@ -101,11 +113,11 @@ protected: virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) { if (change == ItemPositionChange && scene()) { - QPointF newPos = value.toPointF(); + QPoint newPos = value.toPoint(); QRectF sceneShape = sceneBoundingRect(); DvdScene *sc = static_cast < DvdScene * >(scene()); - newPos.setX(qMax(newPos.x(), (qreal)0)); - newPos.setY(qMax(newPos.y(), (qreal)0)); + newPos.setX(qMax(newPos.x(), 0)); + newPos.setY(qMax(newPos.y(), 0)); if (newPos.x() + sceneShape.width() > sc->width()) newPos.setX(sc->width() - sceneShape.width()); if (newPos.y() + sceneShape.height() > sc->height()) newPos.setY(sc->height() - sceneShape.height()); @@ -134,8 +146,8 @@ public: virtual ~DvdWizardMenu(); virtual bool isComplete() const; bool createMenu() const; - void createBackgroundImage(const QString &overlayMenu, const QString &img1); - void createButtonImages(const QString &img1, const QString &img2, const QString &img3, bool letterbox = false); + void createBackgroundImage(const QString &img1, bool letterbox); + void createButtonImages(const QString &selected_image, const QString &highlighted_image, bool letterbox); void setTargets(QStringList list, QStringList targetlist); QMap buttonsInfo(bool letterbox = false); bool loopMovie() const; @@ -144,7 +156,7 @@ public: int menuMovieLength() const; void changeProfile(DVDFORMAT format); QDomElement toXml() const; - void loadXml(QDomElement xml); + void loadXml(DVDFORMAT format, QDomElement xml); void prepareUnderLines(); void resetUnderLines();