From cdebcc54e3216391ddfa04371939723ef336a62e Mon Sep 17 00:00:00 2001 From: Till Theato Date: Sat, 29 May 2010 21:01:30 +0000 Subject: [PATCH] - cleanup - remove unused files svn path=/trunk/kdenlive/; revision=4488 --- src/CMakeLists.txt | 2 - src/changetrackcommand.cpp | 48 --------- src/changetrackcommand.h | 48 --------- src/customtrackview.cpp | 52 --------- src/customtrackview.h | 3 - src/geometryval.h | 2 - src/headertrack.cpp | 22 ++-- src/headertrack.h | 3 +- src/kdenliveui.rc | 2 +- src/mainwindow.cpp | 15 +-- src/mainwindow.h | 1 - src/trackview.cpp | 3 +- src/trackview.h | 1 - src/widgets/geometryposition_ui.ui | 163 ----------------------------- 14 files changed, 14 insertions(+), 351 deletions(-) delete mode 100644 src/changetrackcommand.cpp delete mode 100644 src/changetrackcommand.h delete mode 100644 src/widgets/geometryposition_ui.ui diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ec46730e..0023c713 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -84,7 +84,6 @@ kde4_add_ui_files(kdenlive_UI widgets/dvdwizardchapters_ui.ui widgets/missingclips_ui.ui widgets/cliptranscode_ui.ui - widgets/geometryposition_ui.ui widgets/templateclip_ui.ui widgets/keyframeeditor_ui.ui widgets/timecodedisplay_ui.ui @@ -165,7 +164,6 @@ set(kdenlive_SRCS insertspacecommand.cpp spacerdialog.cpp addtrackcommand.cpp - changetrackcommand.cpp movegroupcommand.cpp dvdwizardvob.cpp dvdwizardmenu.cpp diff --git a/src/changetrackcommand.cpp b/src/changetrackcommand.cpp deleted file mode 100644 index f68ea929..00000000 --- a/src/changetrackcommand.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 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 "changetrackcommand.h" -#include "customtrackview.h" - -#include - -ChangeTrackCommand::ChangeTrackCommand(CustomTrackView *view, int ix, TrackInfo oldInfo, TrackInfo newInfo, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_ix(ix), - m_oldinfo(oldInfo), - m_newinfo(newInfo) -{ - setText(i18n("Change track type")); -} - - -// virtual -void ChangeTrackCommand::undo() -{ -// kDebug()<<"---- undoing action"; - m_view->changeTrack(m_ix, m_oldinfo); -} -// virtual -void ChangeTrackCommand::redo() -{ - m_view->changeTrack(m_ix, m_newinfo); -} - diff --git a/src/changetrackcommand.h b/src/changetrackcommand.h deleted file mode 100644 index 6114e964..00000000 --- a/src/changetrackcommand.h +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 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 CHANGETRACKCOMMAND_H -#define CHANGETRACKCOMMAND_H - -#include -#include -#include - -#include -#include "definitions.h" - -class CustomTrackView; - -class ChangeTrackCommand : public QUndoCommand -{ -public: - ChangeTrackCommand(CustomTrackView *view, int ix, TrackInfo oldInfo, TrackInfo newInfo, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); - -private: - CustomTrackView *m_view; - int m_ix; - TrackInfo m_oldinfo; - TrackInfo m_newinfo; -}; - -#endif - diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index e9915c32..12ee3323 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -48,7 +48,6 @@ #include "insertspacecommand.h" #include "spacerdialog.h" #include "addtrackcommand.h" -#include "changetrackcommand.h" #include "movegroupcommand.h" #include "ui_addtrack_ui.h" #include "initeffects.h" @@ -2611,15 +2610,6 @@ void CustomTrackView::removeTrack(int ix) //QTimer::singleShot(500, this, SIGNAL(trackHeightChanged())); } -void CustomTrackView::changeTrack(int ix, TrackInfo type) -{ - int tracknumber = m_document->tracksCount() - ix; - m_document->setTrackType(tracknumber - 1, type); - m_document->renderer()->mltChangeTrackState(tracknumber, m_document->trackInfoAt(tracknumber - 1).isMute, m_document->trackInfoAt(tracknumber - 1).isBlind); - QTimer::singleShot(300, this, SIGNAL(trackHeightChanged())); - viewport()->update(); -} - void CustomTrackView::configTracks(QList < TrackInfo > trackInfos) { for (int i = 0; i < trackInfos.count(); ++i) { @@ -5343,41 +5333,6 @@ void CustomTrackView::slotDeleteTrack(int ix) } } -void CustomTrackView::slotChangeTrack(int ix) -{ - TrackDialog d(m_document, parentWidget()); - 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")); - - TrackInfo oldInfo = m_document->trackInfoAt(m_document->tracksCount() - ix - 1); - if (oldInfo.type == VIDEOTRACK) - d.video_track->setChecked(true); - else - d.audio_track->setChecked(true); - - if (d.exec() == QDialog::Accepted) { - TrackInfo info; - info.isLocked = false; - info.isMute = false; - info.trackName = oldInfo.trackName; - ix = d.track_nb->value(); - - if (d.video_track->isChecked()) { - info.type = VIDEOTRACK; - info.isBlind = false; - } else { - info.type = AUDIOTRACK; - info.isBlind = true; - } - changeTimelineTrack(ix, info); - setDocumentModified(); - } -} - void CustomTrackView::slotConfigTracks(int ix) { TracksConfigDialog d(m_document, ix, parentWidget()); @@ -5417,13 +5372,6 @@ void CustomTrackView::deleteTimelineTrack(int ix, TrackInfo trackinfo) m_commandStack->push(deleteTrack); } -void CustomTrackView::changeTimelineTrack(int ix, TrackInfo trackinfo) -{ - TrackInfo oldinfo = m_document->trackInfoAt(m_document->tracksCount() - ix - 1); - ChangeTrackCommand *changeTrack = new ChangeTrackCommand(this, ix, oldinfo, trackinfo); - m_commandStack->push(changeTrack); -} - void CustomTrackView::autoTransition() { QList itemList = scene()->selectedItems(); diff --git a/src/customtrackview.h b/src/customtrackview.h index 2c704280..3ecd55ed 100644 --- a/src/customtrackview.h +++ b/src/customtrackview.h @@ -53,7 +53,6 @@ public: virtual void mouseDoubleClickEvent(QMouseEvent *event); void addTrack(TrackInfo type, int ix = -1); void removeTrack(int ix); - void changeTrack(int ix, TrackInfo type); /** @brief Makes the document use new track infos (name, type, ...). */ void configTracks(QList trackInfos); int cursorPos(); @@ -116,7 +115,6 @@ public: void insertSpace(QList clipsToMove, QList transToMove, int track, const GenTime duration, const GenTime offset); ClipItem *getActiveClipUnderCursor(bool allowOutsideCursor = false) const; void deleteTimelineTrack(int ix, TrackInfo trackinfo); - void changeTimelineTrack(int ix, TrackInfo trackinfo); void saveThumbnails(); void autoTransition(); QStringList getLadspaParams(QDomElement effect) const; @@ -185,7 +183,6 @@ public slots: void slotCheckPositionScrolling(); void slotInsertTrack(int ix); void slotDeleteTrack(int ix); - void slotChangeTrack(int ix); /** @brief Shows the configure tracks dialog. */ void slotConfigTracks(int ix); void clipNameChanged(const QString id, const QString name); diff --git a/src/geometryval.h b/src/geometryval.h index 654bcd91..9aef2249 100644 --- a/src/geometryval.h +++ b/src/geometryval.h @@ -30,7 +30,6 @@ #include "definitions.h" #include "keyframehelper.h" #include "timecodedisplay.h" -#include "ui_geometryposition_ui.h" //class QGraphicsScene; class GraphicsSceneRectMove; @@ -65,7 +64,6 @@ private: QAction *m_reset; bool m_fixedMode; QPoint m_frameSize; - Ui::GeometryPosition_UI m_view; void updateTransitionPath(); double m_dar; int m_startPoint; diff --git a/src/headertrack.cpp b/src/headertrack.cpp index 026a548a..a3babea7 100644 --- a/src/headertrack.cpp +++ b/src/headertrack.cpp @@ -87,14 +87,9 @@ HeaderTrack::HeaderTrack(int index, TrackInfo info, int height, QWidget *parent) addAction(removeAction); connect(removeAction, SIGNAL(triggered()), this, SLOT(slotDeleteTrack())); - QAction *changeAction = new QAction(i18n("Change Track Type"), this); - addAction(changeAction); - connect(changeAction, SIGNAL(triggered()), this, SLOT(slotChangeTrack())); - - QAction *renameAction = new QAction(i18n("Rename Track"), this); - addAction(renameAction); - connect(renameAction, SIGNAL(triggered()), this, SLOT(slotRenameTrack())); - + QAction *configAction = new QAction(KIcon("configure"), i18n("Configure Track"), this); + addAction(configAction); + connect(configAction, SIGNAL(triggered()), this, SLOT(slotConfigTrack())); } /*HeaderTrack::~HeaderTrack() @@ -110,7 +105,7 @@ void HeaderTrack::mousePressEvent(QMouseEvent * event) void HeaderTrack::mouseDoubleClickEvent(QMouseEvent* event) { - emit configTrack(m_index); + slotConfigTrack(); QWidget::mouseDoubleClickEvent(event); } @@ -164,7 +159,6 @@ void HeaderTrack::switchLock(bool emitSignal) if (emitSignal) emit switchTrackLock(m_index); } - void HeaderTrack::setLock(bool lock) { buttonLock->setChecked(lock); @@ -186,14 +180,14 @@ void HeaderTrack::slotAddTrack() emit insertTrack(m_index); } -void HeaderTrack::slotChangeTrack() +void HeaderTrack::slotRenameTrack() { - emit changeTrack(m_index); + emit renameTrack(m_index); } -void HeaderTrack::slotRenameTrack() +void HeaderTrack::slotConfigTrack() { - emit renameTrack(m_index); + emit configTrack(m_index); } diff --git a/src/headertrack.h b/src/headertrack.h index d5af624d..f370f1c7 100644 --- a/src/headertrack.h +++ b/src/headertrack.h @@ -51,8 +51,8 @@ private slots: void slotDeleteTrack(); void deleteTrack(); void slotAddTrack(); - void slotChangeTrack(); void slotRenameTrack(); + void slotConfigTrack(); void switchLock(bool emitSignal = true); signals: @@ -61,7 +61,6 @@ signals: void switchTrackLock(int); void insertTrack(int); void deleteTrack(int); - void changeTrack(int); void renameTrack(int); void selectTrack(int); void configTrack(int); diff --git a/src/kdenliveui.rc b/src/kdenliveui.rc index 2b593562..1d4e7510 100644 --- a/src/kdenliveui.rc +++ b/src/kdenliveui.rc @@ -32,7 +32,7 @@ Tracks - + diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 13aa01b4..532a481d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1221,9 +1221,9 @@ void MainWindow::setupActions() collection->addAction("delete_track", deleteTrack); connect(deleteTrack, SIGNAL(triggered()), this, SLOT(slotDeleteTrack())); - KAction *changeTrack = new KAction(KIcon(), i18n("Change Track"), this); - collection->addAction("change_track", changeTrack); - connect(changeTrack, SIGNAL(triggered()), this, SLOT(slotChangeTrack())); + KAction *configTracks = new KAction(KIcon("configure"), i18n("Configure Tracks"), this); + collection->addAction("config_tracks", configTracks); + connect(configTracks, SIGNAL(triggered()), this, SLOT(slotConfigTrack())); KAction *addGuide = new KAction(KIcon("document-new"), i18n("Add Guide"), this); collection->addAction("add_guide", addGuide); @@ -1994,7 +1994,6 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) //cha disconnect(m_activeTimeline, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor())); disconnect(m_activeTimeline, SIGNAL(insertTrack(int)), this, SLOT(slotInsertTrack(int))); disconnect(m_activeTimeline, SIGNAL(deleteTrack(int)), this, SLOT(slotDeleteTrack(int))); - disconnect(m_activeTimeline, SIGNAL(changeTrack(int)), this, SLOT(slotChangeTrack(int))); disconnect(m_activeTimeline, SIGNAL(configTrack(int)), this, SLOT(slotConfigTrack(int))); disconnect(m_activeDocument, SIGNAL(docModified(bool)), this, SLOT(slotUpdateDocumentState(bool))); disconnect(m_effectStack, SIGNAL(updateClipEffect(ClipItem*, QDomElement, QDomElement, int)), m_activeTimeline->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, QDomElement, QDomElement, int))); @@ -2037,7 +2036,6 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) //cha connect(trackView, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor())); connect(trackView, SIGNAL(insertTrack(int)), this, SLOT(slotInsertTrack(int))); connect(trackView, SIGNAL(deleteTrack(int)), this, SLOT(slotDeleteTrack(int))); - connect(trackView, SIGNAL(changeTrack(int)), this, SLOT(slotChangeTrack(int))); connect(trackView, SIGNAL(configTrack(int)), this, SLOT(slotConfigTrack(int))); connect(trackView, SIGNAL(updateTracksInfo()), this, SLOT(slotUpdateTrackInfo())); connect(trackView, SIGNAL(mousePosition(int)), this, SLOT(slotUpdateMousePosition(int))); @@ -2407,13 +2405,6 @@ void MainWindow::slotDeleteTrack(int ix) m_transitionConfig->updateProjectFormat(m_activeDocument->mltProfile(), m_activeDocument->timecode(), m_activeDocument->tracksList()); } -void MainWindow::slotChangeTrack(int ix) -{ - m_projectMonitor->activateMonitor(); - if (m_activeTimeline) - m_activeTimeline->projectView()->slotChangeTrack(ix); -} - void MainWindow::slotConfigTrack(int ix) { m_projectMonitor->activateMonitor(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 22f7c4ca..9451809e 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -369,7 +369,6 @@ private slots: void configureNotifications(); void slotInsertTrack(int ix = 0); void slotDeleteTrack(int ix = 0); - void slotChangeTrack(int ix = 0); /** @brief Shows the configure tracks dialog and updates transitions afterwards. */ void slotConfigTrack(int ix = -1); void slotGetNewLumaStuff(); diff --git a/src/trackview.cpp b/src/trackview.cpp index 9099c873..2ab7b91f 100644 --- a/src/trackview.cpp +++ b/src/trackview.cpp @@ -535,8 +535,7 @@ void TrackView::slotRebuildTrackHeaders() connect(header, SIGNAL(selectTrack(int)), m_trackview, SLOT(slotSelectTrack(int))); connect(header, SIGNAL(deleteTrack(int)), this, SIGNAL(deleteTrack(int))); connect(header, SIGNAL(insertTrack(int)), this, SIGNAL(insertTrack(int))); - connect(header, SIGNAL(changeTrack(int)), this, SIGNAL(changeTrack(int))); - connect(header, SIGNAL(renameTrack(int)), this, SLOT(slotRenameTrack(int))); + //connect(header, SIGNAL(renameTrack(int)), this, SLOT(slotRenameTrack(int))); connect(header, SIGNAL(configTrack(int)), this, SIGNAL(configTrack(int))); headers_container->layout()->addWidget(header); } diff --git a/src/trackview.h b/src/trackview.h index 144e0dfa..d88d34f8 100644 --- a/src/trackview.h +++ b/src/trackview.h @@ -119,7 +119,6 @@ signals: void zoneMoved(int, int); void insertTrack(int); void deleteTrack(int); - void changeTrack(int); void configTrack(int); void updateTracksInfo(); void setZoom(int); diff --git a/src/widgets/geometryposition_ui.ui b/src/widgets/geometryposition_ui.ui deleted file mode 100644 index 108438de..00000000 --- a/src/widgets/geometryposition_ui.ui +++ /dev/null @@ -1,163 +0,0 @@ - - - GeometryPosition_UI - - - - 0 - 0 - 249 - 97 - - - - Dialog - - - - - - X - - - - - - - - 0 - 0 - - - - - - - - Y - - - - - - - - 0 - 0 - - - - - - - - Width - - - - - - - - - - Height - - - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - Reset - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - KIntSpinBox - QSpinBox -
knuminput.h
-
- - KPushButton - QPushButton -
kpushbutton.h
-
-
- - - - buttonBox - accepted() - GeometryPosition_UI - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - GeometryPosition_UI - reject() - - - 316 - 260 - - - 286 - 274 - - - - -
-- 2.39.2