From 8790eae30d93f2c743ffe65600efaffcf215ed58 Mon Sep 17 00:00:00 2001 From: Valentino Orlandi Date: Tue, 23 Aug 2022 21:42:05 +0200 Subject: [PATCH] Added new tool Crapinfo --- logdoctor/tools/crapinfo/crapinfo.cpp | 43 ++ logdoctor/tools/crapinfo/crapinfo.h | 22 + logdoctor/tools/crapinfo/crapinfo.ui | 728 ++++++++++++++++++++++++++ 3 files changed, 793 insertions(+) create mode 100644 logdoctor/tools/crapinfo/crapinfo.cpp create mode 100644 logdoctor/tools/crapinfo/crapinfo.h create mode 100644 logdoctor/tools/crapinfo/crapinfo.ui diff --git a/logdoctor/tools/crapinfo/crapinfo.cpp b/logdoctor/tools/crapinfo/crapinfo.cpp new file mode 100644 index 00000000..4b5eaee4 --- /dev/null +++ b/logdoctor/tools/crapinfo/crapinfo.cpp @@ -0,0 +1,43 @@ + +#include "crapinfo.h" +#include "ui_crapinfo.h" + +#include + + +Crapinfo::Crapinfo( const QString& version, const QString& exec_path, const QString& conf_path, const QString& logdoc_path, QWidget *parent ) : + QWidget(parent), + ui(new Ui::Crapinfo) +{ + ui->setupUi(this); + + // fonts + const QString ff = QFontDatabase::applicationFontFamilies( + QFontDatabase::addApplicationFont(":/fonts/Metropolis")).at(0); + const QFont font( ff, 13 ); + const QString ff_s = QFontDatabase::applicationFontFamilies( + QFontDatabase::addApplicationFont(":/fonts/Hack")).at(0); + const QFont font_script( ff_s, 13 ); + + // apply the fonts + this->ui->toolBox_Infos->setFont( font ); + // version + this->ui->label_Verion_Number->setText( QString(version).replace(",",".") ); + this->ui->label_Verion_Number->setFont( font_script ); + // tb info + this->ui->textElBarto->setFont( font_script ); + this->ui->textElBarto->setAlignment( Qt::AlignHCenter ); + // paths + this->ui->inLine_ExecPath->setText( exec_path ); + this->ui->inLine_ExecPath->setCursorPosition( 0 ); + this->ui->inLine_ConfPath->setText( conf_path ); + this->ui->inLine_ConfPath->setCursorPosition( 0 ); + this->ui->inLine_DataPath->setText( logdoc_path ); + this->ui->inLine_DataPath->setCursorPosition( 0 ); + +} + +Crapinfo::~Crapinfo() +{ + delete ui; +} diff --git a/logdoctor/tools/crapinfo/crapinfo.h b/logdoctor/tools/crapinfo/crapinfo.h new file mode 100644 index 00000000..73a89376 --- /dev/null +++ b/logdoctor/tools/crapinfo/crapinfo.h @@ -0,0 +1,22 @@ +#ifndef CRAPINFO_H +#define CRAPINFO_H + +#include + +namespace Ui { +class Crapinfo; +} + +class Crapinfo : public QWidget +{ + Q_OBJECT + +public: + explicit Crapinfo( const QString& version, const QString& exec_path, const QString& conf_path, const QString& logdoc_path, QWidget *parent=nullptr); + ~Crapinfo(); + +private: + Ui::Crapinfo *ui; +}; + +#endif // CRAPINFO_H diff --git a/logdoctor/tools/crapinfo/crapinfo.ui b/logdoctor/tools/crapinfo/crapinfo.ui new file mode 100644 index 00000000..e157a7d6 --- /dev/null +++ b/logdoctor/tools/crapinfo/crapinfo.ui @@ -0,0 +1,728 @@ + + + Crapinfo + + + + 0 + 0 + 853 + 597 + + + + Form + + + + :/logo/logo/logdoctor.svg:/logo/logo/logdoctor.svg + + + + + + + + + 1 + + + + + 0 + 0 + 835 + 503 + + + + LogDoctor + + + + + + QFrame::NoFrame + + + true + + + + + -6 + 0 + 809 + 686 + + + + + + + Qt::Vertical + + + + 788 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 16777215 + 303 + + + + + + + true + + + + 280 + 280 + + + + + 280 + 280 + + + + + + + + :/logo/logo/logdoctor.svg:/logo/logo/logdoctor.svg + + + + 256 + 256 + + + + true + + + + + + + + 400 + 0 + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + + 16 + + + + Version + + + Qt::AlignCenter + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + + 13 + + + + Current version of the software + + + + + + Qt::AlignHCenter|Qt::AlignTop + + + + + + + Qt::Horizontal + + + + + + + + 0 + 32 + + + + + 16777215 + 32 + + + + + 15 + + + + Repository links + + + Qt::AlignCenter + + + + + + + + true + + + + false + + + GitHub + + + https://github.com/elB4RTO/LogDoctor + + + false + + + Qt::AlignCenter + + + true + + + + + + + + true + + + + false + + + Disroot + + + https://git.disroot.org/elB4RTO/LogDoctor + + + false + + + Qt::AlignCenter + + + true + + + + + + + + true + + + + false + + + GitLab + + + https://gitlab.com/elB4RTO/LogDoctor + + + false + + + Qt::AlignCenter + + + true + + + + + + + + + + + + + Qt::Horizontal + + + + 32 + 408 + + + + + + + + + 0 + 352 + + + + + 16777215 + 352 + + + + QFrame::NoFrame + + + QTextEdit::NoWrap + + + `░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░` + +`░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░██████████░░░░░░░░░░░░░░░░░░░░` + +`░░░░░███████░██░░░░░░░░░░░░░░░░░░░░░░█░░░░░░░░█░█░█░█░█░█░░░░░░` + +`░░░░░░█░░░░░░██░░░░░███░░░░██░░████░░█░████░░░███████████░░░░░░` + +`░░░░░░████░░░██░░░░░█░░█░░█░█░░░█░░█░█░█░░█░░░███████████░░░░░░` + +`░░░░░░█░░░░░░██░░░░░███░░░█░░█░░███░░█░█░░█░░░███████████░ ░░░░` + +`░░░░░░██████░█░░░░░░█░░█░██████░█░░█░░░████░░░ ░░░░░` + +`░░░░░░░░░░░░░░░░░░░░███░░█░░░░█░█░░█░░░░░░░░░░ ▄ ▄░ ░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████░░░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████░░░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████░░░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░` + +`░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░` + + + + + <!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" /><meta charset="utf-8" /><style type="text/css"> +p, li { white-space: pre-wrap; } +hr { height: 1px; border-width: 0; } +</style></head><body style=" font-family:'Noto Sans'; font-size:13pt; font-weight:400; font-style:normal;"> +<p align="center" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░██████████░░░░░░░░░░░░░░░░░░░░</span></p> +<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-family:'Hack';">░░░░░███████░██░░░░░░░░░░░░░░░░░░░░░░█░░░░░░░░█░█░█░█░█░█░░░░░░</span></p> +<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-family:'Hack';">░░░░░░█░░░░░░██░░░░░███░░░░██░░████░░█░████░░░███████████░░░░░░</span></p> +<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-family:'Hack';">░░░░░░████░░░██░░░░░█░░█░░█░█░░░█░░█░█░█░░█░░░███████████░░░░░░</span></p> +<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-family:'Hack';">░░░░░░█░░░░░░██░░░░░███░░░█░░█░░███░░█░█░░█░░░███████████░ ░░░░</span></p> +<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-family:'Hack';">░░░░░░██████░█░░░░░░█░░█░██████░█░░█░░░████░░░ ░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░███░░█░░░░█░█░░█░░░░░░░░░░ ▄ ▄░ ░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████░░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████░░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████░░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░</span></p> +<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-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Hack';">░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░</span></p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 788 + 40 + + + + + + + + + + + + + + 0 + 0 + 835 + 503 + + + + Paths + + + + + + + + + + 0 + 28 + + + + + 16777215 + 28 + + + + + 13 + + + + The path where the executable file will be placed in + + + Executable + + + + + + + + 0 + 60 + + + + + 16777215 + 60 + + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + 0 + 0 + 797 + 58 + + + + + + + false + + + false + + + true + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 32 + + + + + + + + + 0 + 28 + + + + + 16777215 + 28 + + + + + 13 + + + + The path where the configuration file will be saved and searched in + + + Configuration file + + + + + + + + 0 + 60 + + + + + 16777215 + 60 + + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + 0 + 0 + 797 + 58 + + + + + + + false + + + false + + + true + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 32 + + + + + + + + + 0 + 28 + + + + + 16777215 + 28 + + + + + 13 + + + + The path where the application will search in for extra resources + + + Application data + + + + + + + + 0 + 60 + + + + + 16777215 + 60 + + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + 0 + 0 + 797 + 58 + + + + + + + false + + + false + + + true + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 88 + + + + + + + + + + + + + + +