Commit eb9ff9e8 authored by Laurent Montel's avatar Laurent Montel 😁

const'ify, optimization, fix indent

parent 012c9486
......@@ -58,7 +58,6 @@ class SolidVolumeInfo
{
public:
QString path; // mount path of volume, with trailing slash
QString uuid; // UUID as from Solid
QString label; // volume label (think of CDs)
......@@ -193,10 +192,10 @@ signals:
void modifiedClip(const QString &);
void missingClip(const QString &);
void availableClip(const QString &);
void checkAllClips(bool displayRatioChanged, bool fpsChanged, QStringList brokenClips);
void checkAllClips(bool displayRatioChanged, bool fpsChanged, const QStringList &brokenClips);
void displayMessage(const QString &, int);
void thumbReady(const QString &id, int, QImage);
void gotClipPropertyThumbnail(const QString &id, QImage);
void thumbReady(const QString &id, int, const QImage&);
void gotClipPropertyThumbnail(const QString &id, const QImage&);
};
#endif
......@@ -35,7 +35,8 @@ public:
PropertiesViewDelegate(QWidget *parent) : QStyledItemDelegate(parent) {
m_height = parent->fontMetrics().height() * 1.2;
}
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
protected:
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
return QSize(QStyledItemDelegate::sizeHint(option, index).width(), m_height);
}
private:
......@@ -100,12 +101,12 @@ private:
signals:
void addMarkers(const QString &, QList <CommentedTime>);
void deleteProxy(const QString);
void applyNewClipProperties(const QString, QMap <QString, QString> , QMap <QString, QString> , bool, bool);
void deleteProxy(const QString&);
void applyNewClipProperties(const QString&, const QMap <QString, QString> &, const QMap <QString, QString> &, bool, bool);
void saveMarkers(const QString &id);
void loadMarkers(const QString &id);
void editAnalysis(const QString &id, const QString &name, const QString &value);
void requestThumb(const QString id, QList <int> frames);
void requestThumb(const QString &id, const QList <int>& frames);
};
......
......@@ -34,10 +34,10 @@
#include <KFileDialog>
ClipStabilize::ClipStabilize(const QStringList &urls, const QString &filterName,QWidget * parent) :
QDialog(parent),
m_filtername(filterName),
m_urls(urls),
vbox(NULL)
QDialog(parent),
m_filtername(filterName),
m_urls(urls),
vbox(NULL)
{
setFont(KGlobalSettings::toolBarFont());
setupUi(this);
......@@ -53,81 +53,81 @@ ClipStabilize::ClipStabilize(const QStringList &urls, const QString &filterName,
QColor light_bg = scheme.shade(KColorScheme::LightShade);
QString stylesheet(QString("QProgressBar:horizontal {border: 1px solid %1;border-radius:0px;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right: 0px;background:%4;padding: 0px;text-align:left center}\
QProgressBar:horizontal#dragOnly {background: %1} QProgressBar:horizontal:hover#dragOnly {background: %3} QProgressBar:horizontal:hover {border: 1px solid %3;border-right: 0px;}\
QProgressBar::chunk:horizontal {background: %1;} QProgressBar::chunk:horizontal:hover {background: %3;}\
QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %4;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;}\
QAbstractSpinBox#dragBox {border: 1px solid %1;border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QAbstractSpinBox::down-button#dragBox {width:0px;padding:0px;}\
QAbstractSpinBox::up-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %2;} QAbstractSpinBox:hover#dragBox {border: 1px solid %3;} ")
.arg(dark_bg.name()).arg(selected_bg.name()).arg(hover_bg.name()).arg(light_bg.name()));
setStyleSheet(stylesheet);
QProgressBar:horizontal#dragOnly {background: %1} QProgressBar:horizontal:hover#dragOnly {background: %3} QProgressBar:horizontal:hover {border: 1px solid %3;border-right: 0px;}\
QProgressBar::chunk:horizontal {background: %1;} QProgressBar::chunk:horizontal:hover {background: %3;}\
QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %4;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;}\
QAbstractSpinBox#dragBox {border: 1px solid %1;border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QAbstractSpinBox::down-button#dragBox {width:0px;padding:0px;}\
QAbstractSpinBox::up-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %2;} QAbstractSpinBox:hover#dragBox {border: 1px solid %3;} ")
.arg(dark_bg.name()).arg(selected_bg.name()).arg(hover_bg.name()).arg(light_bg.name()));
setStyleSheet(stylesheet);
if (m_urls.count() == 1) {
QString newFile = m_urls.first();
newFile.append(".mlt");
KUrl dest(newFile);
dest_url->setMode(KFile::File);
dest_url->setUrl(KUrl(newFile));
dest_url->fileDialog()->setOperationMode(KFileDialog::Saving);
} else {
label_dest->setText(i18n("Destination folder"));
dest_url->setMode(KFile::Directory);
dest_url->setUrl(KUrl(KUrl(m_urls.first()).directory()));
dest_url->fileDialog()->setOperationMode(KFileDialog::Saving);
}
if (m_urls.count() == 1) {
QString newFile = m_urls.first();
newFile.append(".mlt");
KUrl dest(newFile);
dest_url->setMode(KFile::File);
dest_url->setUrl(KUrl(newFile));
dest_url->fileDialog()->setOperationMode(KFileDialog::Saving);
} else {
label_dest->setText(i18n("Destination folder"));
dest_url->setMode(KFile::Directory);
dest_url->setUrl(KUrl(KUrl(m_urls.first()).directory()));
dest_url->fileDialog()->setOperationMode(KFileDialog::Saving);
}
if (m_filtername=="videostab"){
QStringList ls;
ls << "shutterangle,type,int,value,0,min,0,max,180,tooltip,Angle that Images could be maximum rotated";
fillParameters(ls);
}else if (m_filtername=="videostab2"){
// Some default params have to be set:
m_fixedParams << "algo=1" << "relative=1";
QStringList ls;
ls << "accuracy,type,int,value,8,min,1,max,10,tooltip,Accuracy of Shakiness detection";
ls << "shakiness,type,int,value,4,min,1,max,10,tooltip,How shaky is the Video";
ls << "stepsize,type,int,value,6,min,0,max,100,tooltip,Stepsize of Detection process minimum around";
//ls << "algo,type,bool,value,1,min,0,max,1,tooltip,0 = Bruteforce 1 = small measurement fields";
ls << "mincontrast,type,double,value,0.3,min,0,max,1,factor,1,decimals,2,tooltip,Below this Contrast Field is discarded";
//ls << "show,type,int,value,0,min,0,max,2,tooltip,0 = draw nothing. 1 or 2 show fields and transforms";
ls << "smoothing,type,int,value,10,min,0,max,100,tooltip,number of frames for lowpass filtering";
ls << "maxshift,type,int,value,-1,min,-1,max,1000,tooltip,max number of pixels to shift";
ls << "maxangle,type,double,value,-1,min,-1,max,3.14,decimals,2,tooltip,max angle to rotate (in rad)";
ls << "crop,type,bool,value,0,min,0,max,1,tooltip,0 = keep border 1 = black background";
//ls << "invert,type,bool,value,0,min,0,max,1,tooltip,invert transform";
//ls << "relative,type,bool,value,1,min,0,max,1,tooltip,0 = absolute transform 1= relative";
ls << "zoom,type,int,value,0,min,-500,max,500,tooltip,additional zoom during transform";
ls << "optzoom,type,bool,value,1,min,0,max,1,tooltip,use optimal zoom (calulated from transforms)";
ls << "sharpen,type,double,value,0.8,min,0,max,1,decimals,1,tooltip,sharpen transformed image";
fillParameters(ls);
if (m_filtername=="videostab"){
QStringList ls;
ls << "shutterangle,type,int,value,0,min,0,max,180,tooltip,Angle that Images could be maximum rotated";
fillParameters(ls);
}else if (m_filtername=="videostab2"){
// Some default params have to be set:
m_fixedParams << "algo=1" << "relative=1";
QStringList ls;
ls << "accuracy,type,int,value,8,min,1,max,10,tooltip,Accuracy of Shakiness detection";
ls << "shakiness,type,int,value,4,min,1,max,10,tooltip,How shaky is the Video";
ls << "stepsize,type,int,value,6,min,0,max,100,tooltip,Stepsize of Detection process minimum around";
//ls << "algo,type,bool,value,1,min,0,max,1,tooltip,0 = Bruteforce 1 = small measurement fields";
ls << "mincontrast,type,double,value,0.3,min,0,max,1,factor,1,decimals,2,tooltip,Below this Contrast Field is discarded";
//ls << "show,type,int,value,0,min,0,max,2,tooltip,0 = draw nothing. 1 or 2 show fields and transforms";
ls << "smoothing,type,int,value,10,min,0,max,100,tooltip,number of frames for lowpass filtering";
ls << "maxshift,type,int,value,-1,min,-1,max,1000,tooltip,max number of pixels to shift";
ls << "maxangle,type,double,value,-1,min,-1,max,3.14,decimals,2,tooltip,max angle to rotate (in rad)";
ls << "crop,type,bool,value,0,min,0,max,1,tooltip,0 = keep border 1 = black background";
//ls << "invert,type,bool,value,0,min,0,max,1,tooltip,invert transform";
//ls << "relative,type,bool,value,1,min,0,max,1,tooltip,0 = absolute transform 1= relative";
ls << "zoom,type,int,value,0,min,-500,max,500,tooltip,additional zoom during transform";
ls << "optzoom,type,bool,value,1,min,0,max,1,tooltip,use optimal zoom (calulated from transforms)";
ls << "sharpen,type,double,value,0.8,min,0,max,1,decimals,1,tooltip,sharpen transformed image";
fillParameters(ls);
}
}
connect(buttonBox->button(QDialogButtonBox::Ok),SIGNAL(clicked()), this, SLOT(slotValidate()));
connect(buttonBox->button(QDialogButtonBox::Ok),SIGNAL(clicked()), this, SLOT(slotValidate()));
vbox=new QVBoxLayout(optionsbox);
QHashIterator<QString,QHash<QString,QString> > hi(m_ui_params);
while(hi.hasNext()){
hi.next();
QHash<QString,QString> val=hi.value();
if (val["type"]=="int" || val["type"]=="double"){
DoubleParameterWidget *dbl=new DoubleParameterWidget(hi.key(), val["value"].toDouble(),
val["min"].toDouble(),val["max"].toDouble(),val["value"].toDouble(),
"",0/*id*/,""/*suffix*/,val["decimals"]!=""?val["decimals"].toInt():0,this);
dbl->setObjectName(hi.key());
dbl->setToolTip(val["tooltip"]);
connect(dbl,SIGNAL(valueChanged(double)),this,SLOT(slotUpdateParams()));
vbox->addWidget(dbl);
}else if (val["type"]=="bool"){
QCheckBox *ch=new QCheckBox(hi.key(),this);
ch->setCheckState(val["value"] == "0" ? Qt::Unchecked : Qt::Checked);
ch->setObjectName(hi.key());
connect(ch, SIGNAL(stateChanged(int)) , this,SLOT(slotUpdateParams()));
ch->setToolTip(val["tooltip"]);
vbox->addWidget(ch);
}
}
adjustSize();
vbox=new QVBoxLayout(optionsbox);
QHashIterator<QString,QHash<QString,QString> > hi(m_ui_params);
while(hi.hasNext()){
hi.next();
QHash<QString,QString> val=hi.value();
if (val["type"]=="int" || val["type"]=="double"){
DoubleParameterWidget *dbl=new DoubleParameterWidget(hi.key(), val["value"].toDouble(),
val["min"].toDouble(),val["max"].toDouble(),val["value"].toDouble(),
"",0/*id*/,""/*suffix*/,val["decimals"]!=""?val["decimals"].toInt():0,this);
dbl->setObjectName(hi.key());
dbl->setToolTip(val["tooltip"]);
connect(dbl,SIGNAL(valueChanged(double)),this,SLOT(slotUpdateParams()));
vbox->addWidget(dbl);
}else if (val["type"]=="bool"){
QCheckBox *ch=new QCheckBox(hi.key(),this);
ch->setCheckState(val["value"] == "0" ? Qt::Unchecked : Qt::Checked);
ch->setObjectName(hi.key());
connect(ch, SIGNAL(stateChanged(int)) , this,SLOT(slotUpdateParams()));
ch->setToolTip(val["tooltip"]);
vbox->addWidget(ch);
}
}
adjustSize();
}
ClipStabilize::~ClipStabilize()
......@@ -277,21 +277,21 @@ void ClipStabilize::fillParameters(QStringList lst)
void ClipStabilize::slotValidate()
{
if (m_urls.count() == 1) {
if (QFile::exists(dest_url->url().path())) {
if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", dest_url->url().path() )) == KMessageBox::No) return;
}
if (QFile::exists(dest_url->url().path())) {
if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", dest_url->url().path() )) == KMessageBox::No) return;
}
}
else {
KUrl folder(dest_url->url());
QStringList existingFiles;
foreach(const QString &path, m_urls) {
KUrl dest = folder;
dest.addPath(KUrl(path).fileName());
if (QFile::exists(dest.path() + ".mlt")) existingFiles.append(dest.path() + ".mlt");
}
if (!existingFiles.isEmpty()) {
if (KMessageBox::warningContinueCancelList(this, i18n("The stabilize job will overwrite the following files:"), existingFiles) == KMessageBox::Cancel) return;
}
KUrl folder(dest_url->url());
QStringList existingFiles;
foreach(const QString &path, m_urls) {
KUrl dest = folder;
dest.addPath(KUrl(path).fileName());
if (QFile::exists(dest.path() + ".mlt")) existingFiles.append(dest.path() + ".mlt");
}
if (!existingFiles.isEmpty()) {
if (KMessageBox::warningContinueCancelList(this, i18n("The stabilize job will overwrite the following files:"), existingFiles) == KMessageBox::Cancel) return;
}
}
accept();
}
......
This diff is collapsed.
......@@ -58,8 +58,8 @@ public:
void addTrack(TrackInfo type, int ix = -1);
void removeTrack(int ix);
/** @brief Makes the document use new track infos (name, type, ...). */
void configTracks(QList <TrackInfo> trackInfos);
int cursorPos();
void configTracks(const QList<TrackInfo> &trackInfos);
int cursorPos() const;
void checkAutoScroll();
/**
Move the clip at \c start to \c end.
......@@ -250,7 +250,7 @@ public slots:
/** @brief Shows a dialog for adding a guide.
* @param dialog (default = true) false = do not show the dialog but use current position as position and comment */
void slotAddGuide(bool dialog = true);
void slotEditGuide(CommentedTime guide);
void slotEditGuide(const CommentedTime &guide);
void slotEditGuide(int guidePos = -1);
void slotDeleteGuide(int guidePos = -1);
void slotDeleteAllGuides();
......
......@@ -28,15 +28,15 @@
#include <QDebug>
#include <QTreeWidgetItem>
#include <QtCore/QString>
#include <QtCore/QString>
const int MAXCLIPDURATION = 15000;
namespace Kdenlive {
enum MONITORID { noMonitor, clipMonitor, projectMonitor, recordMonitor, stopmotionMonitor, dvdMonitor };
const int DefaultThumbHeight = 100;
/*const QString clipMonitor("clipMonitor");
enum MONITORID { noMonitor, clipMonitor, projectMonitor, recordMonitor, stopmotionMonitor, dvdMonitor };
const int DefaultThumbHeight = 100;
/*const QString clipMonitor("clipMonitor");
const QString recordMonitor("recordMonitor");
const QString projectMonitor("projectMonitor");
const QString stopmotionMonitor("stopmotionMonitor");*/
......@@ -108,7 +108,7 @@ public:
class TransitionInfo {
public:
/** startPos is the position where the clip starts on the track */
/** startPos is the position where the clip starts on the track */
GenTime startPos;
/** endPos is the duration where the clip ends on the track */
GenTime endPos;
......@@ -153,14 +153,14 @@ public:
{
if (!description.isEmpty() && point.description == description) return true;
return point.frame_rate_num == frame_rate_num &&
point.frame_rate_den == frame_rate_den &&
point.width == width &&
point.height == height &&
point.progressive == progressive &&
point.sample_aspect_num == sample_aspect_num &&
point.sample_aspect_den == sample_aspect_den &&
point.display_aspect_den == display_aspect_den &&
point.colorspace == colorspace;
point.frame_rate_den == frame_rate_den &&
point.width == width &&
point.height == height &&
point.progressive == progressive &&
point.sample_aspect_num == sample_aspect_num &&
point.sample_aspect_den == sample_aspect_den &&
point.display_aspect_den == display_aspect_den &&
point.colorspace == colorspace;
}
bool operator!=(const MltVideoProfile &other) const {
return !(*this == other);
......@@ -183,20 +183,20 @@ public:
QString groupName;
QString toString() const {
QStringList data;
// effect collapsed state: 0 = effect not collapsed, 1 = effect collapsed,
// 2 = group collapsed - effect not, 3 = group and effect collapsed
int collapsedState = (int) isCollapsed;
if (groupIsCollapsed) collapsedState += 2;
data << QString::number(collapsedState) << QString::number(groupIndex) << groupName;
return data.join("/");
// effect collapsed state: 0 = effect not collapsed, 1 = effect collapsed,
// 2 = group collapsed - effect not, 3 = group and effect collapsed
int collapsedState = (int) isCollapsed;
if (groupIsCollapsed) collapsedState += 2;
data << QString::number(collapsedState) << QString::number(groupIndex) << groupName;
return data.join("/");
}
void fromString(QString value) {
if (value.isEmpty()) return;
QStringList data = value.split("/");
isCollapsed = data.at(0).toInt() == 1 || data.at(0).toInt() == 3;
groupIsCollapsed = data.at(0).toInt() >= 2;
if (data.count() > 1) groupIndex = data.at(1).toInt();
if (data.count() > 2) groupName = data.at(2);
if (value.isEmpty()) return;
QStringList data = value.split("/");
isCollapsed = data.at(0).toInt() == 1 || data.at(0).toInt() == 3;
groupIsCollapsed = data.at(0).toInt() >= 2;
if (data.count() > 1) groupIndex = data.at(1).toInt();
if (data.count() > 2) groupName = data.at(2);
}
};
......@@ -232,16 +232,16 @@ public:
return false;
}
void setParamValue(const QString &name, const QString &value) {
bool found = false;
bool found = false;
for (int i = 0; i < size(); ++i)
if (at(i).name() == name) {
// update value
replace(i, EffectParameter(name, value));
found = true;
}
if (!found) addParam(name, value);
// update value
replace(i, EffectParameter(name, value));
found = true;
}
if (!found) addParam(name, value);
}
QString paramValue(const QString &name, const QString &defaultValue = QString()) const {
for (int i = 0; i < size(); ++i) {
if (at(i).name() == name) return at(i).value();
......@@ -278,29 +278,29 @@ public:
c = comm;
}
void setMarkerType(int t) {
type = t;
type = t;
}
int markerType() const {
return type;
return type;
}
static QColor markerColor(int type) {
switch (type) {
case 0:
return Qt::red;
break;
case 1:
return Qt::blue;
break;
case 2:
return Qt::green;
break;
case 3:
return Qt::yellow;
break;
default:
return Qt::cyan;
break;
}
switch (type) {
case 0:
return Qt::red;
break;
case 1:
return Qt::blue;
break;
case 2:
return Qt::green;
break;
case 3:
return Qt::yellow;
break;
default:
return Qt::cyan;
break;
}
}
/* Implementation of > operator; Works identically as with basic types. */
......
......@@ -44,14 +44,14 @@
DragValue::DragValue(const QString &label, double defaultValue, int decimals, double min, double max, int id, const QString &suffix, bool showSlider, QWidget* parent) :
QWidget(parent),
m_maximum(max),
m_minimum(min),
m_decimals(decimals),
m_default(defaultValue),
m_id(id),
m_intEdit(NULL),
m_doubleEdit(NULL)
QWidget(parent),
m_maximum(max),
m_minimum(min),
m_decimals(decimals),
m_default(defaultValue),
m_id(id),
m_intEdit(NULL),
m_doubleEdit(NULL)
{
if (showSlider) setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
else setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding);
......@@ -69,7 +69,7 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
m_label->setStep(1);
m_intEdit = new QSpinBox(this);
m_intEdit->setObjectName("dragBox");
m_intEdit->setFocusPolicy(Qt::StrongFocus);
m_intEdit->setFocusPolicy(Qt::StrongFocus);
if (!suffix.isEmpty()) m_intEdit->setSuffix(suffix);
m_intEdit->setKeyboardTracking(false);
m_intEdit->setButtonSymbols(QAbstractSpinBox::NoButtons);
......@@ -83,7 +83,7 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
else {
m_doubleEdit = new QDoubleSpinBox(this);
m_doubleEdit->setDecimals(decimals);
m_doubleEdit->setFocusPolicy(Qt::StrongFocus);
m_doubleEdit->setFocusPolicy(Qt::StrongFocus);
m_doubleEdit->setObjectName("dragBox");
if (!suffix.isEmpty()) m_doubleEdit->setSuffix(suffix);
m_doubleEdit->setKeyboardTracking(false);
......@@ -107,7 +107,7 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
else m_label->setMaximumHeight(m_doubleEdit->sizeHint().height());
m_menu = new QMenu(this);
m_scale = new KSelectAction(i18n("Scaling"), this);
m_scale->addAction(i18n("Normal scale"));
m_scale->addAction(i18n("Pixel scale"));
......@@ -243,7 +243,7 @@ void DragValue::slotReset()
void DragValue::slotSetValue(int value)
{
setValue(value, true);
setValue(value, true);
}
void DragValue::slotSetValue(double value)
......@@ -358,7 +358,7 @@ CustomLabel::CustomLabel(const QString &label, bool showSlider, int range, QWidg
m_dragMode(false),
m_showSlider(showSlider),
m_step(10.0)
//m_precision(pow(10, precision)),
//m_precision(pow(10, precision)),
{
setFont(KGlobalSettings::toolBarFont());
setFormat(' ' + label);
......@@ -491,12 +491,12 @@ void CustomLabel::setStep(double step)
void CustomLabel::focusInEvent(QFocusEvent*)
{
setFocusPolicy(Qt::WheelFocus);
setFocusPolicy(Qt::WheelFocus);
}
void CustomLabel::focusOutEvent(QFocusEvent*)
{
setFocusPolicy(Qt::StrongFocus);
setFocusPolicy(Qt::StrongFocus);
}
#include "dragvalue.moc"
......@@ -487,7 +487,7 @@ void DvdWizard::processSpumux()
processDvdauthor(menuMovieUrl, buttons, buttonsTarget);
}
void DvdWizard::processDvdauthor(QString menuMovieUrl, QMap <QString, QRect> buttons, QStringList buttonsTarget)
void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap <QString, QRect> &buttons, const QStringList &buttonsTarget)
{
// create dvdauthor xml
QListWidgetItem *authitem = m_status.job_progress->item(3);
......
......@@ -77,7 +77,7 @@ private:
void cleanup();
void errorMessage(const QString &text);
void infoMessage(const QString &text);
void processDvdauthor(QString menuMovieUrl = QString(), stringRectMap buttons = stringRectMap(), QStringList buttonsTarget = QStringList());
void processDvdauthor(const QString &menuMovieUrl = QString(), const stringRectMap &buttons = stringRectMap(), const QStringList &buttonsTarget = QStringList());
private slots:
void slotPageChanged(int page);
......
......@@ -24,10 +24,10 @@
#include <QFile>
DvdWizardChapters::DvdWizardChapters(MonitorManager *manager, DVDFORMAT format, QWidget *parent) :
QWizardPage(parent),
m_format(format),
m_monitor(NULL),
m_manager(manager)
QWizardPage(parent),
m_format(format),
m_monitor(NULL),
m_manager(manager)
{
m_view.setupUi(this);
......@@ -46,7 +46,7 @@ DvdWizardChapters::DvdWizardChapters(MonitorManager *manager, DVDFORMAT format,
DvdWizardChapters::~DvdWizardChapters()
{
if (m_monitor) {
m_manager->removeMonitor(m_monitor);
m_manager->removeMonitor(m_monitor);
m_monitor->stop();
delete m_monitor;
}
......@@ -119,7 +119,7 @@ void DvdWizardChapters::updateMonitorMarkers()
QStringList chapters = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 1).toStringList();
QList <CommentedTime> markers;
foreach(const QString &frame, chapters) {
markers << CommentedTime(GenTime(frame.toInt(), m_tc.fps()), QString());
markers << CommentedTime(GenTime(frame.toInt(), m_tc.fps()), QString());
}
m_monitor->setMarkers(markers);
}
......@@ -159,9 +159,9 @@ void DvdWizardChapters::createMonitor(DVDFORMAT format)
QVBoxLayout *vbox = new QVBoxLayout;
vbox->addWidget(m_monitor);
m_view.video_frame->setLayout(vbox);
m_monitor->setSizePolicy(QSizePolicy ( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
m_manager->appendMonitor(m_monitor);
vbox->insertWidget(0, m_monitor, 10);
m_monitor->setSizePolicy(QSizePolicy ( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
m_manager->appendMonitor(m_monitor);
vbox->insertWidget(0, m_monitor, 10);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment