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
@@ -22,6 +22,8 @@
#include <QAction>
OLIVE_NAMESPACE_ENTER
KeySequenceEditor::KeySequenceEditor(QWidget* parent, QAction* a)
: QKeySequenceEdit(parent), action(a) {
setKeySequence(action->shortcut());
@@ -46,3 +48,5 @@ QString KeySequenceEditor::export_shortcut() {
}
return nullptr;
}
OLIVE_NAMESPACE_EXIT
@@ -23,6 +23,10 @@
#include <QKeySequenceEdit>
#include "common/debug.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief The KeySequenceEditor class
*
@@ -97,4 +101,6 @@ private:
QAction* action;
};
OLIVE_NAMESPACE_EXIT
#endif // KEYSEQUENCEEDITOR_H
+4
View File
@@ -34,6 +34,8 @@
#include "tabs/preferencesaudiotab.h"
#include "tabs/preferenceskeyboardtab.h"
OLIVE_NAMESPACE_ENTER
PreferencesDialog::PreferencesDialog(QWidget *parent, QMenuBar* main_menu_bar) :
QDialog(parent)
{
@@ -94,3 +96,5 @@ void PreferencesDialog::AddTab(PreferencesTab *tab, const QString &title)
tabs_.append(tab);
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -30,6 +30,8 @@
#include "tabs/preferencestab.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief The PreferencesDialog class
*
@@ -67,4 +69,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESDIALOG_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 "preferencesappearancetab.h"
#include <QFileDialog>
@@ -5,6 +25,8 @@
#include <QLabel>
#include <QPushButton>
OLIVE_NAMESPACE_ENTER
PreferencesAppearanceTab::PreferencesAppearanceTab()
{
QVBoxLayout* layout = new QVBoxLayout(this);
@@ -50,3 +72,5 @@ void PreferencesAppearanceTab::Accept()
StyleManager::SetStyle(style_->currentData().toString());
}
}
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 PREFERENCESAPPEARANCETAB_H
#define PREFERENCESAPPEARANCETAB_H
@@ -7,6 +27,8 @@
#include "preferencestab.h"
#include "ui/style/style.h"
OLIVE_NAMESPACE_ENTER
class PreferencesAppearanceTab : public PreferencesTab
{
Q_OBJECT
@@ -34,4 +56,6 @@ private:
QString custom_style_path_;
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESAPPEARANCETAB_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 "preferencesaudiotab.h"
#include <QAudioDeviceInfo>
@@ -8,6 +28,8 @@
#include "audio/audiomanager.h"
#include "config/config.h"
OLIVE_NAMESPACE_ENTER
PreferencesAudioTab::PreferencesAudioTab() :
has_devices_(false)
{
@@ -169,3 +191,5 @@ void PreferencesAudioTab::RetrieveDeviceLists()
has_devices_ = true;
}
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 PREFERENCESAUDIOTAB_H
#define PREFERENCESAUDIOTAB_H
@@ -5,6 +25,8 @@
#include "preferencestab.h"
OLIVE_NAMESPACE_ENTER
class PreferencesAudioTab : public PreferencesTab
{
Q_OBJECT
@@ -44,4 +66,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESAUDIOTAB_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 "preferencesbehaviortab.h"
#include <QCheckBox>
@@ -5,6 +25,8 @@
#include "config/config.h"
OLIVE_NAMESPACE_ENTER
PreferencesBehaviorTab::PreferencesBehaviorTab()
{
QVBoxLayout* layout = new QVBoxLayout(this);
@@ -128,3 +150,5 @@ QTreeWidgetItem *PreferencesBehaviorTab::AddParent(const QString &text, QTreeWid
{
return AddParent(text, QString(), parent);
}
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 PREFERENCESBEHAVIORTAB_H
#define PREFERENCESBEHAVIORTAB_H
@@ -5,6 +25,8 @@
#include "preferencestab.h"
OLIVE_NAMESPACE_ENTER
class PreferencesBehaviorTab : public PreferencesTab
{
Q_OBJECT
@@ -26,4 +48,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESBEHAVIORTAB_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 "preferencesdisktab.h"
#include <QDir>
@@ -9,6 +29,8 @@
#include "render/diskmanager.h"
OLIVE_NAMESPACE_ENTER
PreferencesDiskTab::PreferencesDiskTab()
{
QVBoxLayout* outer_layout = new QVBoxLayout(this);
@@ -124,3 +146,5 @@ void PreferencesDiskTab::ClearDiskCache()
}
}
}
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 PREFERENCESDISKTAB_H
#define PREFERENCESDISKTAB_H
@@ -8,6 +28,8 @@
#include "preferencestab.h"
#include "widget/slider/floatslider.h"
OLIVE_NAMESPACE_ENTER
class PreferencesDiskTab : public PreferencesTab
{
Q_OBJECT
@@ -38,4 +60,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESDISKTAB_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 "preferencesgeneraltab.h"
#include <QGridLayout>
@@ -8,6 +28,8 @@
#include "dialog/sequence/sequence.h"
#include "project/item/sequence/sequence.h"
OLIVE_NAMESPACE_ENTER
PreferencesGeneralTab::PreferencesGeneralTab()
{
QVBoxLayout* layout = new QVBoxLayout(this);
@@ -121,3 +143,5 @@ void PreferencesGeneralTab::edit_default_sequence_settings()
sd.SetNameIsEditable(false);
sd.exec();
}
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 PREFERENCESGENERALTAB_H
#define PREFERENCESGENERALTAB_H
@@ -9,6 +29,8 @@
#include "project/item/sequence/sequence.h"
#include "widget/slider/floatslider.h"
OLIVE_NAMESPACE_ENTER
class PreferencesGeneralTab : public PreferencesTab
{
Q_OBJECT
@@ -39,4 +61,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESGENERALTAB_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 "preferenceskeyboardtab.h"
#include <QFileDialog>
@@ -7,6 +27,8 @@
#include <QPushButton>
#include <QVBoxLayout>
OLIVE_NAMESPACE_ENTER
PreferencesKeyboardTab::PreferencesKeyboardTab(QMenuBar *menubar)
{
QVBoxLayout* shortcut_layout = new QVBoxLayout(this);
@@ -216,3 +238,5 @@ void PreferencesKeyboardTab::save_shortcut_file() {
}
}
}
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 PREFERENCESKEYBOARDTAB_H
#define PREFERENCESKEYBOARDTAB_H
@@ -7,6 +27,8 @@
#include "preferencestab.h"
#include "../keysequenceeditor.h"
OLIVE_NAMESPACE_ENTER
class PreferencesKeyboardTab : public PreferencesTab
{
Q_OBJECT
@@ -112,4 +134,6 @@ private:
QVector<KeySequenceEditor*> key_shortcut_fields_;
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESKEYBOARDTAB_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 "preferencesqualitytab.h"
#include <QGroupBox>
@@ -8,6 +28,8 @@
#include "render/colormanager.h"
#include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
PreferencesQualityTab::PreferencesQualityTab()
{
QVBoxLayout* layout = new QVBoxLayout(this);
@@ -126,3 +148,5 @@ QComboBox *PreferencesQualityGroup::sample_fmt_combobox()
{
return sample_fmt_combobox_;
}
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 PREFERENCESQUALITYTAB_H
#define PREFERENCESQUALITYTAB_H
@@ -8,6 +28,8 @@
#include "preferencestab.h"
OLIVE_NAMESPACE_ENTER
class PreferencesQualityGroup : public QGroupBox
{
Q_OBJECT
@@ -46,4 +68,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESQUALITYTAB_H
+23 -4
View File
@@ -1,11 +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 "preferencestab.h"
PreferencesTab::PreferencesTab()
{
}
OLIVE_NAMESPACE_ENTER
bool PreferencesTab::Validate()
{
return true;
}
OLIVE_NAMESPACE_EXIT
+25 -1
View File
@@ -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 PREFERENCESTAB_H
#define PREFERENCESTAB_H
@@ -5,14 +25,18 @@
#include "config/config.h"
OLIVE_NAMESPACE_ENTER
class PreferencesTab : public QWidget
{
public:
PreferencesTab();
PreferencesTab() = default;
virtual bool Validate();
virtual void Accept() = 0;
};
OLIVE_NAMESPACE_EXIT
#endif // PREFERENCESTAB_H