-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #525 from nextcloud/feature/132/about_dialog
Add legal notice button to about dialog
- Loading branch information
Showing
8 changed files
with
227 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (C) by Roeland Jago Douma <[email protected]> | ||
* | ||
* 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 2 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. | ||
*/ | ||
|
||
#include "legalnotice.h" | ||
#include "ui_legalnotice.h" | ||
|
||
namespace OCC { | ||
|
||
|
||
LegalNotice::LegalNotice(QDialog *parent) | ||
: QDialog(parent) | ||
, _ui(new Ui::LegalNotice) | ||
{ | ||
_ui->setupUi(this); | ||
|
||
QString notice = tr("<p>Copyright 2017-2018 Nextcloud GmbH<br />" | ||
"Copyright 2012-2018 ownCloud GmbH</p>"); | ||
|
||
notice += tr("<p>Licensed under the GNU General Public License (GPL) Version 2.0 or any later version.</p>"); | ||
|
||
_ui->notice->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction); | ||
_ui->notice->setText(notice); | ||
_ui->notice->setWordWrap(true); | ||
|
||
connect(_ui->closeButton, &QPushButton::clicked, this, &LegalNotice::accept); | ||
} | ||
|
||
LegalNotice::~LegalNotice() | ||
{ | ||
delete _ui; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (C) by Roeland Jago Douma <[email protected]> | ||
* | ||
* 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 2 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. | ||
*/ | ||
|
||
#ifndef LEGALNOTICE_H | ||
#define LEGALNOTICE_H | ||
|
||
#include <QDialog> | ||
|
||
namespace OCC { | ||
class IgnoreListEditor; | ||
class SyncLogDialog; | ||
|
||
namespace Ui { | ||
class LegalNotice; | ||
} | ||
|
||
/** | ||
* @brief The LegalNotice class | ||
* @ingroup gui | ||
*/ | ||
class LegalNotice : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit LegalNotice(QDialog *parent = 0); | ||
~LegalNotice(); | ||
|
||
private: | ||
Ui::LegalNotice *_ui; | ||
}; | ||
|
||
} // namespace OCC | ||
#endif // LEGALNOTICE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>OCC::LegalNotice</class> | ||
<widget class="QDialog" name="OCC::LegalNotice"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>291</width> | ||
<height>260</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Dialog</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="QLabel" name="header"> | ||
<property name="font"> | ||
<font> | ||
<family>Arabic Newspaper</family> | ||
<pointsize>11</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>Legal notice</string> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="notice"> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="closeButton"> | ||
<property name="text"> | ||
<string>Close</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters