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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user