Browse Source

Lizenzdialog hinzugefügt.

Lizenztext aktualisiert.
remotes/origin/master
Martin Brodbeck 6 years ago
parent
commit
25fb0a371f
  1. 2
      license.txt
  2. 4
      src/CMakeLists.txt
  3. 14
      src/licensedialog.cpp
  4. 22
      src/licensedialog.h
  5. 93
      src/licensedialog.ui
  6. 7
      src/mainwindow.cpp
  7. 1
      src/mainwindow.h
  8. 32
      src/mainwindow.ui

2
license.txt

@ -1,4 +1,4 @@
Copyright (c) 2014 Martin Brodbeck
Copyright (c) 2015 Martin Brodbeck
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

4
src/CMakeLists.txt

@ -3,9 +3,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DI
#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
FILE(GLOB bibellese_HEADERS *.h)
SET(bibellese_WIDGET_HEADERS mainwindow.h settingsdialog.h)
SET(bibellese_WIDGET_HEADERS mainwindow.h settingsdialog.h licensedialog.h)
FILE(GLOB bibellese_SOURCES *.cpp)
SET(bibellese_FORMS mainwindow.ui settingsdialog.ui)
SET(bibellese_FORMS mainwindow.ui settingsdialog.ui licensedialog.ui)
ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(CMAKE_AUTOMOC ON)

14
src/licensedialog.cpp

@ -0,0 +1,14 @@
#include "licensedialog.h"
#include "ui_licensedialog.h"
LicenseDialog::LicenseDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::LicenseDialog)
{
ui->setupUi(this);
}
LicenseDialog::~LicenseDialog()
{
delete ui;
}

22
src/licensedialog.h

@ -0,0 +1,22 @@
#ifndef LICENSEDIALOG_H
#define LICENSEDIALOG_H
#include <QDialog>
namespace Ui {
class LicenseDialog;
}
class LicenseDialog : public QDialog
{
Q_OBJECT
public:
explicit LicenseDialog(QWidget *parent = 0);
~LicenseDialog();
private:
Ui::LicenseDialog *ui;
};
#endif // LICENSEDIALOG_H

93
src/licensedialog.ui

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LicenseDialog</class>
<widget class="QDialog" name="LicenseDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>560</width>
<height>640</height>
</rect>
</property>
<property name="windowTitle">
<string>Lizenzinformation</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPlainTextEdit" name="plainTextEdit">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="plainText">
<string>Copyright (c) 2015 Martin Brodbeck
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the &quot;Software&quot;), to deal
in the Software without restriction, including without limitation the rights
to use, publish and/or distribute copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</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>rejected()</signal>
<receiver>LicenseDialog</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>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>LicenseDialog</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>
</connections>
</ui>

7
src/mainwindow.cpp

@ -14,6 +14,7 @@
#include "jahresbibel.h"
#include "perikopen.h"
#include "settingsdialog.h"
#include "licensedialog.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
@ -190,6 +191,12 @@ void MainWindow::showSettings()
dialog.exec();
}
void MainWindow::showLicense()
{
LicenseDialog dialog(this);
dialog.exec();
}
void MainWindow::exportToIcal()
{
QSettings settings;

1
src/mainwindow.h

@ -25,6 +25,7 @@ public slots:
void newJahresbibelPlan();
void newPerikopenPlan(QAction *action);
void showSettings();
void showLicense();
void exportToIcal();
void aboutProg();
void aboutQt();

32
src/mainwindow.ui

@ -70,7 +70,9 @@
<string>Exportieren...</string>
</property>
<property name="icon">
<iconset theme="document-save-as"/>
<iconset theme="document-save-as">
<normaloff/>
</iconset>
</property>
</widget>
</item>
@ -144,6 +146,7 @@
</property>
<addaction name="actionAboutBibellese"/>
<addaction name="actionAboutQt"/>
<addaction name="actionLicense"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menuBearbeiten"/>
@ -219,6 +222,16 @@
<string>c</string>
</property>
</action>
<action name="actionLicense">
<property name="icon">
<iconset theme="help-about">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>&amp;Lizenz</string>
</property>
</action>
</widget>
<resources/>
<connections>
@ -318,6 +331,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>actionLicense</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>showLicense()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>319</x>
<y>399</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>showSettings()</slot>
@ -326,5 +355,6 @@
<slot>newJahresbibelPlan()</slot>
<slot>aboutQt()</slot>
<slot>newPerikopenPlan()</slot>
<slot>showLicense()</slot>
</slots>
</ui>
Loading…
Cancel
Save