From: Steinar H. Gunderson Date: Tue, 12 Jan 2016 20:08:09 +0000 (+0100) Subject: Add an about dialog with licenses, as per GPLv3 requirements. X-Git-Tag: 1.0.0~18 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=05a4191c8fc714a3aed823e1793f0209f6a91083;p=nageru Add an about dialog with licenses, as per GPLv3 requirements. --- diff --git a/Makefile b/Makefile index 6a8c445..2ec9e09 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ CXXFLAGS := -O2 -march=native -g -std=gnu++11 -Wall -Wno-deprecated-declarations LDFLAGS=$(shell pkg-config --libs $(PKG_MODULES)) -lEGL -lGL -pthread -lva -lva-drm -lva-x11 -lX11 -lavformat -lavcodec -lavutil -lswscale -lzita-resampler -lasound # Qt objects -OBJS=glwidget.o main.o mainwindow.o vumeter.o lrameter.o vu_common.o -OBJS += glwidget.moc.o mainwindow.moc.o vumeter.moc.o lrameter.moc.o +OBJS=glwidget.o main.o mainwindow.o vumeter.o lrameter.o vu_common.o aboutdialog.o +OBJS += glwidget.moc.o mainwindow.moc.o vumeter.moc.o lrameter.moc.o aboutdialog.moc.o # Mixer objects OBJS += h264encode.o mixer.o bmusb/bmusb.o pbo_frame_allocator.o context.o ref_counted_frame.o theme.o resampling_queue.o httpd.o ebu_r128_proc.o flags.o image_input.o stereocompressor.o filter.o alsa_output.o @@ -28,8 +28,10 @@ nageru: $(OBJS) mainwindow.o: mainwindow.cpp ui_mainwindow.h ui_display.h +aboutdialog.o: aboutdialog.cpp ui_aboutdialog.h + DEPS=$(OBJS:.o=.d) -include $(DEPS) clean: - $(RM) $(OBJS) $(DEPS) nageru ui_mainwindow.h ui_display.h glwidget.moc.cpp mainwindow.moc.cpp window.moc.cpp chain-*.frag *.dot + $(RM) $(OBJS) $(DEPS) nageru ui_mainwindow.h ui_display.h ui_about.h glwidget.moc.cpp mainwindow.moc.cpp window.moc.cpp chain-*.frag *.dot diff --git a/aboutdialog.cpp b/aboutdialog.cpp new file mode 100644 index 0000000..788aa97 --- /dev/null +++ b/aboutdialog.cpp @@ -0,0 +1,12 @@ +#include "aboutdialog.h" + +#include "ui_aboutdialog.h" + +using namespace std; + +AboutDialog::AboutDialog() + : ui(new Ui::AboutDialog) +{ + ui->setupUi(this); +} + diff --git a/aboutdialog.h b/aboutdialog.h new file mode 100644 index 0000000..3bc9ea5 --- /dev/null +++ b/aboutdialog.h @@ -0,0 +1,26 @@ +#ifndef ABOUTWINDOW_H +#define ABOUTWINDOW_H + +#include +#include +#include +#include + +#include "mixer.h" + +namespace Ui { +class AboutDialog; +} // namespace Ui + +class AboutDialog : public QDialog +{ + Q_OBJECT + +public: + AboutDialog(); + +private: + Ui::AboutDialog *ui; +}; + +#endif diff --git a/mainwindow.cpp b/mainwindow.cpp index 01d9de1..311e573 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -15,6 +15,7 @@ #include #include +#include "aboutdialog.h" #include "glwidget.h" #include "lrameter.h" #include "mixer.h" @@ -41,9 +42,10 @@ MainWindow::MainWindow() ui->me_live->set_output(Mixer::OUTPUT_LIVE); ui->me_preview->set_output(Mixer::OUTPUT_PREVIEW); - // The menu. + // The menus. connect(ui->cut_action, &QAction::triggered, this, &MainWindow::cut_triggered); connect(ui->exit_action, &QAction::triggered, this, &MainWindow::exit_triggered); + connect(ui->about_action, &QAction::triggered, this, &MainWindow::about_triggered), // Hook up the transition buttons. // TODO: Make them dynamic. @@ -150,6 +152,11 @@ void MainWindow::exit_triggered() close(); } +void MainWindow::about_triggered() +{ + AboutDialog().exec(); +} + void MainWindow::gain_staging_knob_changed(int value) { ui->gainstaging_auto_checkbox->setCheckState(Qt::Unchecked); diff --git a/mainwindow.h b/mainwindow.h index 7a14b6e..0132175 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -34,6 +34,7 @@ public: public slots: void cut_triggered(); void exit_triggered(); + void about_triggered(); void transition_clicked(int transition_number); void channel_clicked(int channel_number); void wb_button_clicked(int channel_number); diff --git a/ui_aboutdialog.ui b/ui_aboutdialog.ui new file mode 100644 index 0000000..9436210 --- /dev/null +++ b/ui_aboutdialog.ui @@ -0,0 +1,118 @@ + + + AboutDialog + + + + 0 + 0 + 684 + 544 + + + + About Nageru + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /></head><body> +<p> +Nageru is Copyright (C) 2015 Steinar H. Gunderson &lt;sgunderson@bigfoot.com&gt;<br /> +Portions Copyright (C) 2003 Rune Holm.<br /> +Portions Copyright (C) 2010-2011 Fons Adriaensen &lt;fons@linuxaudio.org&gt;<br /> +Portions Copyright (C) 2012-2015 Fons Adriaensen &lt;fons@linuxaudio.org&gt;<br /> +Portions Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.</p> + +<p>This program is free software: you can redistribute it and/or modify<br /> +it under the terms of the GNU General Public License as published by<br /> +the Free Software Foundation, either version 3 of the License, or<br /> +(at your option) any later version.</p> + +<p>This program is distributed in the hope that it will be useful,<br /> +but WITHOUT ANY WARRANTY; without even the implied warranty of<br /> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br /> +GNU General Public License for more details.</p> + +<p>You should have received a copy of the GNU General Public License<br /> +along with this program. If not, see &lt;<a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>&gt;.</p> + +<p><br />Portions of h264encode.h and h264encode.cpp:</p> + +<p>Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.</p> + +<p>Permission is hereby granted, free of charge, to any person obtaining a<br /> +copy of this software and associated documentation files (the<br /> +&quot;Software&quot;), to deal in the Software without restriction, including<br /> +without limitation the rights to use, copy, modify, merge, publish,<br /> +distribute, sub license, and/or sell copies of the Software, and to<br /> +permit persons to whom the Software is furnished to do so, subject to<br /> +the following conditions:</p> + +<p>The above copyright notice and this permission notice (including the<br /> +next paragraph) shall be included in all copies or substantial portions<br /> +of the Software.</p> + +<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS<br /> +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br /> +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.<br /> +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR<br /> +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,<br /> +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE<br /> +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> + +</body></html> + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + Dialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + Dialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/ui_mainwindow.ui b/ui_mainwindow.ui index 21cb7de..c175c1d 100644 --- a/ui_mainwindow.ui +++ b/ui_mainwindow.ui @@ -791,7 +791,14 @@ + + + &Help + + + + @@ -803,6 +810,11 @@ &Begin new video segment + + + &About Nageru… + +