use hardcoded namespace
The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "common/rational.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class SnapService
|
||||
{
|
||||
@@ -26,6 +26,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // SNAPSERVICE_H
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QScrollBar>
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineAndTrackView::TimelineAndTrackView(Qt::Alignment vertical_alignment, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
@@ -73,4 +73,4 @@ void TimelineAndTrackView::TracksValueChanged(int v)
|
||||
view_->verticalScrollBar()->setValue(view_->verticalScrollBar()->minimum() + v);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "view/timelineview.h"
|
||||
#include "trackview/trackview.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TimelineAndTrackView : public QWidget
|
||||
{
|
||||
@@ -55,6 +55,6 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEANDTRACKVIEW_H
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "common/clamp.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
const int TimelineScaledObject::kCalculateDimensionsPadding = 10;
|
||||
|
||||
@@ -134,4 +134,4 @@ TimelineScaledWidget::TimelineScaledWidget(QWidget *parent) :
|
||||
{
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "common/rational.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TimelineScaledObject
|
||||
{
|
||||
@@ -82,6 +82,6 @@ public:
|
||||
TimelineScaledWidget(QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINESCALEDOBJECT_H
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include "widget/menu/menushared.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineWidget::TimelineWidget(QWidget *parent) :
|
||||
TimeBasedWidget(true, true, parent),
|
||||
@@ -84,20 +84,20 @@ TimelineWidget::TimelineWidget(QWidget *parent) :
|
||||
views_.append(new TimelineAndTrackView(Qt::AlignTop));
|
||||
|
||||
// Create tools
|
||||
tools_.resize(OLIVE_NAMESPACE::Tool::kCount);
|
||||
tools_.resize(olive::Tool::kCount);
|
||||
tools_.fill(nullptr);
|
||||
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kPointer, new PointerTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kEdit, new EditTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kRipple, new RippleTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kRolling, new RollingTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kRazor, new RazorTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kSlip, new SlipTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kSlide, new SlideTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kZoom, new ZoomTool(this));
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kTransition, new TransitionTool(this));
|
||||
//tools_.replace(OLIVE_NAMESPACE::Tool::kRecord, new PointerTool(this)); FIXME: Implement
|
||||
tools_.replace(OLIVE_NAMESPACE::Tool::kAdd, new AddTool(this));
|
||||
tools_.replace(olive::Tool::kPointer, new PointerTool(this));
|
||||
tools_.replace(olive::Tool::kEdit, new EditTool(this));
|
||||
tools_.replace(olive::Tool::kRipple, new RippleTool(this));
|
||||
tools_.replace(olive::Tool::kRolling, new RollingTool(this));
|
||||
tools_.replace(olive::Tool::kRazor, new RazorTool(this));
|
||||
tools_.replace(olive::Tool::kSlip, new SlipTool(this));
|
||||
tools_.replace(olive::Tool::kSlide, new SlideTool(this));
|
||||
tools_.replace(olive::Tool::kZoom, new ZoomTool(this));
|
||||
tools_.replace(olive::Tool::kTransition, new TransitionTool(this));
|
||||
//tools_.replace(olive::Tool::kRecord, new PointerTool(this)); FIXME: Implement
|
||||
tools_.replace(olive::Tool::kAdd, new AddTool(this));
|
||||
|
||||
import_tool_ = new ImportTool(this);
|
||||
|
||||
@@ -1655,4 +1655,4 @@ bool TimelineWidget::SnapPoint(QList<rational> start_times, rational* movement,
|
||||
return true;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "widget/timelinewidget/tool/import.h"
|
||||
#include "widget/timelinewidget/tool/tool.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
/**
|
||||
* @brief Full widget for working with TimelineOutput nodes
|
||||
@@ -321,6 +321,6 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEWIDGET_H
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "timelinewidgetselections.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
void TimelineWidgetSelections::ShiftTime(const rational &diff)
|
||||
{
|
||||
@@ -68,4 +68,4 @@ void TimelineWidgetSelections::TrimOut(const rational &diff)
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "common/timerange.h"
|
||||
#include "timeline/trackreference.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TimelineWidgetSelections : public QHash<TrackReference, TimeRangeList>
|
||||
{
|
||||
@@ -43,6 +43,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEWIDGETSELECTIONS_H
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "node/generator/text/text.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
AddTool::AddTool(TimelineWidget *parent) :
|
||||
BeamTool(parent),
|
||||
@@ -48,18 +48,18 @@ void AddTool::MousePress(TimelineViewMouseEvent *event)
|
||||
Timeline::TrackType add_type = Timeline::kTrackTypeNone;
|
||||
|
||||
switch (Core::instance()->GetSelectedAddableObject()) {
|
||||
case OLIVE_NAMESPACE::Tool::kAddableBars:
|
||||
case OLIVE_NAMESPACE::Tool::kAddableSolid:
|
||||
case OLIVE_NAMESPACE::Tool::kAddableTitle:
|
||||
case olive::Tool::kAddableBars:
|
||||
case olive::Tool::kAddableSolid:
|
||||
case olive::Tool::kAddableTitle:
|
||||
add_type = Timeline::kTrackTypeVideo;
|
||||
break;
|
||||
case OLIVE_NAMESPACE::Tool::kAddableTone:
|
||||
case olive::Tool::kAddableTone:
|
||||
add_type = Timeline::kTrackTypeAudio;
|
||||
break;
|
||||
case OLIVE_NAMESPACE::Tool::kAddableEmpty:
|
||||
case olive::Tool::kAddableEmpty:
|
||||
// Leave as "none", which means this block can be placed on any track
|
||||
break;
|
||||
case OLIVE_NAMESPACE::Tool::kAddableCount:
|
||||
case olive::Tool::kAddableCount:
|
||||
// Return so we do nothing
|
||||
return;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
|
||||
|
||||
ClipBlock* clip = new ClipBlock();
|
||||
clip->set_length_and_media_out(ghost_->GetAdjustedLength());
|
||||
clip->SetLabel(OLIVE_NAMESPACE::Tool::GetAddableObjectName(Core::instance()->GetSelectedAddableObject()));
|
||||
clip->SetLabel(olive::Tool::GetAddableObjectName(Core::instance()->GetSelectedAddableObject()));
|
||||
|
||||
NodeGraph* graph = static_cast<NodeGraph*>(parent()->GetConnectedNode()->parent());
|
||||
|
||||
@@ -112,10 +112,10 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
|
||||
command);
|
||||
|
||||
switch (Core::instance()->GetSelectedAddableObject()) {
|
||||
case OLIVE_NAMESPACE::Tool::kAddableEmpty:
|
||||
case olive::Tool::kAddableEmpty:
|
||||
// Empty, nothing to be done
|
||||
break;
|
||||
case OLIVE_NAMESPACE::Tool::kAddableSolid:
|
||||
case olive::Tool::kAddableSolid:
|
||||
{
|
||||
Node* solid = new SolidGenerator();
|
||||
|
||||
@@ -126,7 +126,7 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
|
||||
new NodeEdgeAddCommand(solid->output(), clip->texture_input(), command);
|
||||
break;
|
||||
}
|
||||
case OLIVE_NAMESPACE::Tool::kAddableTitle:
|
||||
case olive::Tool::kAddableTitle:
|
||||
{
|
||||
Node* text = new TextGenerator();
|
||||
|
||||
@@ -137,12 +137,12 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
|
||||
new NodeEdgeAddCommand(text->output(), clip->texture_input(), command);
|
||||
break;
|
||||
}
|
||||
case OLIVE_NAMESPACE::Tool::kAddableBars:
|
||||
case OLIVE_NAMESPACE::Tool::kAddableTone:
|
||||
case olive::Tool::kAddableBars:
|
||||
case olive::Tool::kAddableTone:
|
||||
// Not implemented yet
|
||||
qWarning() << "Unimplemented add object:" << Core::instance()->GetSelectedAddableObject();
|
||||
break;
|
||||
case OLIVE_NAMESPACE::Tool::kAddableCount:
|
||||
case olive::Tool::kAddableCount:
|
||||
// Invalid value, do nothing
|
||||
break;
|
||||
}
|
||||
@@ -190,4 +190,4 @@ void AddTool::MouseMoveInternal(const rational &cursor_frame, bool outwards)
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "beam.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class AddTool : public BeamTool
|
||||
{
|
||||
@@ -42,6 +42,6 @@ protected:
|
||||
rational drag_start_point_;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // ADDTIMELINETOOL_H
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "beam.h"
|
||||
#include "widget/timelinewidget/timelinewidget.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
BeamTool::BeamTool(TimelineWidget *parent) :
|
||||
TimelineTool(parent)
|
||||
@@ -46,4 +46,4 @@ TimelineCoordinate BeamTool::ValidatedCoordinate(TimelineCoordinate coord)
|
||||
return coord;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "tool.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class BeamTool : public TimelineTool
|
||||
{
|
||||
@@ -37,6 +37,6 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // BEAMTIMELINETOOL_H
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "edit.h"
|
||||
#include "widget/timelinewidget/timelinewidget.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
EditTool::EditTool(TimelineWidget* parent) :
|
||||
BeamTool(parent)
|
||||
@@ -85,4 +85,4 @@ void EditTool::MouseDoubleClick(TimelineViewMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "tool.h"
|
||||
#include "widget/timelinewidget/timelinewidgetselections.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class EditTool : public BeamTool
|
||||
{
|
||||
@@ -44,6 +44,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // EDITTIMELINETOOL_H
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
#include "window/mainwindow/mainwindow.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
Timeline::TrackType TrackTypeFromStreamType(Stream::Type stream_type)
|
||||
{
|
||||
@@ -498,4 +498,4 @@ QList<ImportTool::DraggedFootage> ImportTool::FootageToDraggedFootage(QList<Foot
|
||||
return df;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "tool.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class ImportTool : public TimelineTool
|
||||
{
|
||||
@@ -84,6 +84,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // IMPORTTIMELINETOOL_H
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "pointer.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
PointerTool::PointerTool(TimelineWidget *parent) :
|
||||
TimelineTool(parent),
|
||||
@@ -924,4 +924,4 @@ rational PointerTool::ValidateOutTrimming(rational movement)
|
||||
return movement;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "tool.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class PointerTool : public TimelineTool
|
||||
{
|
||||
@@ -122,6 +122,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // POINTERTIMELINETOOL_H
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "razor.h"
|
||||
#include "widget/timelinewidget/timelinewidget.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
RazorTool::RazorTool(TimelineWidget* parent) :
|
||||
BeamTool(parent)
|
||||
@@ -94,4 +94,4 @@ void RazorTool::MouseRelease(TimelineViewMouseEvent *event)
|
||||
dragging_ = false;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "beam.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class RazorTool : public BeamTool
|
||||
{
|
||||
@@ -38,6 +38,6 @@ private:
|
||||
QVector<TrackReference> split_tracks_;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // RAZORTIMELINETOOL_H
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ripple.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
RippleTool::RippleTool(TimelineWidget* parent) :
|
||||
PointerTool(parent)
|
||||
@@ -147,4 +147,4 @@ void RippleTool::FinishDrag(TimelineViewMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "pointer.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class RippleTool : public PointerTool
|
||||
{
|
||||
@@ -36,6 +36,6 @@ protected:
|
||||
Timeline::MovementMode trim_mode) override;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // RIPPLETIMELINETOOL_H
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "rolling.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
RollingTool::RollingTool(TimelineWidget* parent) :
|
||||
PointerTool(parent)
|
||||
@@ -39,4 +39,4 @@ void RollingTool::InitiateDrag(TimelineViewBlockItem *clicked_item,
|
||||
InitiateDragInternal(clicked_item, trim_mode, false, true, false);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "pointer.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class RollingTool : public PointerTool
|
||||
{
|
||||
@@ -35,6 +35,6 @@ protected:
|
||||
Timeline::MovementMode trim_mode) override;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // ROLLINGTIMELINETOOL_H
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "slide.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
SlideTool::SlideTool(TimelineWidget* parent) :
|
||||
PointerTool(parent)
|
||||
@@ -40,4 +40,4 @@ void SlideTool::InitiateDrag(TimelineViewBlockItem *clicked_item,
|
||||
InitiateDragInternal(clicked_item, trim_mode, false, true, true);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "pointer.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class SlideTool : public PointerTool
|
||||
{
|
||||
@@ -36,6 +36,6 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // SLIDETIMELINETOOL_H
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "config/config.h"
|
||||
#include "slip.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
SlipTool::SlipTool(TimelineWidget *parent) :
|
||||
PointerTool(parent)
|
||||
@@ -79,4 +79,4 @@ void SlipTool::FinishDrag(TimelineViewMouseEvent *event)
|
||||
Core::instance()->undo_stack()->pushIfHasChildren(command);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "pointer.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class SlipTool : public PointerTool
|
||||
{
|
||||
@@ -35,6 +35,6 @@ protected:
|
||||
virtual void FinishDrag(TimelineViewMouseEvent *event) override;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // SLIPTIMELINETOOL_H
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "node/block/transition/transition.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineTool::TimelineTool(TimelineWidget *parent) :
|
||||
dragging_(false),
|
||||
@@ -119,4 +119,4 @@ void TimelineTool::InsertGapsAtGhostDestination(QUndoCommand *command)
|
||||
parent()->InsertGapsAt(earliest_point, latest_point - earliest_point, command);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "widget/timelinewidget/view/timelineviewghostitem.h"
|
||||
#include "widget/timelinewidget/view/timelineviewmouseevent.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TimelineWidget;
|
||||
|
||||
@@ -84,6 +84,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINETOOL_H
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "transition.h"
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TransitionTool::TransitionTool(TimelineWidget *parent) :
|
||||
AddTool(parent)
|
||||
@@ -181,4 +181,4 @@ void TransitionTool::MouseRelease(TimelineViewMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "add.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TransitionTool : public AddTool
|
||||
{
|
||||
@@ -37,6 +37,6 @@ private:
|
||||
bool dual_transition_;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TRANSITIONTIMELINETOOL_H
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "widget/timelinewidget/timelinewidget.h"
|
||||
#include "zoom.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
ZoomTool::ZoomTool(TimelineWidget *parent) :
|
||||
TimelineTool(parent)
|
||||
@@ -96,4 +96,4 @@ void ZoomTool::MouseRelease(TimelineViewMouseEvent *event)
|
||||
parent()->QueueScroll(scroll_value);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "tool.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class ZoomTool : public TimelineTool
|
||||
{
|
||||
@@ -36,6 +36,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // ZOOMTIMELINETOOL_H
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "trackviewitem.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TrackView::TrackView(Qt::Alignment vertical_alignment, QWidget *parent) :
|
||||
QScrollArea(parent),
|
||||
@@ -132,4 +132,4 @@ void TrackView::RemoveTrack(TrackOutput *track)
|
||||
splitter_->Remove(track->Index());
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "trackviewitem.h"
|
||||
#include "trackviewsplitter.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TrackView : public QScrollArea
|
||||
{
|
||||
@@ -63,6 +63,6 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TRACKVIEW_H
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QPainter>
|
||||
#include <QtMath>
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TrackViewItem::TrackViewItem(TrackOutput* track, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@@ -117,4 +117,4 @@ void TrackViewItem::UpdateLabel()
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "widget/clickablelabel/clickablelabel.h"
|
||||
#include "widget/focusablelineedit/focusablelineedit.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TrackViewItem : public QWidget
|
||||
{
|
||||
@@ -63,6 +63,6 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TRACKVIEWITEM_H
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "node/output/track/track.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TrackViewSplitter::TrackViewSplitter(Qt::Alignment vertical_alignment, QWidget* parent) :
|
||||
QSplitter(Qt::Vertical, parent),
|
||||
@@ -192,4 +192,4 @@ void TrackViewSplitterHandle::paintEvent(QPaintEvent *)
|
||||
p.fillRect(rect(), palette().base());
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "common/define.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TrackViewSplitterHandle : public QSplitterHandle
|
||||
{
|
||||
@@ -77,6 +77,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TRACKVIEWSPLITTER_H
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "widget/nodeview/nodeviewundo.h"
|
||||
#include "widget/timelinewidget/timelinewidget.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
Node* TakeNodeFromParentGraph(Node* n, QObject* new_parent = nullptr)
|
||||
{
|
||||
@@ -1751,4 +1751,4 @@ void TimelineSetSelectionsCommand::undo()
|
||||
timeline_->SetSelections(old_);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "undo/undocommand.h"
|
||||
#include "widget/timelinewidget/timelinewidgetselections.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class BlockResizeCommand : public UndoCommand {
|
||||
public:
|
||||
@@ -633,6 +633,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEUNDOABLE_H
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "core.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
HandMovableView::HandMovableView(QWidget* parent) :
|
||||
QGraphicsView(parent),
|
||||
@@ -115,4 +115,4 @@ const QGraphicsView::DragMode &HandMovableView::GetDefaultDragMode() const
|
||||
return default_drag_mode_;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "tool/tool.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class HandMovableView : public QGraphicsView
|
||||
{
|
||||
@@ -54,6 +54,6 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // HANDMOVABLEVIEW_H
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "node/input/media/media.h"
|
||||
#include "project/item/footage/footage.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineView::TimelineView(Qt::Alignment vertical_alignment, QWidget *parent) :
|
||||
TimelineViewBase(parent),
|
||||
@@ -480,4 +480,4 @@ void TimelineView::UserSetTime(const int64_t &time)
|
||||
emit TimeChanged(time);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "widget/timelinewidget/undo/undo.h"
|
||||
#include "undo/undostack.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
/**
|
||||
* @brief A widget for viewing and interacting Sequences
|
||||
@@ -130,6 +130,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEVIEW_H
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "config/config.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
const double TimelineViewBase::kMaximumScale = 8192;
|
||||
|
||||
@@ -359,4 +359,4 @@ bool TimelineViewBase::WheelEventIsAZoomEvent(QWheelEvent *event)
|
||||
return (static_cast<bool>(event->modifiers() & Qt::ControlModifier) == !Config::Current()["ScrollZooms"].toBool());
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "widget/timelinewidget/snapservice.h"
|
||||
#include "widget/timelinewidget/timelinescaledobject.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TimelineViewBase : public HandMovableView, public TimelineScaledObject
|
||||
{
|
||||
@@ -134,6 +134,6 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEVIEWBASE_H
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "node/block/transition/transition.h"
|
||||
#include "widget/viewer/audiowaveformview.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineViewBlockItem::TimelineViewBlockItem(Block *block, QGraphicsItem* parent) :
|
||||
TimelineViewRect(parent),
|
||||
@@ -192,4 +192,4 @@ void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsI
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "timelineviewrect.h"
|
||||
#include "node/block/clip/clip.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
/**
|
||||
* @brief A graphical representation of a ClipBlock
|
||||
@@ -46,6 +46,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEVIEWCLIPITEM_H
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineViewGhostItem::TimelineViewGhostItem() :
|
||||
track_adj_(0),
|
||||
@@ -203,4 +203,4 @@ bool TimelineViewGhostItem::HasBeenAdjusted() const
|
||||
|| GetTrackAdjustment() != 0;
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "timelineviewblockitem.h"
|
||||
#include "timelineviewrect.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
/**
|
||||
* @brief A graphical representation of changes the user is making before they apply it
|
||||
*/
|
||||
@@ -142,6 +142,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEVIEWGHOSTITEM_H
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "widget/timelinewidget/timelinescaledobject.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineViewMouseEvent::TimelineViewMouseEvent(const qreal &scene_x,
|
||||
const double &scale_x,
|
||||
@@ -100,4 +100,4 @@ void TimelineViewMouseEvent::ignore()
|
||||
source_event_->ignore();
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "timeline/timelinecoordinate.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
class TimelineViewMouseEvent
|
||||
{
|
||||
@@ -84,6 +84,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEVIEWMOUSEEVENT_H
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "timelineviewrect.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
TimelineViewRect::TimelineViewRect(QGraphicsItem* parent) :
|
||||
QGraphicsRectItem(parent),
|
||||
@@ -62,4 +62,4 @@ void TimelineViewRect::TimebaseChangedEvent(const rational &tb)
|
||||
UpdateRect();
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "timeline/timelinecoordinate.h"
|
||||
#include "../timelinescaledobject.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
namespace olive {
|
||||
|
||||
/**
|
||||
* @brief A base class for graphical representations of Block nodes
|
||||
@@ -55,6 +55,6 @@ protected:
|
||||
TrackReference track_;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
}
|
||||
|
||||
#endif // TIMELINEVIEWRECT_H
|
||||
|
||||
Reference in New Issue
Block a user