Added About Page

pull/4/head v0.2
Alexander Diamadis 5 years ago
parent 91255b9c2b
commit 9f1fad5998
Signed by: alex
GPG Key ID: 6A1609EFA141FD70

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

@ -9,6 +9,7 @@ CONFIG+=sdk_no_version_check
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
about.cpp \
camp.cpp \
campmode.cpp \
cdac.cpp \
@ -18,14 +19,17 @@ SOURCES += \
mainwindow.cpp
HEADERS += \
about.h \
camp.h \
campmode.h \
cdac.h \
cspeaker.h \
defines.h \
library.h \
mainwindow.h
FORMS += \
about.ui \
library.ui \
mainwindow.ui
@ -43,3 +47,6 @@ win32 {
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
resources.qrc

@ -0,0 +1,18 @@
#include "about.h"
#include "ui_about.h"
#include "defines.h"
about::about(QWidget *parent) :
QDialog(parent),
ui(new Ui::about)
{
ui->setupUi(this);
ui->label_nameVersion->setText(QString("PA Calculator ")+QString(PAC_VERSION));
ui->label_QT_Version->setText(QString("Based on QT ")+QString(QT_VERSION_STR)+QString(" (")+QSysInfo::prettyProductName()+QString(", ")+QSysInfo::currentCpuArchitecture()+QString(")"));
}
about::~about()
{
delete ui;
}

@ -0,0 +1,23 @@
#ifndef ABOUT_H
#define ABOUT_H
#include <QDialog>
namespace Ui {
class about;
}
class about : public QDialog
{
Q_OBJECT
public:
explicit about(QWidget *parent = nullptr);
~about();
private:
Ui::about *ui;
QPixmap* pixmap;
};
#endif // ABOUT_H

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>about</class>
<widget class="QDialog" name="about">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>639</width>
<height>307</height>
</rect>
</property>
<property name="windowTitle">
<string>About PA Calculator</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>10</x>
<y>270</y>
<width>621</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
<widget class="QLabel" name="label_logo">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>256</width>
<height>256</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="resources.qrc">:/logo/PA Calculator icon_windows.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_nameVersion">
<property name="geometry">
<rect>
<x>290</x>
<y>10</y>
<width>231</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>21</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>PA Calculator</string>
</property>
</widget>
<widget class="QLabel" name="label_QT_Version">
<property name="geometry">
<rect>
<x>290</x>
<y>70</y>
<width>271</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Based on QT </string>
</property>
</widget>
</widget>
<resources>
<include location="resources.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>about</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>about</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>

@ -0,0 +1,7 @@
#ifndef DEFINES_H
#define DEFINES_H
#define PAC_VERSION "0.2"
#endif // DEFINES_H

@ -8,6 +8,7 @@
#include <QFile>
#include <QDataStream>
#include <QFileDialog>
#include "about.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
@ -334,3 +335,10 @@ void MainWindow::on_pushButton_loadDac_clicked()
}
}
void MainWindow::on_actionAbout_triggered()
{
about aboutDialog;
aboutDialog.exec();
}

@ -38,6 +38,8 @@ private slots:
void on_pushButton_loadDac_clicked();
void on_actionAbout_triggered();
private:
Ui::MainWindow *ui;
cAmp* m_pCAmp;

@ -717,6 +717,13 @@
<addaction name="actionOpen_Library"/>
<addaction name="actionChange_Library_Location"/>
</widget>
<widget class="QMenu" name="menuPA_Calculator">
<property name="title">
<string>PA Calculator</string>
</property>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuPA_Calculator"/>
<addaction name="menuLibrary"/>
</widget>
<action name="actionEditLibrary">
@ -734,6 +741,11 @@
<string>Open Library</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
<string>About</string>
</property>
</action>
</widget>
<resources/>
<connections/>

@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/Icons">
<file>PA_Calculator.icns</file>
<qresource prefix="/logo">
<file>PA Calculator icon_windows.png</file>
</qresource>
</RCC>

Loading…
Cancel
Save