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
+4
View File
@@ -22,6 +22,8 @@
#include <QAudio>
OLIVE_NAMESPACE_ENTER
FloatSlider::FloatSlider(QWidget *parent) :
SliderBase(kFloat, parent),
display_type_(kNormal)
@@ -162,3 +164,5 @@ void FloatSlider::ConvertValue(QVariant v)
{
emit ValueChanged(v.toDouble());
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -23,6 +23,8 @@
#include "sliderbase.h"
OLIVE_NAMESPACE_ENTER
class FloatSlider : public SliderBase
{
Q_OBJECT
@@ -64,4 +66,6 @@ private:
DisplayType display_type_;
};
OLIVE_NAMESPACE_EXIT
#endif // FLOATSLIDER_H
+4
View File
@@ -20,6 +20,8 @@
#include "integerslider.h"
OLIVE_NAMESPACE_ENTER
IntegerSlider::IntegerSlider(QWidget* parent) :
SliderBase(kInteger, parent)
{
@@ -69,3 +71,5 @@ void IntegerSlider::ConvertValue(QVariant v)
{
emit ValueChanged(v.toInt());
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -23,6 +23,8 @@
#include "sliderbase.h"
OLIVE_NAMESPACE_ENTER
class IntegerSlider : public SliderBase
{
Q_OBJECT
@@ -47,4 +49,6 @@ private slots:
void ConvertValue(QVariant v);
};
OLIVE_NAMESPACE_EXIT
#endif // INTEGERSLIDER_H
+4
View File
@@ -24,6 +24,8 @@
#include <QEvent>
#include <QMessageBox>
OLIVE_NAMESPACE_ENTER
SliderBase::SliderBase(Mode mode, QWidget *parent) :
QStackedWidget(parent),
decimal_places_(1),
@@ -315,3 +317,5 @@ void SliderBase::LineEditCancelled()
editor_->blockSignals(false);
label_->blockSignals(false);
}
OLIVE_NAMESPACE_EXIT
+3
View File
@@ -26,6 +26,7 @@
#include "sliderlabel.h"
#include "widget/focusablelineedit/focusablelineedit.h"
OLIVE_NAMESPACE_ENTER
class SliderBase : public QStackedWidget
{
Q_OBJECT
@@ -121,4 +122,6 @@ private slots:
void LineEditCancelled();
};
OLIVE_NAMESPACE_EXIT
#endif // SLIDERBASE_H
+4
View File
@@ -23,6 +23,8 @@
#include <QApplication>
#include <QMouseEvent>
OLIVE_NAMESPACE_ENTER
SliderLabel::SliderLabel(QWidget *parent) :
QLabel(parent)
{
@@ -90,3 +92,5 @@ void SliderLabel::focusInEvent(QFocusEvent *event)
emit focused();
}
}
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -23,6 +23,10 @@
#include <QLabel>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class SliderLabel : public QLabel
{
Q_OBJECT
@@ -52,4 +56,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // SLIDERLABEL_H
+4
View File
@@ -20,6 +20,8 @@
#include "stringslider.h"
OLIVE_NAMESPACE_ENTER
StringSlider::StringSlider(QWidget* parent) :
SliderBase(kString, parent)
{
@@ -46,3 +48,5 @@ void StringSlider::ConvertValue(QVariant v)
{
emit ValueChanged(v.toString());
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -23,6 +23,8 @@
#include "sliderbase.h"
OLIVE_NAMESPACE_ENTER
class StringSlider : public SliderBase
{
Q_OBJECT
@@ -45,4 +47,6 @@ private slots:
void ConvertValue(QVariant v);
};
OLIVE_NAMESPACE_EXIT
#endif // STRINGSLIDER_H
+24
View File
@@ -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/>.
***/
#include "timeslider.h"
#include "common/timecodefunctions.h"
#include "core.h"
OLIVE_NAMESPACE_ENTER
TimeSlider::TimeSlider(QWidget *parent) :
IntegerSlider(parent)
{
@@ -40,3 +62,5 @@ void TimeSlider::TimecodeDisplayChanged()
{
UpdateLabel(Value());
}
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -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 TIMESLIDER_H
#define TIMESLIDER_H
#include "common/rational.h"
#include "integerslider.h"
OLIVE_NAMESPACE_ENTER
class TimeSlider : public IntegerSlider
{
Q_OBJECT
@@ -25,4 +47,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // TIMESLIDER_H