- DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0) {}
- enum { Type = UserType + 1 };
- void setTarget(int t) {
+ 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
+{
+
+public:
+ DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0), m_command(QString("jump title 1")), m_backToMenu(false) {
+ setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+ setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
+ }
+ void setTarget(int t, const QString &c) {