void CustomTrackView::slotInsertTrack(int ix)
{
TrackDialog d(m_document, parentWidget());
- d.view.label->setText(i18n("Insert track"));
- d.view.track_nb->setMaximum(m_document->tracksCount() - 1);
- d.view.track_nb->setValue(ix);
+ d.label->setText(i18n("Insert track"));
+ d.track_nb->setMaximum(m_document->tracksCount() - 1);
+ d.track_nb->setValue(ix);
d.setWindowTitle(i18n("Insert New Track"));
d.slotUpdateName(ix);
if (d.exec() == QDialog::Accepted) {
- ix = d.view.track_nb->value();
- if (d.view.before_select->currentIndex() == 1) {
+ ix = d.track_nb->value();
+ if (d.before_select->currentIndex() == 1) {
ix++;
}
TrackInfo info;
- if (d.view.video_track->isChecked()) {
+ if (d.video_track->isChecked()) {
info.type = VIDEOTRACK;
info.isMute = false;
info.isBlind = false;
void CustomTrackView::slotDeleteTrack(int ix)
{
TrackDialog d(m_document, parentWidget());
- d.view.label->setText(i18n("Delete track"));
- d.view.before_select->setHidden(true);
- d.view.track_nb->setMaximum(m_document->tracksCount() - 1);
- d.view.track_nb->setValue(ix);
+ d.label->setText(i18n("Delete track"));
+ d.before_select->setHidden(true);
+ d.track_nb->setMaximum(m_document->tracksCount() - 1);
+ d.track_nb->setValue(ix);
d.slotUpdateName(ix);
d.setWindowTitle(i18n("Delete Track"));
- d.view.video_track->setHidden(true);
- d.view.audio_track->setHidden(true);
+ d.video_track->setHidden(true);
+ d.audio_track->setHidden(true);
if (d.exec() == QDialog::Accepted) {
- ix = d.view.track_nb->value();
+ ix = d.track_nb->value();
TrackInfo info = m_document->trackInfoAt(m_document->tracksCount() - ix - 1);
deleteTimelineTrack(ix, info);
setDocumentModified();
void CustomTrackView::slotChangeTrack(int ix)
{
TrackDialog d(m_document, parentWidget());
- d.view.label->setText(i18n("Change track"));
- d.view.before_select->setHidden(true);
- d.view.track_nb->setMaximum(m_document->tracksCount() - 1);
- d.view.track_nb->setValue(ix);
+ d.label->setText(i18n("Change track"));
+ d.before_select->setHidden(true);
+ d.track_nb->setMaximum(m_document->tracksCount() - 1);
+ d.track_nb->setValue(ix);
d.slotUpdateName(ix);
d.setWindowTitle(i18n("Change Track Type"));
if (m_document->trackInfoAt(m_document->tracksCount() - ix - 1).type == VIDEOTRACK)
- d.view.video_track->setChecked(true);
+ d.video_track->setChecked(true);
else
- d.view.audio_track->setChecked(true);
+ d.audio_track->setChecked(true);
if (d.exec() == QDialog::Accepted) {
TrackInfo info;
info.isLocked = false;
info.isMute = false;
- ix = d.view.track_nb->value();
+ ix = d.track_nb->value();
- if (d.view.video_track->isChecked()) {
+ if (d.video_track->isChecked()) {
info.type = VIDEOTRACK;
info.isBlind = false;
} else {
{
setFont(KGlobalSettings::toolBarFont());
m_fps = m_tc.fps();
- m_view.setupUi(this);
+ setupUi(this);
setWindowTitle(caption);
m_previewTimer = new QTimer(this);
p.fill(Qt::black);
}
if (!p.isNull()) {
- m_view.clip_thumb->setFixedWidth(p.width());
- m_view.clip_thumb->setFixedHeight(p.height());
- m_view.clip_thumb->setPixmap(p);
+ clip_thumb->setFixedWidth(p.width());
+ clip_thumb->setFixedHeight(p.height());
+ clip_thumb->setPixmap(p);
}
- connect(m_view.marker_position, SIGNAL(textChanged(const QString &)), this, SIGNAL(updateThumb()));
- } else m_view.clip_thumb->setHidden(true);
+ connect(marker_position, SIGNAL(textChanged(const QString &)), this, SIGNAL(updateThumb()));
+ } else clip_thumb->setHidden(true);
- m_view.marker_position->setText(tc.getTimecode(t.time()));
+ marker_position->setText(tc.getTimecode(t.time()));
- m_view.marker_comment->setText(t.comment());
- m_view.marker_comment->selectAll();
- m_view.marker_comment->setFocus();
+ marker_comment->setText(t.comment());
+ marker_comment->selectAll();
+ marker_comment->setFocus();
- connect(m_view.position_up, SIGNAL(clicked()), this, SLOT(slotTimeUp()));
- connect(m_view.position_down, SIGNAL(clicked()), this, SLOT(slotTimeDown()));
+ connect(position_up, SIGNAL(clicked()), this, SLOT(slotTimeUp()));
+ connect(position_down, SIGNAL(clicked()), this, SLOT(slotTimeDown()));
adjustSize();
}
void MarkerDialog::slotUpdateThumb()
{
m_previewTimer->stop();
- int pos = m_tc.getFrameCount(m_view.marker_position->text());
+ int pos = m_tc.getFrameCount(marker_position->text());
int width = 100.0 * m_dar;
if (width % 2 == 1) width++;
QPixmap p = KThumb::getFrame(m_producer, pos, width, 100);
- if (!p.isNull()) m_view.clip_thumb->setPixmap(p);
+ if (!p.isNull()) clip_thumb->setPixmap(p);
else kDebug() << "!!!!!!!!!!! ERROR CREATING THUMB";
}
void MarkerDialog::slotTimeUp()
{
- int duration = m_tc.getFrameCount(m_view.marker_position->text());
+ int duration = m_tc.getFrameCount(marker_position->text());
if (m_clip && duration >= m_clip->duration().frames(m_fps)) return;
duration ++;
- m_view.marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps)));
+ marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps)));
}
void MarkerDialog::slotTimeDown()
{
- int duration = m_tc.getFrameCount(m_view.marker_position->text());
+ int duration = m_tc.getFrameCount(marker_position->text());
if (duration <= 0) return;
duration --;
- m_view.marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps)));
+ marker_position->setText(m_tc.getTimecode(GenTime(duration, m_fps)));
}
CommentedTime MarkerDialog::newMarker()
{
- return CommentedTime(GenTime(m_tc.getFrameCount(m_view.marker_position->text()), m_fps), m_view.marker_comment->text());
+ return CommentedTime(GenTime(m_tc.getFrameCount(marker_position->text()), m_fps), marker_comment->text());
}
void MarkerDialog::wheelEvent(QWheelEvent * event)
{
- if (m_view.marker_position->underMouse() || m_view.clip_thumb->underMouse()) {
+ if (marker_position->underMouse() || clip_thumb->underMouse()) {
if (event->delta() > 0)
slotTimeUp();
else
class Profile;
};
-class MarkerDialog : public QDialog
+class MarkerDialog : public QDialog, public Ui::MarkerDialog_UI
{
Q_OBJECT
private:
Mlt::Producer *m_producer;
Mlt::Profile *m_profile;
- Ui::MarkerDialog_UI m_view;
DocClipBase *m_clip;
Timecode m_tc;
double m_fps;
m_doc(doc)
{
//setFont(KGlobalSettings::toolBarFont());
- view.setupUi(this);
- connect(view.track_nb, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateName(int)));
+ setupUi(this);
+ connect(track_nb, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateName(int)));
}
TrackDialog::~TrackDialog()
void TrackDialog::slotUpdateName(int ix)
{
ix = m_doc->tracksCount() - ix;
- view.track_name->setText(m_doc->trackInfoAt(ix - 1).trackName);
+ track_name->setText(m_doc->trackInfoAt(ix - 1).trackName);
}
class KdenliveDoc;
-class TrackDialog : public QDialog
+class TrackDialog : public QDialog, public Ui::AddTrack_UI
{
Q_OBJECT
public:
TrackDialog(KdenliveDoc *doc, QWidget * parent = 0);
~TrackDialog();
- Ui::AddTrack_UI view;
public slots: