implemented new audio monitor widget

This commit is contained in:
itsmattkc
2019-10-23 03:21:05 +11:00
parent c38b4dca99
commit 52f4c59bec
20 changed files with 348 additions and 18 deletions
+1
View File
@@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
add_subdirectory(audiomonitor)
add_subdirectory(node)
add_subdirectory(param)
add_subdirectory(project)
+22
View File
@@ -0,0 +1,22 @@
# 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/>.
set(OLIVE_SOURCES
${OLIVE_SOURCES}
panel/audiomonitor/audiomonitor.h
panel/audiomonitor/audiomonitor.cpp
PARENT_SCOPE
)
+27
View File
@@ -0,0 +1,27 @@
#include "audiomonitor.h"
AudioMonitorPanel::AudioMonitorPanel(QWidget *parent) :
PanelWidget(parent)
{
// FIXME: This won't work if there's ever more than one of this panel
setObjectName("AudioMonitor");
audio_monitor_ = new AudioMonitor(this);
setWidget(audio_monitor_);
Retranslate();
}
void AudioMonitorPanel::changeEvent(QEvent *e)
{
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
PanelWidget::changeEvent(e);
}
void AudioMonitorPanel::Retranslate()
{
SetTitle(tr("Audio Monitor"));
}
+24
View File
@@ -0,0 +1,24 @@
#ifndef AUDIOMONITORPANEL_H
#define AUDIOMONITORPANEL_H
#include "widget/audiomonitor/audiomonitor.h"
#include "widget/panel/panel.h"
/**
* @brief PanelWidget wrapper around an AudioMonitor
*/
class AudioMonitorPanel : public PanelWidget
{
public:
AudioMonitorPanel(QWidget* parent = nullptr);
protected:
virtual void changeEvent(QEvent* e) override;
private:
void Retranslate();
AudioMonitor* audio_monitor_;
};
#endif // AUDIOMONITORPANEL_H
+1 -1
View File
@@ -49,7 +49,7 @@ void NodePanel::changeEvent(QEvent *e)
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
QDockWidget::changeEvent(e);
PanelWidget::changeEvent(e);
}
void NodePanel::Retranslate()
+1 -1
View File
@@ -45,7 +45,7 @@ void ParamPanel::changeEvent(QEvent *e)
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
QDockWidget::changeEvent(e);
PanelWidget::changeEvent(e);
}
void ParamPanel::Retranslate()
+1 -1
View File
@@ -102,7 +102,7 @@ void ProjectPanel::changeEvent(QEvent *e)
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
QDockWidget::changeEvent(e);
PanelWidget::changeEvent(e);
}
void ProjectPanel::Retranslate()
+1 -1
View File
@@ -46,7 +46,7 @@ void TaskManagerPanel::changeEvent(QEvent *e)
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
QDockWidget::changeEvent(e);
PanelWidget::changeEvent(e);
}
void TaskManagerPanel::Retranslate()
+1 -1
View File
@@ -114,7 +114,7 @@ void TimelinePanel::changeEvent(QEvent *e)
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
QDockWidget::changeEvent(e);
PanelWidget::changeEvent(e);
}
void TimelinePanel::Retranslate()
+1 -1
View File
@@ -50,7 +50,7 @@ void ToolPanel::changeEvent(QEvent *e)
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
QDockWidget::changeEvent(e);
PanelWidget::changeEvent(e);
}
void ToolPanel::Retranslate()
+1 -1
View File
@@ -122,7 +122,7 @@ void ViewerPanel::changeEvent(QEvent *e)
if (e->type() == QEvent::LanguageChange) {
Retranslate();
}
QDockWidget::changeEvent(e);
PanelWidget::changeEvent(e);
}
void ViewerPanel::Retranslate()