Permalink
Browse files

About dialogs added

  • Loading branch information...
vookimedlo committed Sep 22, 2017
1 parent 47d809d commit 5745f9fe549e30c03fdce91d265ab8d059654364
@@ -0,0 +1,4 @@
All images located at src/resource/openclipart are subject of following license [https://creativecommons.org/publicdomain/zero/1.0/]

Direct URLs to original location of individual images:
https://openclipart.org/detail/182384/a-beautiful-womans-face
@@ -22,7 +22,8 @@ SOURCES += \
../../src/ui/ImageArea.cpp \
../../src/model/ImageCatalog.cpp \
../../src/util/misc.cpp \
../../src/ui/support/RecentFileAction.cpp
../../src/ui/support/RecentFileAction.cpp \
../../src/ui/AboutComponentsDialog.cpp


HEADERS += \
@@ -33,10 +34,13 @@ HEADERS += \
../../src/util/compiler.h \
../../src/util/misc.h \
../../src/util/RotatingIndex.h \
../../src/ui/support/RecentFileAction.h
../../src/ui/support/RecentFileAction.h \
../../src/ui/AboutComponentsDialog.h

FORMS += \
../../src/ui/forms/MainWindow.ui
../../src/ui/forms/MainWindow.ui \
../../src/ui/forms/About.ui \
../../src/ui/forms/AboutComponentsDialog.ui

# OS specific
#
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,11 @@
<!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" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"><p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600; text-decoration: underline;">Icon54.com</span></p>
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">WWW: </span><a href="https://icon54.com/"><span style=" text-decoration: underline; color:#0000ff;">https://icon54.com/</span></a></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">License: </span><a href="https://icon54.com/license-agreement/"><span style=" text-decoration: underline; color:#0000ff;">https://icon54.com/license-agreement/</span></a></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
All images l are subject of following license [<a href="https://icon54.com/license-agreement/"><span style=" text-decoration: underline; color:#000000;">https://icon54.com/license-agreement/</span></a>].<br />
In this case, the purchaser is me [Michal Duda - @vookimedlo.cz], who is also owner of this &quot;<a href="https://github.com/vookimedlo/vooki-image-viewer/"><span style=" text-decoration: underline; color:#000000;">Vooki Image Viewer</span></a>&quot; project.<br/>
<b>You are not allowed to use those images outside this project without a proper license!</b>
</p>
</body></html>
@@ -0,0 +1,8 @@
<!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" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600; text-decoration: underline;">OpenClipart Library</span></p>
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">WWW:</span> <a href="https://openclipart.org/"><span style=" text-decoration: underline; color:#0000ff;">https://openclipart.org/</span></a></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">License:</span> <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode"><span style=" text-decoration: underline; color:#0000ff;">Creative Commons Zero 1.0 Public Domain License</span></a></p></body></html>
@@ -0,0 +1,8 @@
<!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" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt; font-weight:600; text-decoration: underline;">Ot Framework</span></p>
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">WWW:</span> <a href="https://www.qt.io/"><span style=" text-decoration: underline; color:#0000ff;">https://www.qt.io/</span></a></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">License:</span> <a href="https://www.qt.io/licensing/"><span style=" text-decoration: underline; color:#0000ff;">GPLv3</span></a></p></body></html>
@@ -13,5 +13,12 @@
<file alias="rotateright">image/Rotate-Right_240px.png</file>
<file alias="flipvertical">image/Mirror-2-Vertical_custom.png</file>
<file alias="fliphorizontal">image/Mirror-2-Horizontal_custom.png</file>
<file alias="applogo">openclipart/abeautifulwomansface-800px.png</file>
</qresource>
<qresource prefix="/text">
<file alias="aboutapp">text/about.html</file>
<file alias="aboutopenclipart">text/aboutOpenClipart.html</file>
<file alias="aboutqt">text/aboutQt.html</file>
<file alias="abouticon54">text/aboutIcon54.html</file>
</qresource>
</RCC>
@@ -0,0 +1,47 @@
/****************************************************************************
VookiImageViewer - tool to showing images.
Copyright(C) 2017 Michal Duda <github@vookimedlo.cz>
https://github.com/vookimedlo/vooki-image-viewer
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 3 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.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/

#include "AboutComponentsDialog.h"


AboutComponentsDialog::AboutComponentsDialog(QWidget* parent) : QDialog(parent)
{
m_uiAboutComponentsDialog.setupUi(this);
m_uiAboutComponentsDialog.listWidget->setCurrentRow(0);
}

void AboutComponentsDialog::onSelectedComponentChanged(int row)
{
switch (row)
{
case 0:
m_uiAboutComponentsDialog.textBrowser->setSource(tr("qrc:/text/aboutqt"));
break;
case 1:
m_uiAboutComponentsDialog.textBrowser->setSource(tr("qrc:/text/abouticon54"));
break;
case 2:
m_uiAboutComponentsDialog.textBrowser->setSource(tr("qrc:/text/aboutopenclipart"));
break;
default:
m_uiAboutComponentsDialog.textBrowser->clear();
}

}
@@ -0,0 +1,37 @@
#pragma once
/****************************************************************************
VookiImageViewer - tool to showing images.
Copyright(C) 2017 Michal Duda <github@vookimedlo.cz>
https://github.com/vookimedlo/vooki-image-viewer
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 3 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.
You should have received a copy of the GNU General Public License
along with this program.If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/

#include <QDialog>
#include "ui_AboutComponentsDialog.h"

class AboutComponentsDialog : public QDialog
{
Q_OBJECT

public:
AboutComponentsDialog(QWidget *parent = Q_NULLPTR);

public Q_SLOTS:
virtual void onSelectedComponentChanged(int row);

protected:
Ui::AboutComponentsDialog m_uiAboutComponentsDialog;
};
@@ -20,10 +20,13 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.

#include "MainWindow.h"

#include <QDialog>
#include <QFileSystemModel>
#include <QImageReader>
#include <QMessageBox>
#include <QPainter>
#include "ui_About.h"
#include "AboutComponentsDialog.h"
#include "support/RecentFileAction.h"
#include "../util/compiler.h"
#include "../util/misc.h"
@@ -90,11 +93,13 @@ void MainWindow::onTreeViewDoubleClicked(const QModelIndex &index)

void MainWindow::onZoomInTriggered()
{
m_ui.actionFitToWindow->setChecked(false);
m_ui.imageAreaWidget->zoomImageIn(0.10);
}

void MainWindow::onZoomOutTriggered()
{
m_ui.actionFitToWindow->setChecked(false);
m_ui.imageAreaWidget->zoomImageOut(0.10);
}

@@ -121,6 +126,7 @@ void MainWindow::onStatusBarToggled(bool toggled)

void MainWindow::onOriginalSizeTriggered()
{
m_ui.actionFitToWindow->setChecked(false);
m_ui.imageAreaWidget->zoomReset();
}

@@ -134,6 +140,20 @@ void MainWindow::onNextImageTriggered()
m_ui.imageAreaWidget->showImage(registerProcessedImage(m_catalog.getNext()));
}

void MainWindow::onAboutTriggered()
{
Ui::aboutDialog uiAbout;
QDialog dialog(this);
uiAbout.setupUi(&dialog);
dialog.exec();
}

void MainWindow::onAboutComponentsTriggered()
{
AboutComponentsDialog dialog(this);
dialog.exec();
}

void MainWindow::onAboutQtTriggered()
{
QMessageBox::aboutQt(this);
@@ -49,6 +49,8 @@ private slots:
void onOriginalSizeTriggered();
void onPreviousImageTriggered();
void onNextImageTriggered();
void onAboutTriggered();
void onAboutComponentsTriggered();
void onAboutQtTriggered();
void onFlipHorizontallyTriggered();
void onFlipVerticallyTriggered();
@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author>Michal Duda</author>
<class>aboutDialog</class>
<widget class="QDialog" name="aboutDialog">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>822</width>
<height>369</height>
</rect>
</property>
<property name="windowTitle">
<string>About DataAnalyzer</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>:/images/1467665209-300px.png</normaloff>:/images/1467665209-300px.png</iconset>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>150</width>
<height>300</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>300</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resource/vookiimageviewer.qrc">:/images/applogo</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="source">
<url>
<string>qrc:/text/aboutapp</string>
</url>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<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>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton">
<property name="text">
<string>&amp;Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../../resource/vookiimageviewer.qrc"/>
</resources>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>aboutDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Oops, something went wrong.

0 comments on commit 5745f9f

Please sign in to comment.