#include <QGraphicsTextItem>
#include <QGraphicsPixmapItem>
#include <QGraphicsRectItem>
+#include <QDomElement>
#include <KDebug>
{
public:
- DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0) {}
+ DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0), m_command(QString("jump title 1")), m_backToMenu(false) {}
enum { Type = UserType + 1 };
- void setTarget(int t) {
+ void setTarget(int t, QString c) {
m_target = t;
+ m_command = c;
}
int target() const {
return m_target;
}
+ QString command() const {
+ return m_command;
+ }
+ bool backMenu() const {
+ return m_backToMenu;
+ }
int type() const {
// Enable the use of qgraphicsitem_cast with this item.
return Type;
}
+ void setBackMenu(bool back) {
+ m_backToMenu = back;
+ }
private:
int m_target;
-
+ QString m_command;
+ bool m_backToMenu;
protected:
bool createMenu() const;
void createBackgroundImage(const QString &img1);
void createButtonImages(const QString &img1, const QString &img2, const QString &img3);
- void setTargets(QStringList list);
- QMap <int, QRect> buttonsInfo();
+ void setTargets(QStringList list, QStringList targetlist);
+ QMap <QString, QRect> buttonsInfo();
bool menuMovie() const;
QString menuMoviePath() const;
bool isPalMenu() const;
+ void changeProfile(bool isPal);
+ QDomElement toXml() const;
+ void loadXml(QDomElement xml);
private:
Ui::DvdWizardMenu_UI m_view;
bool m_isPal;
DvdScene *m_scene;
- DvdButton *m_button;
QGraphicsPixmapItem *m_background;
QGraphicsRectItem *m_color;
QGraphicsRectItem *m_safeRect;
int m_width;
int m_height;
- QStringList m_targets;
private slots:
void buildButton();
void buildImage();
void checkBackground();
void checkBackgroundType(int ix);
- void changeProfile(int ix);
void updatePreview();
void buttonChanged();
void addButton();
void deleteButton();
void updateColor();
void updateColor(QColor c);
+ void setBackToMenu(bool backToMenu);
};
#endif