Commit 134b98b1 authored by Nicolas Carion's avatar Nicolas Carion

fixed some leaky includes

parent 19bdf56e
......@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "doc/documentchecker.h"
#include "doc/docundostack.hpp"
#include "doc/kdenlivedoc.h"
#include "effects/effectstack/model/effectstackmodel.hpp"
#include "jobs/jobmanager.h"
#include "jobs/loadjob.hpp"
#include "kdenlive_debug.h"
......@@ -492,10 +493,10 @@ public:
}
QString jobText = index.data(AbstractProjectItem::JobMessage).toString();
if (!jobText.isEmpty()) {
//QRectF txtBounding = painter->boundingRect(r2, Qt::AlignRight | Qt::AlignVCenter, " " + jobText + " ");
// QRectF txtBounding = painter->boundingRect(r2, Qt::AlignRight | Qt::AlignVCenter, " " + jobText + " ");
painter->setPen(Qt::NoPen);
painter->setBrush(option.palette.highlight());
//painter->drawRoundedRect(txtBounding, 2, 2);
// painter->drawRoundedRect(txtBounding, 2, 2);
painter->setPen(option.palette.highlightedText().color());
painter->drawText(r2, Qt::AlignCenter, jobText);
}
......@@ -597,10 +598,10 @@ Bin::Bin(const std::shared_ptr<ProjectItemModel> &model, QWidget *parent)
m_proxyModel->setSourceModel(m_itemModel.get());
connect(m_itemModel.get(), &QAbstractItemModel::dataChanged, m_proxyModel, &ProjectSortProxyModel::slotDataChanged);
connect(m_proxyModel, &ProjectSortProxyModel::selectModel, this, &Bin::selectProxyModel);
connect(m_itemModel.get(), static_cast<void(ProjectItemModel::*)(const QStringList&, const QModelIndex&)>(&ProjectItemModel::itemDropped),
this, static_cast<void (Bin::*)(const QStringList&, const QModelIndex&)>(&Bin::slotItemDropped));
connect(m_itemModel.get(), static_cast<void(ProjectItemModel::*)(const QList<QUrl>&, const QModelIndex&)>(&ProjectItemModel::itemDropped),
this, static_cast<void (Bin::*)(const QList<QUrl>&, const QModelIndex&)>(&Bin::slotItemDropped));
connect(m_itemModel.get(), static_cast<void (ProjectItemModel::*)(const QStringList &, const QModelIndex &)>(&ProjectItemModel::itemDropped), this,
static_cast<void (Bin::*)(const QStringList &, const QModelIndex &)>(&Bin::slotItemDropped));
connect(m_itemModel.get(), static_cast<void (ProjectItemModel::*)(const QList<QUrl> &, const QModelIndex &)>(&ProjectItemModel::itemDropped), this,
static_cast<void (Bin::*)(const QList<QUrl> &, const QModelIndex &)>(&Bin::slotItemDropped));
connect(m_itemModel.get(), &ProjectItemModel::effectDropped, this, &Bin::slotEffectDropped);
connect(m_itemModel.get(), &QAbstractItemModel::dataChanged, this, &Bin::slotItemEdited);
connect(this, &Bin::refreshPanel, this, &Bin::doRefreshPanel);
......@@ -653,7 +654,7 @@ Bin::Bin(const std::shared_ptr<ProjectItemModel> &model, QWidget *parent)
pCore->window()->actionCollection()->addAction(QStringLiteral("rename"), m_renameAction);
listType->setToolBarMode(KSelectAction::MenuMode);
connect(listType, static_cast<void(KSelectAction::*)(QAction*)>(&KSelectAction::triggered), this, &Bin::slotInitView);
connect(listType, static_cast<void (KSelectAction::*)(QAction *)>(&KSelectAction::triggered), this, &Bin::slotInitView);
// Settings menu
QMenu *settingsMenu = new QMenu(i18n("Settings"), this);
......@@ -1720,9 +1721,8 @@ void Bin::showClipProperties(std::shared_ptr<ProjectClip> clip, bool forceRefres
}
ClipPropertiesController *panel = clip->buildProperties(m_propertiesPanel);
connect(this, &Bin::refreshTimeCode, panel, &ClipPropertiesController::slotRefreshTimeCode);
connect(panel, &ClipPropertiesController::updateClipProperties, this,
&Bin::slotEditClipCommand);
connect(panel, &ClipPropertiesController::seekToFrame, m_monitor, static_cast<void(Monitor::*)(int)>(&Monitor::slotSeek));
connect(panel, &ClipPropertiesController::updateClipProperties, this, &Bin::slotEditClipCommand);
connect(panel, &ClipPropertiesController::seekToFrame, m_monitor, static_cast<void (Monitor::*)(int)>(&Monitor::slotSeek));
connect(panel, &ClipPropertiesController::editClip, this, &Bin::slotEditClip);
connect(panel, SIGNAL(editAnalysis(QString, QString, QString)), this, SLOT(slotAddClipExtraData(QString, QString, QString)));
......@@ -1744,7 +1744,6 @@ void Bin::reloadClip(const QString &id)
clip->reloadProducer();
}
QStringList Bin::getBinFolderClipIds(const QString &id) const
{
QStringList ids;
......@@ -2756,9 +2755,10 @@ void Bin::showTitleWidget(std::shared_ptr<ProjectClip> clip)
newprops.insert(QStringLiteral("force_reload"), QStringLiteral("2"));
if (!path.isEmpty()) {
// we are editing an external file, asked if we want to detach from that file or save the result to that title file.
if (KMessageBox::questionYesNo(pCore->window(), i18n("You are editing an external title clip (%1). Do you want to save your changes to the title "
"file or save the changes for this project only?",
path),
if (KMessageBox::questionYesNo(pCore->window(),
i18n("You are editing an external title clip (%1). Do you want to save your changes to the title "
"file or save the changes for this project only?",
path),
i18n("Save Title"), KGuiItem(i18n("Save to title file")),
KGuiItem(i18n("Save in project only"))) == KMessageBox::Yes) {
// save to external file
......
......@@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KDENLIVE_BIN_H
#include "abstractprojectitem.h"
#include "effects/effectstack/model/effectstackmodel.hpp"
#include "filewatcher.hpp"
#include "timecode.h"
......@@ -43,26 +42,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QUrl>
#include <QWidget>
class KdenliveDoc;
class QVBoxLayout;
class QScrollArea;
class AbstractProjectItem;
class BinItemDelegate;
class BinMessageWidget;
class ClipController;
class EffectStackModel;
class InvalidDialog;
class KdenliveDoc;
class Monitor;
class ProjectClip;
class ProjectFolder;
class ProjectFolderUp;
class ProjectItemModel;
class ProjectSortProxyModel;
class QDockWidget;
class QMenu;
class QScrollArea;
class QTimeLine;
class QToolBar;
class QMenu;
class QToolButton;
class QUndoCommand;
class ProjectItemModel;
class ProjectClip;
class ProjectFolder;
class AbstractProjectItem;
class Monitor;
class ProjectSortProxyModel;
class ProjectFolderUp;
class InvalidDialog;
class BinItemDelegate;
class BinMessageWidget;
class QVBoxLayout;
class SmallJobLabel;
namespace Mlt {
......
......@@ -21,6 +21,8 @@ the Free Software Foundation, either version 3 of the License, or
#include "kdenlive_debug.h"
#include <QFile>
#include <QStandardPaths>
#include <mlt++/MltFactory.h>
#include <mlt++/MltRepository.h>
std::unique_ptr<MltConnection> MltConnection::m_self;
MltConnection::MltConnection(const QString &mltPath)
......
......@@ -28,6 +28,7 @@
#include "core.h"
#include "dialogs/spacerdialog.h"
#include "doc/kdenlivedoc.h"
#include "effects/effectstack/model/effectstackmodel.hpp"
#include "kdenlivesettings.h"
#include "previewmanager.h"
#include "project/projectmanager.h"
......@@ -229,7 +230,8 @@ void TimelineController::checkDuration()
std::unordered_set<int> TimelineController::getCurrentSelectionIds() const
{
std::unordered_set<int> selection;
if (m_model->m_temporarySelectionGroup >= 0 || (!m_selection.selectedItems.isEmpty() && m_model->m_groups->isInGroup(m_selection.selectedItems.constFirst()))) {
if (m_model->m_temporarySelectionGroup >= 0 ||
(!m_selection.selectedItems.isEmpty() && m_model->m_groups->isInGroup(m_selection.selectedItems.constFirst()))) {
selection = m_model->getGroupElements(m_selection.selectedItems.constFirst());
} else {
for (int i : m_selection.selectedItems) {
......@@ -242,7 +244,8 @@ std::unordered_set<int> TimelineController::getCurrentSelectionIds() const
void TimelineController::selectCurrentItem(ObjectType type, bool select, bool addToCurrent)
{
QList<int> toSelect;
int currentClip = type == ObjectType::TimelineClip ? m_model->getClipByPosition(m_activeTrack, timelinePosition()) : m_model->getCompositionByPosition(m_activeTrack, timelinePosition());
int currentClip = type == ObjectType::TimelineClip ? m_model->getClipByPosition(m_activeTrack, timelinePosition())
: m_model->getCompositionByPosition(m_activeTrack, timelinePosition());
if (currentClip == -1) {
pCore->displayMessage(i18n("No item under timeline cursor in active track"), InformationMessage, 500);
return;
......@@ -679,15 +682,13 @@ void TimelineController::showAsset(int id)
QString clipName = m_model->data(clipIx, Qt::DisplayRole).toString();
bool showKeyframes = m_model->data(clipIx, TimelineModel::ShowKeyframesRole).toInt();
qDebug() << "-----\n// SHOW KEYFRAMES: " << showKeyframes;
emit showItemEffectStack(clipName, m_model->getClipEffectStackModel(id),
m_model->getClipFrameSize(id), showKeyframes);
emit showItemEffectStack(clipName, m_model->getClipEffectStackModel(id), m_model->getClipFrameSize(id), showKeyframes);
}
}
void TimelineController::showTrackAsset(int trackId)
{
emit showItemEffectStack(getTrackNameFromIndex(trackId), m_model->getTrackEffectStackModel(trackId), pCore->getCurrentFrameSize(),
false);
emit showItemEffectStack(getTrackNameFromIndex(trackId), m_model->getTrackEffectStackModel(trackId), pCore->getCurrentFrameSize(), false);
}
void TimelineController::setPosition(int position)
......
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