]> git.sesse.net Git - nageru/commitdiff
Add an about dialog with licenses, as per GPLv3 requirements.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 12 Jan 2016 20:08:09 +0000 (21:08 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 12 Jan 2016 20:08:09 +0000 (21:08 +0100)
Makefile
aboutdialog.cpp [new file with mode: 0644]
aboutdialog.h [new file with mode: 0644]
mainwindow.cpp
mainwindow.h
ui_aboutdialog.ui [new file with mode: 0644]
ui_mainwindow.ui

index 6a8c445c27d2e8a95d99825cffefce59886d9b54..2ec9e0929e1254beb83fb8d33ba9812c2cb16eae 100644 (file)
--- 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 (file)
index 0000000..788aa97
--- /dev/null
@@ -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 (file)
index 0000000..3bc9ea5
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef ABOUTWINDOW_H
+#define ABOUTWINDOW_H
+
+#include <QDialog>
+#include <string>
+#include <vector>
+#include <sys/time.h>
+
+#include "mixer.h"
+
+namespace Ui {
+class AboutDialog;
+}  // namespace Ui
+
+class AboutDialog : public QDialog
+{
+       Q_OBJECT
+
+public:
+       AboutDialog();
+
+private:
+       Ui::AboutDialog *ui;
+};
+
+#endif
index 01d9de143569ac57a45d17f9065bff2b41239cea..311e573272de89d97f36173af23fca1dd5f81de0 100644 (file)
@@ -15,6 +15,7 @@
 #include <QSize>
 #include <QString>
 
+#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);
index 7a14b6e9b1593f83c9baa8a2ce131f153a4660f9..013217599efe2596c0f253b0af93ab3c354bd8b2 100644 (file)
@@ -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 (file)
index 0000000..9436210
--- /dev/null
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AboutDialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>684</width>
+    <height>544</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>About Nageru</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QTextEdit" name="textEdit">
+     <property name="html">
+      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body&gt;
+&lt;p&gt;
+Nageru is Copyright (C) 2015 Steinar H. Gunderson &amp;lt;sgunderson@bigfoot.com&amp;gt;&lt;br /&gt;
+Portions Copyright (C) 2003 Rune Holm.&lt;br /&gt;
+Portions Copyright (C) 2010-2011 Fons Adriaensen &amp;lt;fons@linuxaudio.org&amp;gt;&lt;br /&gt;
+Portions Copyright (C) 2012-2015 Fons Adriaensen &amp;lt;fons@linuxaudio.org&amp;gt;&lt;br /&gt;
+Portions Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.&lt;/p&gt;
+
+&lt;p&gt;This program is free software: you can redistribute it and/or modify&lt;br /&gt;
+it under the terms of the GNU General Public License as published by&lt;br /&gt;
+the Free Software Foundation, either version 3 of the License, or&lt;br /&gt;
+(at your option) any later version.&lt;/p&gt;
+
+&lt;p&gt;This program is distributed in the hope that it will be useful,&lt;br /&gt;
+but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&lt;br /&gt;
+GNU General Public License for more details.&lt;/p&gt;
+
+&lt;p&gt;You should have received a copy of the GNU General Public License&lt;br /&gt;
+along with this program. If not, see &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.gnu.org/licenses/&lt;/span&gt;&lt;/a&gt;&amp;gt;.&lt;/p&gt;
+
+&lt;p&gt;&lt;br /&gt;Portions of h264encode.h and h264encode.cpp:&lt;/p&gt;
+
+&lt;p&gt;Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.&lt;/p&gt;
+
+&lt;p&gt;Permission is hereby granted, free of charge, to any person obtaining a&lt;br /&gt;
+copy of this software and associated documentation files (the&lt;br /&gt;
+&amp;quot;Software&amp;quot;), to deal in the Software without restriction, including&lt;br /&gt;
+without limitation the rights to use, copy, modify, merge, publish,&lt;br /&gt;
+distribute, sub license, and/or sell copies of the Software, and to&lt;br /&gt;
+permit persons to whom the Software is furnished to do so, subject to&lt;br /&gt;
+the following conditions:&lt;/p&gt;
+
+&lt;p&gt;The above copyright notice and this permission notice (including the&lt;br /&gt;
+next paragraph) shall be included in all copies or substantial portions&lt;br /&gt;
+of the Software.&lt;/p&gt;
+
+&lt;p&gt;THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS&lt;br /&gt;
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF&lt;br /&gt;
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.&lt;br /&gt;
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR&lt;br /&gt;
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,&lt;br /&gt;
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE&lt;br /&gt;
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.&lt;/p&gt;
+
+&lt;/body&gt;&lt;/html&gt;
+       </string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 21cb7decfbf76df5efa8a452b081b778f8151a9d..c175c1d24632ab657cd5ea0e0bbdcde6050c21a0 100644 (file)
     <addaction name="cut_action"/>
     <addaction name="exit_action"/>
    </widget>
+   <widget class="QMenu" name="menu_Help">
+    <property name="title">
+     <string>&amp;Help</string>
+    </property>
+    <addaction name="about_action"/>
+   </widget>
    <addaction name="menuWhat"/>
+   <addaction name="menu_Help"/>
   </widget>
   <action name="exit_action">
    <property name="text">
     <string>&amp;Begin new video segment</string>
    </property>
   </action>
+  <action name="about_action">
+   <property name="text">
+    <string>&amp;About Nageru…</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <customwidgets>