mirror of
https://gitlab.com/comunic/comunicmessages
synced 2024-12-04 19:24:11 +00:00
Added about boxes.
This commit is contained in:
parent
1a3169bc16
commit
56c1e4a88b
@ -13,7 +13,8 @@ SOURCES += \
|
||||
data/apirequestslist.cpp \
|
||||
helpers/configurationhelper.cpp \
|
||||
data/accountlogintokens.cpp \
|
||||
widgets/mainwindow.cpp
|
||||
widgets/mainwindow.cpp \
|
||||
widgets/aboutthisappdialog.cpp
|
||||
|
||||
HEADERS += \
|
||||
helpers/accounthelper.h \
|
||||
@ -28,8 +29,10 @@ HEADERS += \
|
||||
data/apirequestslist.h \
|
||||
helpers/configurationhelper.h \
|
||||
data/accountlogintokens.h \
|
||||
widgets/mainwindow.h
|
||||
widgets/mainwindow.h \
|
||||
widgets/aboutthisappdialog.h
|
||||
|
||||
FORMS += \
|
||||
widgets/loginwidget.ui \
|
||||
widgets/mainwindow.ui
|
||||
widgets/mainwindow.ui \
|
||||
widgets/aboutthisappdialog.ui
|
||||
|
14
widgets/aboutthisappdialog.cpp
Normal file
14
widgets/aboutthisappdialog.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "aboutthisappdialog.h"
|
||||
#include "ui_aboutthisappdialog.h"
|
||||
|
||||
AboutThisAppDialog::AboutThisAppDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutThisAppDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
AboutThisAppDialog::~AboutThisAppDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
28
widgets/aboutthisappdialog.h
Normal file
28
widgets/aboutthisappdialog.h
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* About this app dialog
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
#ifndef ABOUTTHISAPPDIALOG_H
|
||||
#define ABOUTTHISAPPDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AboutThisAppDialog;
|
||||
}
|
||||
|
||||
class AboutThisAppDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AboutThisAppDialog(QWidget *parent = nullptr);
|
||||
~AboutThisAppDialog();
|
||||
|
||||
private:
|
||||
Ui::AboutThisAppDialog *ui;
|
||||
};
|
||||
|
||||
#endif // ABOUTTHISAPPDIALOG_H
|
83
widgets/aboutthisappdialog.ui
Normal file
83
widgets/aboutthisappdialog.ui
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutThisAppDialog</class>
|
||||
<widget class="QDialog" name="AboutThisAppDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About ComunicMessages</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="html">
|
||||
<string><!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:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This application is a client of the free and OpenSource social network Comunic.</p>
|
||||
<p 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;">The philosophy of Comunic is to respect its users privacy by all means.</p>
|
||||
<p 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;">Comunic is available everywhere :</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">* In your browser : https://comunic.io/</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">* In your smartphone : Search &quot;Comunic&quot; in the Play Store.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#007af4;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This application has been built by Pierre HUBERT.</p></body></html></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>AboutThisAppDialog</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>AboutThisAppDialog</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>
|
@ -1,5 +1,6 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "aboutthisappdialog.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
@ -12,3 +13,13 @@ MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::on_actionAbout_Qt_triggered()
|
||||
{
|
||||
QApplication::aboutQt();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionAbout_this_App_triggered()
|
||||
{
|
||||
AboutThisAppDialog(this).exec();
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
/**
|
||||
* Main window of the project
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
@ -15,6 +21,11 @@ public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
void on_actionAbout_Qt_triggered();
|
||||
|
||||
void on_actionAbout_this_App_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
@ -23,8 +23,32 @@
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuAccount">
|
||||
<property name="title">
|
||||
<string>Account</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuHelp">
|
||||
<property name="title">
|
||||
<string>Help</string>
|
||||
</property>
|
||||
<addaction name="actionAbout_this_App"/>
|
||||
<addaction name="actionAbout_Qt"/>
|
||||
</widget>
|
||||
<addaction name="menuAccount"/>
|
||||
<addaction name="menuHelp"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionAbout_Qt">
|
||||
<property name="text">
|
||||
<string>About Qt</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout_this_App">
|
||||
<property name="text">
|
||||
<string>About this App</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
Loading…
Reference in New Issue
Block a user