Project Documentation Manager BRIGADOON-0002
Project Documentation Manager
Loading...
Searching...
No Matches
ProgramIdentification Class Reference

Program Identification Class. More...

#include <programidentification.h>

Inheritance diagram for ProgramIdentification:
[legend]
Collaboration diagram for ProgramIdentification:
[legend]

Signals

void SendLogEntry (REMOTE_LOG_ENTRY LogEntry)
void SendVersionString (QString FullVersion)
 Sent the Version Information.

Public Member Functions

 ProgramIdentification (Ui::MainWindow *UI_Window)
void LoadProgramIdentification ()
 Load Program Identification Information.

Private Member Functions

void LogAdd (LOGGING_SEVERITY Severity, LOGGING_MODE Mode, QString Message)
 Add a Log Entry.

Private Attributes

Ui::MainWindow * ui
QStringList image_list
 A list of the images used by the program.
QString project_prefix
 String holding the Project Ident Prefix.
uint suffix_size
 Number of digits in the Project ident.

Detailed Description

Program Identification Class.

Definition at line 21 of file programidentification.h.

Constructor & Destructor Documentation

◆ ProgramIdentification()

ProgramIdentification::ProgramIdentification ( Ui::MainWindow * UI_Window)
explicit

Definition at line 11 of file programidentification.cpp.

12{
13 ui = UI_Window;
14}

References ui.

Member Function Documentation

◆ LoadProgramIdentification()

void ProgramIdentification::LoadProgramIdentification ( )

Load Program Identification Information.

Definition at line 16 of file programidentification.cpp.

17{
18 ui->ProgramIdentificationCode->setText(PROJECT_IDENTIFIER);
19 ui->ProgramVersion->setText(VERSION_STRING);
20 ui->Compiler->setText("Qt");
21 ui->ProgramBuildDate->setText(QStringLiteral(__DATE__) + QStringLiteral(" ") + QStringLiteral(__TIME__));
22 ui->CompilerVersion->setText(QT_VERSION_STR);
23 ui->ContactName->setText(CONTACT_NAME);
24 ui->ContactEmail->setText(CONTACT_EMAIL);
25 ui->ProgramWebsite->setText(PROJECT_WEBSITE);
26 ui->SoftwareLicence->setText(PROGRAM_SOFTWARE_LICENCE);
27 ui->DocumentationLicence->setText(PROGRAM_DOCUMENTATION_LICENCE);
28 ui->HardwareLicence->setText(PROGRAM_HARDWARE_LICENCE);
29 ui->CopyrightStatement->setText(COPYRIGHT_STATEMENT);
30 LogAdd(LOG_DEBUG, MODE_CONFIG, "Program's Build Information Loaded.");
31
32 ui->SystemArchitecture->setText(QSysInfo::currentCpuArchitecture());
33 ui->OpSysProductName->setText(QSysInfo::prettyProductName());
34 ui->OpSysVersion->setText(QSysInfo::productVersion());
35 ui->NodeName->setText(QSysInfo::machineHostName());
36 QString qt_version;
37 qt_version.fromLocal8Bit(qVersion());
38 ui->BuildProgram->setText(qt_version);
39 ui->ProgramBuildDate->setText(QStringLiteral(__DATE__) + QStringLiteral(" ") + QStringLiteral(__TIME__));
40 LogAdd(LOG_DEBUG, MODE_CONFIG, "Program's System Information Loaded.");
41
42 // Create List of Images to Display on Identification tab
43 image_list << "Brigadoon_Logo.bmp" << "Built_with_Qt_RGB_logo_vertical.png";
44 QString os_type = QSysInfo::kernelType().toLower();
45 if (os_type == "linux") image_list << "linux_dual.jpg"; else if (os_type == "winnt") image_list << "windows_logo.png";
46 image_list << "git.png" << "doxygen_logo.jpg" << "md5deep.png" << "dia_logo.jpg" << "plantuml.png" << "graphviz.png" << "cppcheck.png" << "Files-Tar-icon.png" << "Cloc.png" << "Mariadb.png";
47
48 // Define a Grid Layout
49 QGridLayout* image_layout = new QGridLayout(ui->ProgramImageLayout);
50 int row = 0; int column = 0;
51
52 int list_size = image_list.size();
53
54 if (list_size > 0)
55 {
56 // Iterate Through the Image List
57 for (int index = 0; index < list_size; index++)
58 {
59 QPixmap the_pixmap( QString(":/Resources/") + image_list[index] );
60 QLabel* the_image = new QLabel();
61 the_image->setPixmap(the_pixmap.scaledToWidth(140));
62 image_layout->addWidget(the_image, row++, column, 1, 1, Qt::AlignCenter);
63 if ( row > 2){ row = 0; column++; }
64 }
65 }
66 LogAdd(LOG_DEBUG, MODE_CONFIG, "Program's Acknowledgement Images Loaded.");
67}
void LogAdd(LOGGING_SEVERITY Severity, LOGGING_MODE Mode, QString Message)
Add a Log Entry.
QStringList image_list
A list of the images used by the program.
@ LOG_DEBUG
Definition logger.h:56
@ MODE_CONFIG
Definition logger.h:26
#define COPYRIGHT_STATEMENT
Overall Claim of Ownership.
#define CONTACT_EMAIL
The contact email for the Project's Developers.
#define VERSION_STRING
#define PROGRAM_SOFTWARE_LICENCE
Project Software Release Licence.
#define PROJECT_WEBSITE
The name(s) of the Developer's Website.
#define PROJECT_IDENTIFIER
Unique Project Identifier.
#define PROGRAM_DOCUMENTATION_LICENCE
Project Documentation Release Licence.
#define CONTACT_NAME
The name(s) of the Project's Contact.
#define PROGRAM_HARDWARE_LICENCE
Project Hardware Release Licence.

References CONTACT_EMAIL, CONTACT_NAME, COPYRIGHT_STATEMENT, image_list, LOG_DEBUG, LogAdd(), MODE_CONFIG, PROGRAM_DOCUMENTATION_LICENCE, PROGRAM_HARDWARE_LICENCE, PROGRAM_SOFTWARE_LICENCE, PROJECT_IDENTIFIER, PROJECT_WEBSITE, ui, and VERSION_STRING.

Here is the call graph for this function:

◆ LogAdd()

void ProgramIdentification::LogAdd ( LOGGING_SEVERITY Severity,
LOGGING_MODE Mode,
QString Message )
private

Add a Log Entry.

Parameters
SeveritySeverity of the Logged Event
ModePart of the Program being Logged
MessageDescription of the Log Event

Definition at line 69 of file programidentification.cpp.

70{
71 REMOTE_LOG_ENTRY log_entry;
72 log_entry.Severity = Severity;
73 log_entry.Mode = Mode;
74 log_entry.Message = Message;
75 emit SendLogEntry(log_entry);
76}
void SendLogEntry(REMOTE_LOG_ENTRY LogEntry)
LOGGING_MODE Mode
Definition logger.h:61
QString Message
Definition logger.h:63
LOGGING_SEVERITY Severity
Definition logger.h:62

References REMOTE_LOG_ENTRY::Message, REMOTE_LOG_ENTRY::Mode, SendLogEntry(), and REMOTE_LOG_ENTRY::Severity.

Referenced by LoadProgramIdentification().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendLogEntry

void ProgramIdentification::SendLogEntry ( REMOTE_LOG_ENTRY LogEntry)
signal

Referenced by LogAdd().

Here is the caller graph for this function:

◆ SendVersionString

void ProgramIdentification::SendVersionString ( QString FullVersion)
signal

Sent the Version Information.

Field Documentation

◆ image_list

QStringList ProgramIdentification::image_list
private

A list of the images used by the program.

Definition at line 62 of file programidentification.h.

Referenced by LoadProgramIdentification().

◆ project_prefix

QString ProgramIdentification::project_prefix
private

String holding the Project Ident Prefix.

Definition at line 68 of file programidentification.h.

◆ suffix_size

uint ProgramIdentification::suffix_size
private

Number of digits in the Project ident.

Definition at line 74 of file programidentification.h.

◆ ui

Ui::MainWindow* ProgramIdentification::ui
private

brief Pointer to the main window

Definition at line 56 of file programidentification.h.

Referenced by LoadProgramIdentification(), and ProgramIdentification().


The documentation for this class was generated from the following files: