]> git.sesse.net Git - kdenlive/commitdiff
cleanup
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 28 Aug 2009 13:32:28 +0000 (13:32 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 28 Aug 2009 13:32:28 +0000 (13:32 +0000)
svn path=/trunk/kdenlive/; revision=3844

src/customtrackview.cpp
src/markerdialog.cpp
src/markerdialog.h
src/trackdialog.cpp
src/trackdialog.h

index 6cd89d6fc6e6cd424f54f5ca1b742c28a7d80b11..f8cf2d79e5b4c4e0a674404f14123d95e2bc2989 100644 (file)
@@ -4344,19 +4344,19 @@ void CustomTrackView::saveThumbnails()
 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;
@@ -4376,16 +4376,16 @@ void CustomTrackView::slotInsertTrack(int ix)
 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();
@@ -4397,25 +4397,25 @@ void CustomTrackView::slotDeleteTrack(int ix)
 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 {
index 90969a47ca8a467263d60d2cafba21d1886287ce..d72716c020d2e5354319b99dd0235e38d111cb22 100644 (file)
@@ -35,7 +35,7 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, cons
 {
     setFont(KGlobalSettings::toolBarFont());
     m_fps = m_tc.fps();
-    m_view.setupUi(this);
+    setupUi(this);
     setWindowTitle(caption);
     m_previewTimer = new QTimer(this);
 
@@ -75,21 +75,21 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, cons
             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();
 }
@@ -104,38 +104,38 @@ MarkerDialog::~MarkerDialog()
 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
index a9e6315b2a6f6840a092258841bb2cd36bab3c33..5c6707c3d807726e7e62d3b3d494ce4ad146392e 100644 (file)
@@ -32,7 +32,7 @@ class Producer;
 class Profile;
 };
 
-class MarkerDialog : public QDialog
+class MarkerDialog : public QDialog, public Ui::MarkerDialog_UI
 {
     Q_OBJECT
 
@@ -52,7 +52,6 @@ protected:
 private:
     Mlt::Producer *m_producer;
     Mlt::Profile *m_profile;
-    Ui::MarkerDialog_UI m_view;
     DocClipBase *m_clip;
     Timecode m_tc;
     double m_fps;
index 2526d9833f9e53038674187780f40a0bb6ff053e..c62318e8d43e3a9f8108c10329315438986d9bec 100644 (file)
@@ -30,8 +30,8 @@ TrackDialog::TrackDialog(KdenliveDoc *doc, QWidget * parent) :
         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()
@@ -41,7 +41,7 @@ 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);
 }
 
 
index 0716b355821d719abf2b2fe5708dcb34e68be1af..0501b3f87eb149a60d29a9bef3032b10e9e5ff17 100644 (file)
 
 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: