mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-08-03 20:56:49 -04:00
Add an about dialog.
This commit is contained in:
parent
96b23c5c1e
commit
76214e6f53
@ -42,7 +42,8 @@ SOURCES += \
|
||||
src/webview.cpp \
|
||||
src/searchbar.cpp \
|
||||
src/mainmenu.cpp \
|
||||
src/webpage.cpp
|
||||
src/webpage.cpp \
|
||||
src/about.cpp
|
||||
|
||||
HEADERS += \
|
||||
src/mainwindow.h \
|
||||
@ -57,10 +58,12 @@ HEADERS += \
|
||||
src/webview.h \
|
||||
src/searchbar.h \
|
||||
src/mainmenu.h \
|
||||
src/webpage.h
|
||||
src/webpage.h \
|
||||
src/about.h
|
||||
|
||||
FORMS += \
|
||||
ui/mainwindow.ui
|
||||
ui/mainwindow.ui \
|
||||
ui/about.ui
|
||||
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr/local
|
||||
|
@ -131,3 +131,13 @@ QTabBar::close-button {
|
||||
image: url(":/icons/close.svg");
|
||||
subcontrol-position: right;
|
||||
}
|
||||
|
||||
|
||||
/* -----------------------------------------
|
||||
TabWidget
|
||||
*/
|
||||
|
||||
#aboutText {
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -60,6 +60,7 @@
|
||||
<file>fonts/SegoeUI/segoeuil.ttf</file>
|
||||
<file>fonts/SegoeUI/seguisb.ttf</file>
|
||||
<file>fonts/SegoeUI/segoeui.ttf</file>
|
||||
<file>texts/about.html</file>
|
||||
<file>css/style.css</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
24
resources/texts/about.html
Normal file
24
resources/texts/about.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html>
|
||||
<body>
|
||||
<img src="qrc:/icons/kiwix/app_icon.svg" height="240" width="240" style="float:right"/>
|
||||
<h1>Kiwix Desktop</h1>
|
||||
<p>Kiwix enables you to have the whole Wikipedia at hand wherever you go! On a boat, in the middle of nowhere or in jail, Kiwix gives you access to the whole human knowledge. You don't need Internet, everything is store on your computer.</p>
|
||||
<p><a href="http://kiwix.org">Learn more About Kiwix</a></p>
|
||||
<h2>Release</h2>
|
||||
<p>
|
||||
This software is released under the terms of the GNU General Public License version 3. View the source code on <a href="https://github.com/kiwix/kiwix-desktop">Github</a>.
|
||||
</p>
|
||||
<h2>Libraries</h2>
|
||||
<ul>
|
||||
<li>Libzim - GPLv3 (<a href="http://www.openzim.org">openzim.org</a>)</li>
|
||||
<li>Libkiwix - GPLv3 (<a href="https://github.com/kiwix/kiwix-lib">https://github.com/kiwix/kiwix-lib</a>)</li>
|
||||
<li>Qt - LGVLv3 (<a href="https://qt.io">qt.io</a>)</li>
|
||||
<li>Xapian - GPL (<a href="https://xapian.org">xapian.org</a>)</li>
|
||||
<li>CTTP2 - BSD (<a href="http://ctpp.havoc.ru">ctpp.havoc.ru</a>)</li>
|
||||
<li>Pugixml - MIT (<a href="https://pugixml.org">pugixml.org</a>)</li>
|
||||
<li>ICU - ICU License (<a href="http://icu-project.org">icu-project.org</a>)</li>
|
||||
<li>Libmicrohttpd - GPL (<a href="https://www.gnu.org/software/libmicrohttpd/">www.gnu.org/software/libmicrohttpd/</a>)</li>
|
||||
<li>Aria2 - GPL <a href="https://aria2.github.io">aria2.github.io</a>()</li>
|
||||
</ul>
|
||||
</body></html>
|
14
src/about.cpp
Normal file
14
src/about.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "about.h"
|
||||
#include "ui_about.h"
|
||||
|
||||
About::About(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
About::~About()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
src/about.h
Normal file
22
src/about.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef ABOUT_H
|
||||
#define ABOUT_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AboutDialog;
|
||||
}
|
||||
|
||||
class About : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit About(QWidget *parent = 0);
|
||||
~About();
|
||||
|
||||
private:
|
||||
Ui::AboutDialog *ui;
|
||||
};
|
||||
|
||||
#endif // ABOUT_H
|
@ -9,7 +9,8 @@
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
mp_ui(new Ui::MainWindow)
|
||||
mp_ui(new Ui::MainWindow),
|
||||
mp_about(new About(this))
|
||||
{
|
||||
mp_ui->setupUi(this);
|
||||
mp_ui->tabWidget->tabBar()->setExpanding(false);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QMainWindow>
|
||||
#include "webview.h"
|
||||
#include "tabwidget.h"
|
||||
#include "about.h"
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
@ -24,6 +25,7 @@ protected slots:
|
||||
|
||||
private:
|
||||
Ui::MainWindow *mp_ui;
|
||||
About *mp_about;
|
||||
|
||||
};
|
||||
|
||||
|
81
ui/about.ui
Normal file
81
ui/about.ui
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutDialog</class>
|
||||
<widget class="QDialog" name="AboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>850</width>
|
||||
<height>650</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About</string>
|
||||
</property>
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QTextBrowser" name="aboutText">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
<property name="source">
|
||||
<url>
|
||||
<string>qrc:/texts/about.html</string>
|
||||
</url>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
x
Reference in New Issue
Block a user