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:
itsmattkc
2020-04-06 15:29:53 +10:00
parent 82b6ddccc8
commit 1aa87cbda6
519 changed files with 7939 additions and 158 deletions
@@ -27,6 +27,8 @@
#include "common/timecodefunctions.h"
#include "node/output/viewer/viewer.h"
OLIVE_NAMESPACE_ENTER
NodeParamView::NodeParamView(QWidget *parent) :
TimeBasedWidget(true, false, parent),
last_scroll_val_(0)
@@ -224,3 +226,5 @@ void NodeParamView::ForceKeyframeViewToScroll(int min, int max)
bottom_item_->setY(keyframe_view_->viewport()->height() + max);
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -29,6 +29,8 @@
#include "widget/keyframeview/keyframeview.h"
#include "widget/timebased/timebased.h"
OLIVE_NAMESPACE_ENTER
class NodeParamView : public TimeBasedWidget
{
Q_OBJECT
@@ -74,4 +76,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // NODEPARAMVIEW_H
@@ -30,6 +30,8 @@
#include "project/item/sequence/sequence.h"
#include "ui/icons/icons.h"
OLIVE_NAMESPACE_ENTER
NodeParamViewItem::NodeParamViewItem(Node *node, QWidget *parent) :
QWidget(parent),
node_(node)
@@ -281,3 +283,5 @@ void NodeParamViewItemTitleBar::paintEvent(QPaintEvent *event)
p.setPen(palette().text().color());
p.drawLine(0, bottom, width(), bottom);
}
OLIVE_NAMESPACE_EXIT
@@ -32,6 +32,8 @@
#include "nodeparamviewwidgetbridge.h"
#include "widget/clickablelabel/clickablelabel.h"
OLIVE_NAMESPACE_ENTER
class NodeParamViewItemTitleBar : public QWidget {
public:
NodeParamViewItemTitleBar(QWidget* parent = nullptr);
@@ -109,4 +111,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // NODEPARAMVIEWITEM_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 "nodeparamviewkeyframecontrol.h"
#include <QHBoxLayout>
@@ -7,6 +27,8 @@
#include "nodeparamviewundo.h"
#include "ui/icons/icons.h"
OLIVE_NAMESPACE_ENTER
NodeParamViewKeyframeControl::NodeParamViewKeyframeControl(bool right_align, QWidget *parent) :
QWidget(parent),
input_(nullptr)
@@ -254,3 +276,5 @@ void NodeParamViewKeyframeControl::KeyframeEnableChanged(bool e)
Core::instance()->undo_stack()->pushIfHasChildren(command);
}
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 NODEPARAMVIEWKEYFRAMECONTROL_H
#define NODEPARAMVIEWKEYFRAMECONTROL_H
@@ -7,6 +27,8 @@
#include "node/input.h"
#include "widget/keyframeview/timetargetobject.h"
OLIVE_NAMESPACE_ENTER
class NodeParamViewKeyframeControl : public QWidget, public TimeTargetObject
{
Q_OBJECT
@@ -55,4 +77,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // NODEPARAMVIEWKEYFRAMECONTROL_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 "nodeparamviewundo.h"
OLIVE_NAMESPACE_ENTER
NodeParamSetKeyframingCommand::NodeParamSetKeyframingCommand(NodeInput *input, bool setting, QUndoCommand *parent) :
UndoCommand(parent),
input_(input),
@@ -144,3 +166,5 @@ void NodeParamSetStandardValueCommand::undo_internal()
{
input_->set_standard_value(old_value_, track_);
}
OLIVE_NAMESPACE_EXIT
@@ -1,9 +1,31 @@
/***
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 NODEPARAMVIEWUNDO_H
#define NODEPARAMVIEWUNDO_H
#include "node/input.h"
#include "undo/undocommand.h"
OLIVE_NAMESPACE_ENTER
class NodeParamSetKeyframingCommand : public UndoCommand {
public:
NodeParamSetKeyframingCommand(NodeInput* input, bool setting, QUndoCommand* parent = nullptr);
@@ -102,4 +124,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // NODEPARAMVIEWUNDO_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 "nodeparamviewwidgetbridge.h"
#include <QCheckBox>
@@ -17,6 +37,8 @@
#include "widget/slider/floatslider.h"
#include "widget/slider/integerslider.h"
OLIVE_NAMESPACE_ENTER
NodeParamViewWidgetBridge::NodeParamViewWidgetBridge(NodeInput *input, QObject *parent) :
QObject(parent),
input_(input),
@@ -571,3 +593,5 @@ void NodeParamViewWidgetBridge::PropertyChanged(const QString &key, const QVaria
}
}
}
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 NODEPARAMVIEWWIDGETBRIDGE_H
#define NODEPARAMVIEWWIDGETBRIDGE_H
@@ -7,6 +27,8 @@
#include "widget/keyframeview/timetargetobject.h"
#include "widget/slider/sliderbase.h"
OLIVE_NAMESPACE_ENTER
class NodeParamViewWidgetBridge : public QObject, public TimeTargetObject
{
Q_OBJECT
@@ -52,4 +74,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // NODEPARAMVIEWWIDGETBRIDGE_H