changetrackcommand.cpp
movegroupcommand.cpp
dvdwizardvob.cpp
+ dvdwizardmenu.cpp
dvdwizard.cpp
)
if (!url.isEmpty()) m_pageVob->setUrl(url);
- m_width = 720;
- if (m_profile.startsWith("dv_pal")) m_height = 576;
- else m_height = 480;
-
- QWizardPage *page2 = new QWizardPage;
- page2->setTitle(i18n("Create Dvd Menu"));
- m_menu.setupUi(page2);
- m_menu.play_text->setText(i18n("Play"));
- m_scene = new QGraphicsScene(0, 0, m_width, m_height, this);
- m_menu.menu_preview->setScene(m_scene);
-
- // Create color background
- m_color = new QGraphicsRectItem(0, 0, m_width, m_height);
- m_color->setBrush(m_menu.background_color->color());
- m_scene->addItem(m_color);
-
- // create background image
- m_background = new QGraphicsPixmapItem();
- //m_scene->addItem(m_background);
-
- // create menu button
- m_button = new QGraphicsTextItem(m_menu.play_text->text());
- QFont font = m_menu.font_family->currentFont();
- font.setPixelSize(m_menu.font_size->value());
- font.setStyleStrategy(QFont::NoAntialias);
- m_button->setFont(font);
- m_button->setDefaultTextColor(m_menu.text_color->color());
- m_button->setZValue(2);
- m_button->setFlags(QGraphicsItem::ItemIsMovable);
- QRectF r = m_button->sceneBoundingRect();
- m_button->setPos((m_width - r.width()) / 2, (m_height - r.height()) / 2);
- m_scene->addItem(m_button);
-
- // create safe zone rect
- int safeW = m_width / 20;
- int safeH = m_height / 20;
- m_safeRect = new QGraphicsRectItem(safeW, safeH, m_width - 2 * safeW, m_height - 2 * safeH);
- QPen pen(Qt::red);
- pen.setStyle(Qt::DashLine);
- pen.setWidth(3);
- m_safeRect->setPen(pen);
- m_safeRect->setZValue(3);
- m_scene->addItem(m_safeRect);
-
- addPage(page2);
- //m_menu.menu_preview->resize(m_width / 2, m_height / 2);
- m_menu.menu_preview->setSceneRect(0, 0, m_width, m_height);
- QMatrix matrix;
- matrix.scale(0.5, 0.5);
- m_menu.menu_preview->setMatrix(matrix);
- m_menu.menu_preview->setMinimumSize(m_width / 2 + 4, m_height / 2 + 8);
- //m_menu.menu_preview->resizefitInView(0, 0, m_width, m_height);
-
- connect(m_menu.is_color, SIGNAL(toggled(bool)), this, SLOT(checkBackground()));
- connect(m_menu.play_text, SIGNAL(textChanged(const QString &)), this, SLOT(buildButton()));
- connect(m_menu.text_color, SIGNAL(changed(const QColor &)), this, SLOT(buildButton()));
- connect(m_menu.font_size, SIGNAL(valueChanged(int)), this, SLOT(buildButton()));
- connect(m_menu.font_family, SIGNAL(currentFontChanged(const QFont &)), this, SLOT(buildButton()));
- connect(m_menu.background_image, SIGNAL(textChanged(const QString &)), this, SLOT(buildImage()));
- connect(m_menu.background_color, SIGNAL(changed(const QColor &)), this, SLOT(buildColor()));
- connect(m_menu.create_menu, SIGNAL(toggled(bool)), m_menu.menu_box, SLOT(setEnabled(bool)));
- m_menu.menu_box->setEnabled(false);
+ m_pageMenu = new DvdWizardMenu(m_profile, this);
+ m_pageMenu->setTitle(i18n("Create Dvd Menu"));
+ addPage(m_pageMenu);
QWizardPage *page3 = new QWizardPage;
}
DvdWizard::~DvdWizard() {
- delete m_button;
- delete m_color;
- delete m_safeRect;
- delete m_background;
- delete m_scene;
- m_menuFile.remove();
+ // m_menuFile.remove();
}
void DvdWizard::slotPageChanged(int page) {
kDebug() << "// PAGE CHGD: " << page;
if (page == 1) {
- //if (m_vob.vob_1->text().isEmpty()) back();
- }
- if (page == 3) {
+ m_pageMenu->setTargets(m_pageVob->selectedUrls());
+ } else if (page == 2) {
+ m_pageMenu->buttonsInfo();
+ } else if (page == 3) {
KIO::NetAccess::del(KUrl(m_iso.tmp_folder->url().path() + "/DVD"), this);
QTimer::singleShot(300, this, SLOT(generateDvd()));
}
}
-void DvdWizard::buildColor() {
- m_color->setBrush(m_menu.background_color->color());
-}
-
-void DvdWizard::buildImage() {
- if (m_menu.background_image->url().isEmpty()) {
- m_scene->removeItem(m_background);
- return;
- }
- QPixmap pix;
- if (!pix.load(m_menu.background_image->url().path())) {
- m_scene->removeItem(m_background);
- return;
- }
- pix = pix.scaled(m_width, m_height);
- m_background->setPixmap(pix);
- if (!m_menu.is_color->isChecked()) m_scene->addItem(m_background);
-}
-
-void DvdWizard::checkBackground() {
- if (m_menu.is_color->isChecked()) {
- m_scene->addItem(m_color);
- m_scene->removeItem(m_background);
- } else {
- m_scene->addItem(m_background);
- m_scene->removeItem(m_color);
- }
-}
-
-void DvdWizard::buildButton() {
- m_button->setPlainText(m_menu.play_text->text());
- QFont font = m_menu.font_family->currentFont();
- font.setPixelSize(m_menu.font_size->value());
- font.setStyleStrategy(QFont::NoAntialias);
- m_button->setFont(font);
- m_button->setDefaultTextColor(m_menu.text_color->color());
-}
void DvdWizard::generateDvd() {
QListWidgetItem *images = m_status.job_progress->item(0);
images->setIcon(KIcon("system-run"));
qApp->processEvents();
+ QMap <int, QRect> buttons = m_pageMenu->buttonsInfo();
+ QStringList buttonsTarget;
- if (m_menu.create_menu->isChecked()) {
-
- QImage img(m_width, m_height, QImage::Format_ARGB32);
- QPainter p(&img);
- m_scene->removeItem(m_safeRect);
- m_scene->removeItem(m_color);
- m_scene->removeItem(m_background);
- m_scene->render(&p, QRectF(0, 0, m_width, m_height));
- p.end();
- img.setNumColors(4);
- img.save(temp1.fileName());
-
- m_button->setDefaultTextColor(m_menu.selected_color->color());
- p.begin(&img);
- m_scene->render(&p, QRectF(0, 0, m_width, m_height));
- p.end();
- img.setNumColors(4);
- img.save(temp2.fileName());
-
- m_button->setDefaultTextColor(m_menu.highlighted_color->color());
- p.begin(&img);
- m_scene->render(&p, QRectF(0, 0, m_width, m_height));
- p.end();
- img.setNumColors(4);
- img.save(temp3.fileName());
-
- m_scene->removeItem(m_button);
- if (m_menu.is_color->isChecked()) m_scene->addItem(m_color);
- else m_scene->addItem(m_background);
-
-
- p.begin(&img);
- m_scene->render(&p, QRectF(0, 0, m_width, m_height));
- p.end();
- img.save(temp4.fileName());
+ if (m_pageMenu->createMenu()) {
+ m_pageMenu->createButtonImages(temp1.fileName(), temp2.fileName(), temp3.fileName());
+ m_pageMenu->createBackgroundImage(temp4.fileName());
images->setIcon(KIcon("dialog-ok"));
kDebug() << "/// STARTING MLT VOB CREATION";
+ if (!m_pageMenu->menuMovie()) {
+ // create menu vob file
+ QListWidgetItem *vobitem = m_status.job_progress->item(1);
+ vobitem->setIcon(KIcon("system-run"));
+ qApp->processEvents();
+
+ QStringList args;
+ args.append("-profile");
+ if (m_pageMenu->isPalMenu()) args.append("dv_pal");
+ else args.append("dv_ntsc");
+ args.append(temp4.fileName());
+ args.append("in=0");
+ args.append("out=100");
+ args << "-consumer" << "avformat:" + temp5.fileName();
+ if (m_pageMenu->isPalMenu()) {
+ args << "f=dvd" << "vcodec=mpeg2video" << "acodec=ac3" << "b=5000k" << "maxrate=8000k" << "minrate=0" << "bufsize=1835008" << "mux_packet_s=2048" << "mux_rate=10080000" << "ab=192k" << "ar=48000" << "s=720x576" << "g=15" << "me_range=63" << "trellis=1" << "profile=dv_pal";
+ } else {
+ args << "f=dvd" << "vcodec=mpeg2video" << "acodec=ac3" << "b=6000k" << "maxrate=9000k" << "minrate=0" << "bufsize=1835008" << "mux_packet_s=2048" << "mux_rate=10080000" << "ab=192k" << "ar=48000" << "s=720x480" << "g=18" << "me_range=63" << "trellis=1" << "profile=dv_ntsc";
+ }
- // create menu vob file
- QListWidgetItem *vobitem = m_status.job_progress->item(1);
- vobitem->setIcon(KIcon("system-run"));
- qApp->processEvents();
-
- QStringList args;
- args.append("-profile");
- args.append(m_profile);
- args.append(temp4.fileName());
- args.append("in=0");
- args.append("out=100");
- args << "-consumer" << "avformat:" + temp5.fileName();
- if (m_profile == "dv_pal") {
- args << "f=dvd" << "vcodec=mpeg2video" << "acodec=ac3" << "b=5000k" << "maxrate=8000k" << "minrate=0" << "bufsize=1835008" << "mux_packet_s=2048" << "mux_rate=10080000" << "ab=192k" << "ar=48000" << "s=720x576" << "g=15" << "me_range=63" << "trellis=1" << "profile=dv_pal";
- } else if (m_profile == "dv_ntsc") {
- args << "f=dvd" << "vcodec=mpeg2video" << "acodec=ac3" << "b=6000k" << "maxrate=9000k" << "minrate=0" << "bufsize=1835008" << "mux_packet_s=2048" << "mux_rate=10080000" << "ab=192k" << "ar=48000" << "s=720x480" << "g=18" << "me_range=63" << "trellis=1" << "profile=dv_ntsc";
- } else if (m_profile == "dv_pal_wide") {
- args << "f=dvd" << "vcodec=mpeg2video" << "acodec=ac3" << "b=5000k" << "maxrate=8000k" << "minrate=0" << "bufsize=1835008" << "mux_packet_s=2048" << "mux_rate=10080000" << "ab=192k" << "ar=48000" << "s=720x576" << "g=15" << "me_range=63" << "trellis=1" << "profile=dv_pal_wide";
- } else if (m_profile == "dv_ntsc_wide") {
- args << "f=dvd" << "vcodec=mpeg2video" << "acodec=ac3" << "b=6000k" << "maxrate=9000k" << "minrate=0" << "bufsize=1835008" << "mux_packet_s=2048" << "mux_rate=10080000" << "ab=192k" << "ar=48000" << "s=720x480" << "g=18" << "me_range=63" << "trellis=1" << "profile=dv_ntsc_wide";
- }
-
- kDebug() << "MLT ARGS: " << args;
- QProcess renderbg;
- renderbg.start("inigo", args);
- if (renderbg.waitForFinished()) {
- if (renderbg.exitStatus() == QProcess::CrashExit) {
- kDebug() << "/// RENDERING MENU vob crashed";
+ kDebug() << "MLT ARGS: " << args;
+ QProcess renderbg;
+ renderbg.start("inigo", args);
+ if (renderbg.waitForFinished()) {
+ if (renderbg.exitStatus() == QProcess::CrashExit) {
+ kDebug() << "/// RENDERING MENU vob crashed";
+ vobitem->setIcon(KIcon("dialog-close"));
+ return;
+ }
+ } else {
+ kDebug() << "/// RENDERING MENU vob timed out";
vobitem->setIcon(KIcon("dialog-close"));
return;
}
- } else {
- kDebug() << "/// RENDERING MENU vob timed out";
- vobitem->setIcon(KIcon("dialog-close"));
- return;
+ vobitem->setIcon(KIcon("dialog-ok"));
}
-
- vobitem->setIcon(KIcon("dialog-ok"));
kDebug() << "/// STARTING SPUMUX";
// create xml spumux file
spu.setAttribute("image", temp1.fileName());
spu.setAttribute("select", temp2.fileName());
spu.setAttribute("highlight", temp3.fileName());
- spu.setAttribute("autooutline", "infer");
+ /*spu.setAttribute("autooutline", "infer");
spu.setAttribute("outlinewidth", "12");
- spu.setAttribute("autoorder", "rows");
+ spu.setAttribute("autoorder", "rows");*/
+
+ int max = buttons.count() - 1;
+ int i = 0;
+ QMapIterator<int, QRect> it(buttons);
+ while (it.hasNext()) {
+ it.next();
+ QDomElement but = doc.createElement("button");
+ but.setAttribute("name", "b" + QString::number(i));
+ if (i < max) but.setAttribute("down", "b" + QString::number(i + 1));
+ else but.setAttribute("down", "b0");
+ if (i > 0) but.setAttribute("up", "b" + QString::number(i - 1));
+ else but.setAttribute("up", "b" + QString::number(max));
+ QRect r = it.value();
+ int target = it.key();
+ // TODO: solve play all button
+ if (target == 0) target = 1;
+ buttonsTarget.append(QString::number(target));
+ but.setAttribute("x0", QString::number(r.x()));
+ but.setAttribute("y0", QString::number(r.y()));
+ but.setAttribute("x1", QString::number(r.right()));
+ but.setAttribute("y1", QString::number(r.bottom()));
+ spu.appendChild(but);
+ i++;
+ }
+
+ kDebug() << "///// SPU: ";
+ kDebug() << doc.toString();
QFile data(temp6.fileName());
if (data.open(QFile::WriteOnly)) {
kDebug() << " SPUMUX DATA: " << doc.toString();
- args.clear();
+ QStringList args;
args.append(temp6.fileName());
- kDebug() << "SPM ARGS: " << args;
+ kDebug() << "SPM ARGS: " << args << temp5.fileName() << m_menuFile.fileName();
QProcess spumux;
- spumux.setStandardInputFile(temp5.fileName());
+
+ if (m_pageMenu->menuMovie()) spumux.setStandardInputFile(m_pageMenu->menuMoviePath());
+ else spumux.setStandardInputFile(temp5.fileName());
spumux.setStandardOutputFile(m_menuFile.fileName());
spumux.start("spumux", args);
spumux.setProcessChannelMode(QProcess::MergedChannels);
dvddoc.appendChild(auth);
QDomElement vmgm = dvddoc.createElement("vmgm");
auth.appendChild(vmgm);
- if (m_menu.create_menu->isChecked()) {
+
+ if (m_pageMenu->createMenu() && !m_pageVob->introMovie().isEmpty()) {
+ // intro movie
QDomElement menus = dvddoc.createElement("menus");
vmgm.appendChild(menus);
QDomElement pgc = dvddoc.createElement("pgc");
+ pgc.setAttribute("entry", "title");
menus.appendChild(pgc);
- QDomElement button = dvddoc.createElement("button");
- QDomText nametext = dvddoc.createTextNode("jump title 1;");
- button.appendChild(nametext);
- pgc.appendChild(button);
QDomElement menuvob = dvddoc.createElement("vob");
- menuvob.setAttribute("file", m_menuFile.fileName());
- menuvob.setAttribute("pause", "inf");
+ menuvob.setAttribute("file", m_pageVob->introMovie());
pgc.appendChild(menuvob);
+ QDomElement post = dvddoc.createElement("post");
+ QDomText call = dvddoc.createTextNode("jump titleset 1 menu;");
+ post.appendChild(call);
+ pgc.appendChild(post);
}
QDomElement titleset = dvddoc.createElement("titleset");
auth.appendChild(titleset);
+
+ if (m_pageMenu->createMenu()) {
+
+ // DVD main menu
+ QDomElement menus = dvddoc.createElement("menus");
+ titleset.appendChild(menus);
+ QDomElement pgc = dvddoc.createElement("pgc");
+ pgc.setAttribute("entry", "root");
+ menus.appendChild(pgc);
+ for (int i = 0; i < buttons.count(); i++) {
+ QDomElement button = dvddoc.createElement("button");
+ button.setAttribute("name", "b" + QString::number(i));
+ QDomText nametext = dvddoc.createTextNode("jump title " + buttonsTarget.at(i) + ";");
+ button.appendChild(nametext);
+ pgc.appendChild(button);
+ }
+ QDomElement menuvob = dvddoc.createElement("vob");
+ menuvob.setAttribute("file", m_menuFile.fileName());
+ menuvob.setAttribute("pause", "inf");
+ pgc.appendChild(menuvob);
+ }
+
QDomElement titles = dvddoc.createElement("titles");
titleset.appendChild(titles);
+
+ QStringList voburls = m_pageVob->selectedUrls();
+
QDomElement pgc2 = dvddoc.createElement("pgc");
titles.appendChild(pgc2);
- if (m_menu.create_menu->isChecked()) {
+ if (m_pageMenu->createMenu()) {
QDomElement post = dvddoc.createElement("post");
- QDomText call = dvddoc.createTextNode("call vmgm menu 1;");
+ QDomText call = dvddoc.createTextNode("call menu;");
post.appendChild(call);
pgc2.appendChild(post);
}
- QStringList voburls = m_pageVob->selectedUrls();
+
for (int i = 0; i < voburls.count(); i++) {
if (!voburls.at(i).isEmpty()) {
// Add vob entry
}
}
+ /*
+ // create one pgc for each video
+ for (int i = 0; i < voburls.count(); i++) {
+ if (!voburls.at(i).isEmpty()) {
+ // Add vob entry
+
+ QDomElement pgc2 = dvddoc.createElement("pgc");
+ titles.appendChild(pgc2);
+ if (m_pageMenu->createMenu()) {
+ QDomElement post = dvddoc.createElement("post");
+ QDomText call = dvddoc.createTextNode("call vmgm menu 1;");
+ post.appendChild(call);
+ pgc2.appendChild(post);
+ }
+
+ QDomElement vob = dvddoc.createElement("vob");
+ vob.setAttribute("file", voburls.at(i));
+ pgc2.appendChild(vob);
+ }
+ }
+ */
QFile data2(m_authorFile.fileName());
if (data2.open(QFile::WriteOnly)) {
QTextStream out(&data2);
void DvdWizard::slotIsoFinished(int exitCode, QProcess::ExitStatus status) {
QListWidgetItem *isoitem = m_status.job_progress->item(4);
if (status == QProcess::CrashExit) {
- m_authorFile.remove();
- m_menuFile.remove();
+ //m_authorFile.remove();
+ //m_menuFile.remove();
KIO::NetAccess::del(KUrl(m_iso.tmp_folder->url().path() + "/DVD"), this);
kDebug() << "Iso process crashed";
isoitem->setIcon(KIcon("dialog-close"));
}
isoitem->setIcon(KIcon("dialog-ok"));
kDebug() << "ISO IMAGE " << m_iso.iso_image->url().path() << " Successfully created";
- m_authorFile.remove();
- m_menuFile.remove();
+ //m_authorFile.remove();
+ //m_menuFile.remove();
KIO::NetAccess::del(KUrl(m_iso.tmp_folder->url().path() + "/DVD"), this);
KMessageBox::information(this, i18n("Dvd iso image %1 successfully created.", m_iso.iso_image->url().path()));
#include <QVBoxLayout>
#include <QItemDelegate>
#include <QPainter>
-#include <QGraphicsScene>
-#include <QGraphicsTextItem>
-#include <QGraphicsPixmapItem>
-#include <QGraphicsRectItem>
#include <QProcess>
#include <KTemporaryFile>
#include "dvdwizardvob.h"
-#include "ui_dvdwizardmenu_ui.h"
+#include "dvdwizardmenu.h"
#include "ui_dvdwizardiso_ui.h"
#include "ui_dvdwizardstatus_ui.h"
private:
DvdWizardVob *m_pageVob;
- Ui::DvdWizardMenu_UI m_menu;
+ DvdWizardMenu *m_pageMenu;
Ui::DvdWizardIso_UI m_iso;
Ui::DvdWizardStatus_UI m_status;
-
QString m_profile;
- QGraphicsScene *m_scene;
- QGraphicsTextItem *m_button;
- QGraphicsPixmapItem *m_background;
- QGraphicsRectItem *m_color;
- QGraphicsRectItem *m_safeRect;
- int m_width;
- int m_height;
KTemporaryFile m_menuFile;
KTemporaryFile m_authorFile;
private slots:
- void buildButton();
- void buildColor();
- void buildImage();
- void checkBackground();
void slotPageChanged(int page);
void slotRenderFinished(int exitCode, QProcess::ExitStatus status);
void slotIsoFinished(int exitCode, QProcess::ExitStatus status);
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ ***************************************************************************/
+
+
+#include <KDebug>
+
+#include "dvdwizardmenu.h"
+
+DvdWizardMenu::DvdWizardMenu(const QString &profile, QWidget *parent): QWizardPage(parent) {
+ m_view.setupUi(this);
+ m_view.play_text->setText(i18n("Play"));
+ m_scene = new DvdScene(this);
+ m_view.menu_preview->setScene(m_scene);
+
+ connect(m_view.create_menu, SIGNAL(toggled(bool)), m_view.menu_box, SLOT(setEnabled(bool)));
+ connect(m_view.create_menu, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
+
+ m_view.add_button->setIcon(KIcon("document-new"));
+ m_view.delete_button->setIcon(KIcon("trash-empty"));
+
+ // TODO: re-enable add button options
+ m_view.add_button->setVisible(false);
+ m_view.delete_button->setVisible(false);
+
+ m_view.menu_profile->addItems(QStringList() << i18n("Pal") << i18n("Ntsc"));
+
+ if (profile == "dv_ntsc" || profile == "dv_ntsc_wide") {
+ m_view.menu_profile->setCurrentIndex(1);
+ m_isPal = false;
+ } else m_isPal = true;
+
+ // Create color background
+ m_color = new QGraphicsRectItem(0, 0, m_width, m_height);
+ m_color->setBrush(m_view.background_color->color());
+ m_color->setZValue(2);
+ m_scene->addItem(m_color);
+
+
+ // create background image
+ m_background = new QGraphicsPixmapItem();
+ m_background->setZValue(3);
+ //m_scene->addItem(m_background);
+
+ // create safe zone rect
+ int safeW = m_width / 20;
+ int safeH = m_height / 20;
+ m_safeRect = new QGraphicsRectItem(safeW, safeH, m_width - 2 * safeW, m_height - 2 * safeH);
+ QPen pen(Qt::red);
+ pen.setStyle(Qt::DashLine);
+ pen.setWidth(3);
+ m_safeRect->setPen(pen);
+ m_safeRect->setZValue(5);
+ m_scene->addItem(m_safeRect);
+
+ changeProfile(m_view.menu_profile->currentIndex());
+ checkBackgroundType(0);
+
+ connect(m_view.menu_profile, SIGNAL(activated(int)), this, SLOT(changeProfile(int)));
+
+ // create menu button
+ DvdButton *button = new DvdButton(m_view.play_text->text());
+ QFont font = m_view.font_family->currentFont();
+ font.setPixelSize(m_view.font_size->value());
+ font.setStyleStrategy(QFont::NoAntialias);
+ button->setFont(font);
+ button->setDefaultTextColor(m_view.text_color->color());
+ button->setZValue(4);
+ button->setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+ QRectF r = button->sceneBoundingRect();
+ m_scene->addItem(button);
+ button->setPos((m_width - r.width()) / 2, (m_height - r.height()) / 2);
+ button->setSelected(true);
+
+
+ //m_view.menu_preview->resizefitInView(0, 0, m_width, m_height);
+
+ connect(m_view.play_text, SIGNAL(textChanged(const QString &)), this, SLOT(buildButton()));
+ connect(m_view.text_color, SIGNAL(changed(const QColor &)), this, SLOT(updateColor()));
+ connect(m_view.font_size, SIGNAL(valueChanged(int)), this, SLOT(buildButton()));
+ connect(m_view.font_family, SIGNAL(currentFontChanged(const QFont &)), this, SLOT(buildButton()));
+ connect(m_view.background_image, SIGNAL(textChanged(const QString &)), this, SLOT(buildImage()));
+ connect(m_view.background_color, SIGNAL(changed(const QColor &)), this, SLOT(buildColor()));
+
+ connect(m_view.background_list, SIGNAL(activated(int)), this, SLOT(checkBackgroundType(int)));
+
+ connect(m_view.target_list, SIGNAL(activated(int)), this, SLOT(setButtonTarget(int)));
+
+ connect(m_view.add_button, SIGNAL(pressed()), this, SLOT(addButton()));
+ connect(m_view.delete_button, SIGNAL(pressed()), this, SLOT(deleteButton()));
+ connect(m_scene, SIGNAL(selectionChanged()), this, SLOT(buttonChanged()));
+ connect(m_scene, SIGNAL(changed(const QList<QRectF> &)), this, SIGNAL(completeChanged()));
+
+ m_view.menu_box->setEnabled(false);
+
+}
+
+DvdWizardMenu::~DvdWizardMenu() {
+ delete m_color;
+ delete m_safeRect;
+ delete m_background;
+ delete m_scene;
+}
+
+// virtual
+
+bool DvdWizardMenu::isComplete() const {
+ if (!m_view.create_menu->isChecked()) return true;
+ QList <int> targets;
+ QList<QGraphicsItem *> list = m_scene->items();
+ int buttonCount = 0;
+ // check that the menu buttons don't collide
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
+ buttonCount++;
+ DvdButton *button = static_cast < DvdButton* >(list.at(i));
+ QList<QGraphicsItem *> collisions = button->collidingItems();
+ if (!collisions.isEmpty()) {
+ for (int j = 0; j < collisions.count(); j++) {
+ if (list.at(j)->type() == button->type()) return false;
+ }
+ }
+ targets.append(button->target());
+ }
+ }
+ if (buttonCount == 0) return false;
+ // check that we have a "Play all" entry
+ if (targets.contains(0)) return true;
+ // ... or that each video file has a button
+ for (int i = m_view.target_list->count() - 1; i > 0; i--) {
+ if (!targets.contains(i)) return false;
+ }
+ return true;
+}
+
+void DvdWizardMenu::setButtonTarget(int ix) {
+ QList<QGraphicsItem *> list = m_scene->selectedItems();
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
+ DvdButton *button = static_cast < DvdButton* >(list.at(i));
+ button->setTarget(ix);
+ break;
+ }
+ }
+ emit completeChanged();
+}
+
+void DvdWizardMenu::buttonChanged() {
+ QList<QGraphicsItem *> list = m_scene->selectedItems();
+ bool foundButton = false;
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
+ m_view.play_text->blockSignals(true);
+ m_view.font_size->blockSignals(true);
+ m_view.font_family->blockSignals(true);
+ m_view.target_list->blockSignals(true);
+ foundButton = true;
+ m_view.button_box->setEnabled(true);
+ DvdButton *button = static_cast < DvdButton* >(list.at(i));
+ m_view.target_list->setCurrentIndex(button->target());
+ m_view.play_text->setText(button->toPlainText());
+ QFont font = button->font();
+ m_view.font_size->setValue(font.pixelSize());
+ m_view.font_family->setCurrentFont(font);
+ m_view.play_text->blockSignals(false);
+ m_view.font_size->blockSignals(false);
+ m_view.font_family->blockSignals(false);
+ m_view.target_list->blockSignals(false);
+ break;
+ }
+ }
+ if (!foundButton) m_view.button_box->setEnabled(false);
+}
+
+void DvdWizardMenu::addButton() {
+ m_scene->clearSelection();
+ DvdButton *button = new DvdButton(m_view.play_text->text());
+ QFont font = m_view.font_family->currentFont();
+ font.setPixelSize(m_view.font_size->value());
+ font.setStyleStrategy(QFont::NoAntialias);
+ button->setFont(font);
+ button->setDefaultTextColor(m_view.text_color->color());
+ button->setZValue(4);
+ button->setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+ QRectF r = button->sceneBoundingRect();
+ m_scene->addItem(button);
+ button->setPos((m_width - r.width()) / 2, (m_height - r.height()) / 2);
+ button->setSelected(true);
+}
+
+void DvdWizardMenu::deleteButton() {
+ QList<QGraphicsItem *> list = m_scene->selectedItems();
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
+ delete list.at(i);
+ break;
+ }
+ }
+}
+
+void DvdWizardMenu::changeProfile(int ix) {
+ switch (ix) {
+ case 1:
+ m_width = 720;
+ m_height = 480;
+ m_isPal = false;
+ updatePreview();
+ break;
+ default:
+ m_width = 720;
+ m_height = 576;
+ m_isPal = true;
+ updatePreview();
+ break;
+ }
+}
+
+void DvdWizardMenu::updatePreview() {
+ m_scene->setProfile(m_width, m_height);
+ QMatrix matrix;
+ matrix.scale(0.5, 0.5);
+ m_view.menu_preview->setMatrix(matrix);
+ m_view.menu_preview->setMinimumSize(m_width / 2 + 4, m_height / 2 + 8);
+
+ m_color->setRect(0, 0, m_width, m_height);
+
+ int safeW = m_width / 20;
+ int safeH = m_height / 20;
+ m_safeRect->setRect(safeW, safeH, m_width - 2 * safeW, m_height - 2 * safeH);
+}
+
+void DvdWizardMenu::setTargets(QStringList list) {
+ m_targets = QStringList() << i18n("Play All");
+ // TODO: re-enable different targets
+ /*
+ if (list.count() > 1) {
+ m_targets += list;
+ }
+ m_view.target_list->clear();*/
+ m_view.target_list->addItems(m_targets);
+}
+
+void DvdWizardMenu::checkBackgroundType(int ix) {
+ if (ix == 0) {
+ m_view.background_color->setVisible(true);
+ m_view.background_image->setVisible(false);
+ m_scene->removeItem(m_background);
+ } else {
+ m_view.background_color->setVisible(false);
+ m_view.background_image->setVisible(true);
+ if (ix == 1) {
+ m_view.background_image->setFilter("*");
+ m_scene->addItem(m_background);
+ } else {
+ m_scene->removeItem(m_background);
+ m_view.background_image->setFilter("video/mpeg");
+ }
+ }
+}
+
+void DvdWizardMenu::buildColor() {
+ m_color->setBrush(m_view.background_color->color());
+}
+
+void DvdWizardMenu::buildImage() {
+ if (m_view.background_image->url().isEmpty()) {
+ m_scene->removeItem(m_background);
+ return;
+ }
+ QPixmap pix;
+ if (!pix.load(m_view.background_image->url().path())) {
+ m_scene->removeItem(m_background);
+ return;
+ }
+ pix = pix.scaled(m_width, m_height);
+ m_background->setPixmap(pix);
+ if (m_view.background_list->currentIndex() == 1) m_scene->addItem(m_background);
+}
+
+void DvdWizardMenu::checkBackground() {
+ if (m_view.background_list->currentIndex() != 1) {
+ m_scene->removeItem(m_background);
+ } else {
+ m_scene->addItem(m_background);
+ }
+}
+
+void DvdWizardMenu::buildButton() {
+ DvdButton *button = NULL;
+ QList<QGraphicsItem *> list = m_scene->selectedItems();
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
+ button = static_cast < DvdButton* >(list.at(i));
+ break;
+ }
+ }
+ if (button == NULL) return;
+ button->setPlainText(m_view.play_text->text());
+ QFont font = m_view.font_family->currentFont();
+ font.setPixelSize(m_view.font_size->value());
+ font.setStyleStrategy(QFont::NoAntialias);
+ button->setFont(font);
+ button->setDefaultTextColor(m_view.text_color->color());
+}
+
+void DvdWizardMenu::updateColor() {
+ updateColor(m_view.text_color->color());
+ m_view.menu_preview->viewport()->update();
+}
+
+void DvdWizardMenu::updateColor(QColor c) {
+ DvdButton *button = NULL;
+ QList<QGraphicsItem *> list = m_scene->items();
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
+ button = static_cast < DvdButton* >(list.at(i));
+ button->setDefaultTextColor(c);
+ }
+ }
+}
+
+
+void DvdWizardMenu::createButtonImages(const QString &img1, const QString &img2, const QString &img3) {
+ if (m_view.create_menu->isChecked()) {
+ m_scene->clearSelection();
+ QImage img(m_width, m_height, QImage::Format_ARGB32);
+ QPainter p(&img);
+ m_scene->removeItem(m_safeRect);
+ m_scene->removeItem(m_color);
+ m_scene->removeItem(m_background);
+ m_scene->render(&p, QRectF(0, 0, m_width, m_height));
+ p.end();
+ img.setNumColors(4);
+ QImage saved;
+ if (m_view.menu_profile->currentIndex() < 2)
+ saved = img.scaled(720, 576);
+ else saved = img.scaled(720, 480);
+ saved.save(img1);
+
+ updateColor(m_view.selected_color->color());
+ p.begin(&img);
+ m_scene->render(&p, QRectF(0, 0, m_width, m_height));
+ p.end();
+ img.setNumColors(4);
+ if (m_view.menu_profile->currentIndex() < 2)
+ saved = img.scaled(720, 576);
+ else saved = img.scaled(720, 480);
+ saved.save(img2);
+
+
+ updateColor(m_view.highlighted_color->color());
+ p.begin(&img);
+ m_scene->render(&p, QRectF(0, 0, m_width, m_height));
+ p.end();
+ img.setNumColors(4);
+ if (m_view.menu_profile->currentIndex() < 2)
+ saved = img.scaled(720, 576);
+ else saved = img.scaled(720, 480);
+ saved.save(img3);
+
+ updateColor();
+
+ m_scene->addItem(m_safeRect);
+ m_scene->addItem(m_color);
+ if (m_view.background_list->currentIndex() == 1) m_scene->addItem(m_background);
+ }
+}
+
+
+void DvdWizardMenu::createBackgroundImage(const QString &img1) {
+ QImage img;
+ if (m_view.background_list->currentIndex() == 0) {
+ // color background
+ if (m_isPal)
+ img = QImage(768, 576, QImage::Format_ARGB32);
+ else
+ img = QImage(720, 540, QImage::Format_ARGB32);
+ img.fill(m_view.background_color->color().rgb());
+ } else if (m_view.background_list->currentIndex() == 1) {
+ img.load(m_view.background_image->url().path());
+ if (m_isPal) {
+ if (img.width() != 768 || img.height() != 576)
+ img = img.scaled(768, 576, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ } else {
+ if (img.width() != 720 || img.height() != 540)
+ img = img.scaled(720, 540, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+ }
+ } else return;
+ img.save(img1);
+}
+
+bool DvdWizardMenu::createMenu() const {
+ return m_view.create_menu->isChecked();
+}
+
+bool DvdWizardMenu::menuMovie() const {
+ return m_view.background_list->currentIndex() == 2;
+}
+
+QString DvdWizardMenu::menuMoviePath() const {
+ return m_view.background_image->url().path();
+}
+
+
+QMap <int, QRect> DvdWizardMenu::buttonsInfo() {
+ QMap <int, QRect> info;
+ QList<QGraphicsItem *> list = m_scene->items();
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == QGraphicsItem::UserType + 1) {
+ DvdButton *button = static_cast < DvdButton* >(list.at(i));
+ QRect r = list.at(i)->sceneBoundingRect().toRect();
+ // Make sure y1 is not odd (requested by spumux)
+ if (r.height() % 2 == 1) r.setHeight(r.height() + 1);
+ if (r.y() % 2 == 1) r.setY(r.y() - 1);
+ info.insertMulti(button->target(), r);
+ }
+ }
+ return info;
+}
+
+bool DvdWizardMenu::isPalMenu() const {
+ return m_isPal;
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ ***************************************************************************/
+
+
+#ifndef DVDWIZARDMENU_H
+#define DVDWIZARDMENU_H
+
+#include <QWizardPage>
+#include <QGraphicsScene>
+#include <QGraphicsTextItem>
+#include <QGraphicsPixmapItem>
+#include <QGraphicsRectItem>
+
+#include <KDebug>
+
+#include "ui_dvdwizardmenu_ui.h"
+
+class DvdScene : public QGraphicsScene {
+
+public:
+ DvdScene(QObject * parent = 0): QGraphicsScene(parent) {}
+ void setProfile(int width, int height) {
+ m_width = width;
+ m_height = height;
+ setSceneRect(0, 0, m_width, m_height);
+ }
+ int sceneWidth() const {
+ return m_width;
+ }
+ int sceneHeight() const {
+ return m_height;
+ }
+private:
+ int m_width;
+ int m_height;
+};
+
+class DvdButton : public QGraphicsTextItem {
+
+public:
+ DvdButton(const QString & text): QGraphicsTextItem(text), m_target(0) {}
+ enum { Type = UserType + 1 };
+ void setTarget(int t) {
+ m_target = t;
+ }
+ int target() const {
+ return m_target;
+ }
+ int type() const {
+ // Enable the use of qgraphicsitem_cast with this item.
+ return Type;
+ }
+
+private:
+ int m_target;
+
+
+protected:
+
+ virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) {
+ if (change == ItemPositionChange && scene()) {
+
+ /* QList<QGraphicsItem *> list = collidingItems();
+ if (!list.isEmpty()) {
+ for (int i = 0; i < list.count(); i++) {
+ if (list.at(i)->type() == Type) return pos();
+ }
+ }
+ */
+ DvdScene *sc = static_cast < DvdScene * >(scene());
+ QRectF rect = QRectF(0, 0, sc->width(), sc->height());
+ QPointF newPos = value.toPointF();
+ if (!rect.contains(newPos)) {
+ // Keep the item inside the scene rect.
+ newPos.setX(qMin(rect.right(), qMax(newPos.x(), rect.left())));
+ newPos.setY(qMin(rect.bottom(), qMax(newPos.y(), rect.top())));
+ return newPos;
+ }
+ }
+ return QGraphicsItem::itemChange(change, value);
+ }
+
+};
+
+
+class DvdWizardMenu : public QWizardPage {
+ Q_OBJECT
+
+public:
+ DvdWizardMenu(const QString &profile, QWidget * parent = 0);
+ virtual ~DvdWizardMenu();
+ virtual bool isComplete() const;
+ 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();
+ bool menuMovie() const;
+ QString menuMoviePath() const;
+ bool isPalMenu() const;
+
+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 buildColor();
+ void buildImage();
+ void checkBackground();
+ void checkBackgroundType(int ix);
+ void changeProfile(int ix);
+ void updatePreview();
+ void buttonChanged();
+ void addButton();
+ void setButtonTarget(int ix);
+ void deleteButton();
+ void updateColor();
+ void updateColor(QColor c);
+};
+
+#endif
+
result.append(allUrls.at(i)->url().path());
}
}
+ return result;
+}
+
+QString DvdWizardVob::introMovie() const {
+ if (!m_view.use_intro->isChecked()) return QString();
+ return m_view.intro_vob->url().path();
}
void DvdWizardVob::slotCheckVobList(const QString &text) {
virtual bool isComplete() const;
QStringList selectedUrls() const;
void setUrl(const QString &url);
+ QString introMovie() const;
private:
Ui::DvdWizardVob_UI m_view;
<rect>
<x>0</x>
<y>0</y>
- <width>377</width>
- <height>365</height>
+ <width>421</width>
+ <height>454</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
- <layout class="QGridLayout" name="gridLayout_2" >
+ <layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QCheckBox" name="create_menu" >
<property name="text" >
</property>
</widget>
</item>
- <item row="1" column="0" >
+ <item row="1" column="0" colspan="2" >
<widget class="QGroupBox" name="menu_box" >
<property name="title" >
<string/>
</property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" colspan="3" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Play button</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Text</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" colspan="2" >
- <widget class="KLineEdit" name="play_text" />
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Font</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="KIntSpinBox" name="font_size" >
- <property name="minimum" >
- <number>10</number>
- </property>
- <property name="maximum" >
- <number>900</number>
- </property>
- <property name="value" >
- <number>35</number>
- </property>
- </widget>
- </item>
- <item row="2" column="2" >
- <widget class="KFontComboBox" name="font_family" >
- <item>
- <property name="text" >
- <string>Sans Serif</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Serif</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Monospace</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>aakar</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Aksharyogini</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlArabiya</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlBattar</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlHor</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlManzomah</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlMateen</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlMohanad</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlMothnna</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AlYarmook</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Andale Mono</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Ani</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AnjaliOldLipi</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Arab</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Arev Sans</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Arial</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Arial Black</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UKai CN</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UKai HK</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UKai TW</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UKai TW MBE</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UMing CN</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UMing HK</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UMing TW</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>AR PL UMing TW MBE</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Baekmuk Batang</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Baekmuk Dotum</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Baekmuk Gulim</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Baekmuk Headline</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Balker</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Bitstream Charter</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Bitstream Vera Sans</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Bitstream Vera Sans Mono</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Bitstream Vera Serif</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Century Schoolbook L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Chandas</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>cmex10</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>cmmi10</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>cmr10</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>cmsy10</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Comic Sans MS</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Cortoba</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Courier 10 Pitch</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Courier New</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>DejaVu Sans</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>DejaVu Sans Mono</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>DejaVu Serif</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Dimnah</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Dingbats</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Domestic Manners</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Dustismo</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Dustismo Roman</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Dyuthi</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>El Abogado Loco</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Electron</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>flatline</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>FreeMono</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>FreeSans</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>FreeSerif</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Furat</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>gargi</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Garuda</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Gentium</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>GentiumAlt</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Georgia</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Granada</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Graph</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Hani</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Haramain</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Hor</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Impact</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>It wasn't me</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Jamrul</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Japan</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Jet</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Junkyard</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Kalimati</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Kalyani</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Kayrawan</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Kedage</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Khalid</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Kinnari</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Kochi Gothic</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Kochi Mincho</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Liberation Mono</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Liberation Sans</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Liberation Serif</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Likhan</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Bengali</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Gujarati</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Hindi</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Kannada</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Oriya</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Punjabi</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Tamil</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Lohit Telugu</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Loma</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Mallige</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Marked Fool</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Mashq</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Meera</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Metal</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>MgOpen Canonica</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>MgOpen Cosmetica</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>MgOpen Modata</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>MgOpen Moderna</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Mitra Mono</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>msam10</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>msbm10</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Mukti Narrow</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Nada</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Nagham</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Nakula</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Nice</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Nimbus Mono L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Nimbus Roman No9 L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Nimbus Sans L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Norasi</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>OpenSymbol</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>ori1Uni</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Ostorah</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Ouhod</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>padmaa</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>padmaa-Bold.1.1</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Penguin Attack</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Petra</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Phetsarath OT</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Pothana2000</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>progenisis</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Purisa</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Rachana</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>RaghuMalayalam</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Rasheeq</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Rehan</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Rekha</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Saab</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Sahadeva</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Salem</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Samanata</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Samyak Devanagari</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Samyak Gujarati</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Samyak Oriya</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Sarai</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Sawasdee</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Shado</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Sharjah</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Sindbad</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Standard Symbols L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>suruma</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Swift</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TAMu_Kadambri</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TAMu_Kalyani</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TAMu_Maduram</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Tarablus</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Tholoth</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Times New Roman</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TlwgMono</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TlwgTypewriter</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Tlwg Typist</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Tlwg Typo</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Trebuchet MS</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TSCu_Comic</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TSCu_Paranar [macromedia]</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TSCu_Paranar [unknown]</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>TSCu_Times</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Umpush</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>UnBatang</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>UnDotum</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>URW Bookman L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>URW Chancery L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>URW Gothic L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>URW Palladio L</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Vemana2000</string>
- </property>
- </item>
+ <layout class="QGridLayout" name="gridLayout_3" >
+ <item row="0" column="0" colspan="2" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Background</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="KComboBox" name="background_list" >
<item>
<property name="text" >
- <string>Verdana</string>
+ <string>Color</string>
</property>
</item>
<item>
<property name="text" >
- <string>Waree</string>
+ <string>Image</string>
</property>
</item>
<item>
<property name="text" >
- <string>Wargames</string>
+ <string>Video</string>
</property>
</item>
- <item>
- <property name="text" >
- <string>wasy10</string>
- </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="KColorButton" name="background_color" />
+ </item>
+ <item row="2" column="2" >
+ <widget class="KUrlRequester" name="background_image" />
+ </item>
+ <item row="4" column="0" colspan="3" >
+ <widget class="QGroupBox" name="button_box" >
+ <property name="title" >
+ <string>Button</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Text</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <widget class="KLineEdit" name="play_text" />
+ </item>
+ <item row="0" column="3" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Target</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4" >
+ <widget class="KComboBox" name="target_list" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="KIntSpinBox" name="font_size" >
+ <property name="minimum" >
+ <number>10</number>
+ </property>
+ <property name="maximum" >
+ <number>900</number>
+ </property>
+ <property name="value" >
+ <number>35</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" colspan="3" >
+ <widget class="QFontComboBox" name="font_family" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="6" column="0" colspan="3" >
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QToolButton" name="add_button" >
+ <property name="text" >
+ <string>A</string>
+ </property>
+ <property name="popupMode" >
+ <enum>QToolButton::InstantPopup</enum>
+ </property>
+ </widget>
</item>
- <item>
- <property name="text" >
- <string>Webdings</string>
- </property>
+ <item row="1" column="0" >
+ <widget class="QToolButton" name="delete_button" >
+ <property name="text" >
+ <string>D</string>
+ </property>
+ <property name="popupMode" >
+ <enum>QToolButton::InstantPopup</enum>
+ </property>
+ </widget>
</item>
- <item>
- <property name="text" >
- <string>WenQuanYi Zen Hei</string>
- </property>
+ <item row="2" column="0" >
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
</item>
- <item>
- <property name="text" >
- <string>Winks</string>
- </property>
+ <item rowspan="3" row="0" column="1" >
+ <widget class="QGraphicsView" name="menu_preview" />
</item>
- </widget>
+ </layout>
</item>
- <item row="3" column="0" >
+ <item row="5" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
- <string>Colors</string>
+ <string>Button colors</string>
</property>
</widget>
</item>
- <item row="3" column="1" colspan="2" >
+ <item row="5" column="2" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<widget class="KColorButton" name="text_color" >
</item>
</layout>
</item>
- <item row="5" column="0" colspan="2" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Background</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0" colspan="2" >
- <widget class="QRadioButton" name="is_color" >
- <property name="text" >
- <string>Color</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="6" column="2" >
- <widget class="KColorButton" name="background_color" />
- </item>
- <item row="7" column="0" colspan="2" >
- <widget class="QRadioButton" name="radioButton_2" >
- <property name="text" >
- <string>Image</string>
- </property>
- </widget>
- </item>
- <item row="7" column="2" >
- <widget class="KUrlRequester" name="background_image" />
- </item>
- <item row="4" column="0" colspan="3" >
- <widget class="Line" name="line" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="8" column="0" colspan="3" >
- <widget class="QGraphicsView" name="menu_preview" />
- </item>
</layout>
+ <zorder>label</zorder>
+ <zorder>background_list</zorder>
+ <zorder>background_color</zorder>
+ <zorder>background_image</zorder>
+ <zorder>button_box</zorder>
+ <zorder>scale_image</zorder>
+ <zorder>label_5</zorder>
+ <zorder>text_color</zorder>
+ <zorder></zorder>
</widget>
</item>
+ <item row="0" column="1" >
+ <widget class="KComboBox" name="menu_profile" />
+ </item>
</layout>
</widget>
<customwidgets>
<header>kcolorbutton.h</header>
</customwidget>
<customwidget>
- <class>KFontComboBox</class>
- <extends>KComboBox</extends>
- <header>kfontcombobox.h</header>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>