various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were missing it.
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
#include "node/input/media/media.h"
|
||||
#include "project/item/footage/footage.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
TimelineView::TimelineView(Qt::Alignment vertical_alignment, QWidget *parent) :
|
||||
TimelineViewBase(parent),
|
||||
connected_track_list_(nullptr)
|
||||
@@ -354,3 +356,5 @@ void TimelineView::UserSetTime(const int64_t &time)
|
||||
SetTime(time);
|
||||
emit TimeChanged(time);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "widget/timelinewidget/undo/undo.h"
|
||||
#include "undo/undostack.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
/**
|
||||
* @brief A widget for viewing and interacting Sequences
|
||||
*
|
||||
@@ -108,4 +110,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
#endif // TIMELINEVIEW_H
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2019 Olive Team
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#include "timelineviewbase.h"
|
||||
|
||||
#include <QGraphicsRectItem>
|
||||
@@ -9,6 +29,8 @@
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "config/config.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
const double TimelineViewBase::kMaximumScale = 8192;
|
||||
|
||||
TimelineViewBase::TimelineViewBase(QWidget *parent) :
|
||||
@@ -322,3 +344,5 @@ void TimelineViewBase::ApplicationToolChanged(Tool::Item tool)
|
||||
|
||||
ToolChangedEvent(tool);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2019 Olive Team
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#ifndef TIMELINEVIEWBASE_H
|
||||
#define TIMELINEVIEWBASE_H
|
||||
|
||||
@@ -8,6 +28,8 @@
|
||||
#include "timelineviewenditem.h"
|
||||
#include "widget/timelinewidget/timelinescaledobject.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
class TimelineViewBase : public QGraphicsView, public TimelineScaledObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -99,4 +121,6 @@ private slots:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
#endif // TIMELINEVIEWBASE_H
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "node/block/transition/transition.h"
|
||||
#include "widget/viewer/audiowaveformview.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
TimelineViewBlockItem::TimelineViewBlockItem(Block *block, QGraphicsItem* parent) :
|
||||
TimelineViewRect(parent),
|
||||
block_(block)
|
||||
@@ -196,3 +198,5 @@ void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsI
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "timelineviewrect.h"
|
||||
#include "node/block/clip/clip.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
/**
|
||||
* @brief A graphical representation of a ClipBlock
|
||||
*/
|
||||
@@ -44,4 +46,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
#endif // TIMELINEVIEWCLIPITEM_H
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2019 Olive Team
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#include "timelineviewenditem.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
TimelineViewEndItem::TimelineViewEndItem(QGraphicsItem *parent) :
|
||||
TimelineViewRect(parent),
|
||||
end_padding_(0)
|
||||
@@ -35,3 +57,5 @@ void TimelineViewEndItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
|
||||
Q_UNUSED(option)
|
||||
Q_UNUSED(widget)
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2019 Olive Team
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
***/
|
||||
|
||||
#ifndef TIMELINEVIEWENDITEM_H
|
||||
#define TIMELINEVIEWENDITEM_H
|
||||
|
||||
#include "timelineviewrect.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
/**
|
||||
* @brief An item placed at the end point of the Timeline to ensure the correct scene size
|
||||
*/
|
||||
@@ -26,4 +48,6 @@ private:
|
||||
int end_padding_;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
#endif // TIMELINEVIEWENDITEM_H
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
TimelineViewGhostItem::TimelineViewGhostItem(QGraphicsItem *parent) :
|
||||
TimelineViewRect(parent),
|
||||
track_adj_(0),
|
||||
@@ -211,3 +213,5 @@ void TimelineViewGhostItem::UpdateRect()
|
||||
|
||||
setPos(TimeToScene(GetAdjustedIn()), 0);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "timelineviewblockitem.h"
|
||||
#include "timelineviewrect.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
/**
|
||||
* @brief A graphical representation of changes the user is making before they apply it
|
||||
*/
|
||||
@@ -105,4 +106,6 @@ private:
|
||||
bool can_move_tracks_;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
#endif // TIMELINEVIEWGHOSTITEM_H
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "widget/timelinewidget/timelinescaledobject.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
TimelineViewMouseEvent::TimelineViewMouseEvent(const qreal &scene_x,
|
||||
const double &scale_x,
|
||||
const rational &timebase,
|
||||
@@ -90,3 +92,5 @@ void TimelineViewMouseEvent::ignore()
|
||||
if (source_event_ != nullptr)
|
||||
source_event_->ignore();
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "timeline/timelinecoordinate.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
class TimelineViewMouseEvent
|
||||
{
|
||||
public:
|
||||
@@ -77,4 +79,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
#endif // TIMELINEVIEWMOUSEEVENT_H
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "timelineviewrect.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
TimelineViewRect::TimelineViewRect(QGraphicsItem* parent) :
|
||||
QGraphicsRectItem(parent),
|
||||
y_(0),
|
||||
@@ -59,3 +61,5 @@ void TimelineViewRect::TimebaseChangedEvent(const rational &tb)
|
||||
|
||||
UpdateRect();
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "timeline/timelinecoordinate.h"
|
||||
#include "../timelinescaledobject.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
/**
|
||||
* @brief A base class for graphical representations of Block nodes
|
||||
*/
|
||||
@@ -53,4 +55,6 @@ protected:
|
||||
TrackReference track_;
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
#endif // TIMELINEVIEWRECT_H
|
||||
|
||||
Reference in New Issue
Block a user