diff --git a/source/PA Calculator icon_windows.png b/source/PA Calculator icon_windows.png new file mode 100644 index 0000000..b47d47a Binary files /dev/null and b/source/PA Calculator icon_windows.png differ diff --git a/source/PA_Calculator.pro b/source/PA_Calculator.pro index b78227d..7857818 100644 --- a/source/PA_Calculator.pro +++ b/source/PA_Calculator.pro @@ -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 diff --git a/source/about.cpp b/source/about.cpp new file mode 100644 index 0000000..8df441f --- /dev/null +++ b/source/about.cpp @@ -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; +} diff --git a/source/about.h b/source/about.h new file mode 100644 index 0000000..f9e9b95 --- /dev/null +++ b/source/about.h @@ -0,0 +1,23 @@ +#ifndef ABOUT_H +#define ABOUT_H + +#include + +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 diff --git a/source/about.ui b/source/about.ui new file mode 100644 index 0000000..d8bac60 --- /dev/null +++ b/source/about.ui @@ -0,0 +1,128 @@ + + + about + + + + 0 + 0 + 639 + 307 + + + + About PA Calculator + + + + + 10 + 270 + 621 + 32 + + + + Qt::Horizontal + + + QDialogButtonBox::Close + + + + + + 10 + 10 + 256 + 256 + + + + QFrame::NoFrame + + + QFrame::Sunken + + + + + + :/logo/PA Calculator icon_windows.png + + + true + + + + + + 290 + 10 + 231 + 21 + + + + + 21 + 75 + true + + + + PA Calculator + + + + + + 290 + 70 + 271 + 16 + + + + Based on QT + + + + + + + + + buttonBox + rejected() + about + reject() + + + 316 + 260 + + + 286 + 274 + + + + + buttonBox + accepted() + about + accept() + + + 248 + 254 + + + 157 + 274 + + + + + diff --git a/source/defines.h b/source/defines.h new file mode 100644 index 0000000..9962c03 --- /dev/null +++ b/source/defines.h @@ -0,0 +1,7 @@ +#ifndef DEFINES_H +#define DEFINES_H + +#define PAC_VERSION "0.2" + + +#endif // DEFINES_H diff --git a/source/mainwindow.cpp b/source/mainwindow.cpp index f98a754..0787234 100644 --- a/source/mainwindow.cpp +++ b/source/mainwindow.cpp @@ -8,6 +8,7 @@ #include #include #include +#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(); +} + diff --git a/source/mainwindow.h b/source/mainwindow.h index 7936c04..c5cbc7d 100644 --- a/source/mainwindow.h +++ b/source/mainwindow.h @@ -38,6 +38,8 @@ private slots: void on_pushButton_loadDac_clicked(); + void on_actionAbout_triggered(); + private: Ui::MainWindow *ui; cAmp* m_pCAmp; diff --git a/source/mainwindow.ui b/source/mainwindow.ui index 4cc5dff..ebbbdc9 100644 --- a/source/mainwindow.ui +++ b/source/mainwindow.ui @@ -717,6 +717,13 @@ + + + PA Calculator + + + + @@ -734,6 +741,11 @@ Open Library + + + About + + diff --git a/source/resources.qrc b/source/resources.qrc index beb1991..6445e49 100644 --- a/source/resources.qrc +++ b/source/resources.qrc @@ -1,5 +1,5 @@ - - PA_Calculator.icns + + PA Calculator icon_windows.png