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

#include <readprojectinfo.h>

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

Signals

void SendLogEntry (REMOTE_LOG_ENTRY LogEntry)
 Send Log Entry to the Log \LogEntry Structure holding Log information.

Public Member Functions

 ReadProjectInfo (QObject *parent=nullptr)
 Read Project Info Clawss Constructor.
bool LoadProjectInfo (PROJECT_INFORMATION *Store, int ProjectIndex, int ProjManIndex)
 Load Project & relevant System Information into the Structure.
QString FindQtBuildVersion (QString ConfigFile)
 Find the Qt Builder Version.
bool SetProjectStatus (int ProjectIndex, bool LockState, bool QueueState)
 Set the Locked and Queued State of the Project.

Private Member Functions

void LogAdd (LOGGING_SEVERITY Severity, LOGGING_MODE Mode, QString Message)
 Send Message to the Log.
bool LoadLicenceData (LICENCE_INFO *Licence, int LicenceIndex)
 Load the Licence Information for the Selected Licence.
bool LoadAssocGroupData (ASSOCIATED_GROUP_INFO *Assoc, int AssociationIndex)
 Load the In Association Information for the Selected Licence.
bool LoadDevFamilyData (DEV_FAMILY_INFO *DevFam, int DevFamilyIndex)
 Load the Licence Information for the Selected Licence.
bool LoadLangFamilyData (LANG_FAMILY_INFO *LangFam, int LangFamilyIndex)
 Load the Licence Information for the Selected Licence.
bool LoadCompilerFamilyData (COMP_FAMILY_INFO *CompFam, int CompFamilyIndex)
 Load the Compiler Family Information for the Selected Licence.
bool LoadTargetFamilyData (TARGET_FAMILY_INFO *TargetFam, int TargetFamilyIndex)
 Load the Compiler Family Information for the Selected Licence.
bool LoadFullHistory (VERSION_INFO *Version, int ProjectIndex)
 Load the Compiler Family Information for the Selected Licence.
bool LoadVersionInfo (VERSION_INFO *Version, int ProjectIndex)
 Load the Compiler Family Information for the Selected Licence.
bool LoadStatusInfo (STATUS_INFO *Status, int StatusIndex)
 Load the Status Information for the Selected Licence.
bool LoadDeveloperData (DEVELOPER_INFO *person, int DevIndex)
 Load the Developer Information for the Selected Licence.
QString FormatVersion (int MajorVersion, int MinorVersion, int Revision)
 Format the Version information into a String.

Private Attributes

QList< PROJECT_INFORMATIONProjectList
 List of Projects to be Processed.

Detailed Description

Definition at line 16 of file readprojectinfo.h.

Constructor & Destructor Documentation

◆ ReadProjectInfo()

ReadProjectInfo::ReadProjectInfo ( QObject * parent = nullptr)
explicit

Read Project Info Clawss Constructor.

Parameters
parentPointer to Parent Object

Definition at line 8 of file readprojectinfo.cpp.

9 : QObject{parent}
10{
11
12}

Member Function Documentation

◆ FindQtBuildVersion()

QString ReadProjectInfo::FindQtBuildVersion ( QString ConfigFile)

Find the Qt Builder Version.

Parameters
ConfigFile
Returns
Qt Version String

Definition at line 613 of file worker.cpp.

614{
615 QString search_string = "ProjectExplorer.ProjectConfiguration.DefaultDisplayName";
616 QString target_string;
617 QString version_string;
618
619 QTextStream in (&ProUserFile);
620 QString line;
621 do
622 {
623 line = in.readLine();
624 if (!line.contains(search_string, Qt::CaseSensitive))
625 {
626 target_string = line;
627 break;
628 }
629 }
630 while (!line.isNull());
631
632 // If possible, Extract the QT Build Version
633 if (!target_string.isNull())
634 {
635 int qt_index = line.indexOf("Qt");
636 if (qt_index != -1)
637 {
638 int version_start = qt_index + 3;
639 int space_index = line.indexOf(" ", version_start);
640 version_string = line.sliced(version_start, space_index - version_start);
641 }
642 }
643 return(version_string);
644}

◆ FormatVersion()

QString ReadProjectInfo::FormatVersion ( int MajorVersion,
int MinorVersion,
int Revision )
private

Format the Version information into a String.

Parameters
MajorVersionProject's Major Version
MinorVersionProject's Minor Version
RevisionProject's Revision
Returns
Formatted String

Definition at line 306 of file readprojectinfo.cpp.

307{
308 QString version_string = QString("%1.%2.%3")
309 .arg(QString::number(MajorVersion).rightJustified(2,'0'), QString::number(MinorVersion).rightJustified(2,'0'), QString::number(Revision ).rightJustified(2,'0'));
310 return(version_string);
311}

Referenced by LoadFullHistory(), and LoadProjectInfo().

Here is the caller graph for this function:

◆ LoadAssocGroupData()

bool ReadProjectInfo::LoadAssocGroupData ( ASSOCIATED_GROUP_INFO * Assoc,
int AssociationIndex )
private

Load the In Association Information for the Selected Licence.

Parameters
Pointerto the Licence Structure
LicenceIndexDatabase Index of the Desired Licence
Returns
Success (true) or Failure (false)

Definition at line 122 of file readprojectinfo.cpp.

123{
124 bool result = false;
125 QString query_string = QString("select * from in_association where in_assoc_index = %1").arg(QString::number(AssociationIndex));
126
127 QSqlQuery assoc_query(query_string);
128 int row_index = 0;
129 while(assoc_query.next())
130 {
131 Assoc->InAssociationIndex = assoc_query.value(row_index++).toInt();
132 Assoc->ShortName = assoc_query.value(row_index++).toString();
133 Assoc->FullName = assoc_query.value(row_index++).toString();
134 Assoc->AssociationURL = assoc_query.value(row_index++).toString();
135 Assoc->AssociationLogo = assoc_query.value(row_index++).toString();
136 Assoc->HtaccessFileName = assoc_query.value(row_index++).toString();
137 result = true;
138 }
139 if (!result)
140 {
141 Assoc->InAssociationIndex = 0;
142 Assoc->ShortName.clear();
143 Assoc->FullName.clear();
144 Assoc->AssociationURL.clear();
145 Assoc->AssociationLogo.clear();
146 Assoc->HtaccessFileName.clear();
147 }
148 if (result) LogAdd(LOG_DEBUG, MODE_DATABASE, "In Association Data Loaded from Database"); else LogAdd(LOG_DEBUG, MODE_DATABASE, "In Association Data NOT Loaded from Database");
149 return(result);
150}
void LogAdd(LOGGING_SEVERITY Severity, LOGGING_MODE Mode, QString Message)
Send Message to the Log.
@ LOG_DEBUG
Definition logger.h:56
@ MODE_DATABASE
Definition logger.h:35

References ASSOCIATED_GROUP_INFO::AssociationLogo, ASSOCIATED_GROUP_INFO::AssociationURL, ASSOCIATED_GROUP_INFO::FullName, ASSOCIATED_GROUP_INFO::HtaccessFileName, ASSOCIATED_GROUP_INFO::InAssociationIndex, LOG_DEBUG, LogAdd(), MODE_DATABASE, and ASSOCIATED_GROUP_INFO::ShortName.

Referenced by LoadProjectInfo().

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

◆ LoadCompilerFamilyData()

bool ReadProjectInfo::LoadCompilerFamilyData ( COMP_FAMILY_INFO * CompFam,
int CompFamilyIndex )
private

Load the Compiler Family Information for the Selected Licence.

Parameters
CompFamIndex to the Computer Family Structure
CompFamilyIndexDatabase Index of the Desired Computer Family
Returns
Success (true) or Failure (false)

Definition at line 234 of file readprojectinfo.cpp.

235{
236 bool result = false;
237 QString query_string = QString("select * from compiler_instance where compiler_instance_index = %1").arg(QString::number(CompFamilyIndex));
238
239 QSqlQuery compiler_fam_query(query_string);
240 int row_index = 0;
241 while(compiler_fam_query.next())
242 {
243 CompFam->CompFamilyIndex = compiler_fam_query.value(row_index++).toInt();
244 CompFam->ShortName = compiler_fam_query.value(row_index++).toString();
245 CompFam->FullName = compiler_fam_query.value(row_index++).toString();
246 CompFam->CompilerToolImage = compiler_fam_query.value(row_index++).toString();
247 CompFam->CompilerDirectory = compiler_fam_query.value(row_index++).toString();
248 CompFam->SoftwareLicenceRestriction = compiler_fam_query.value(row_index++).toInt();
249 CompFam->DocumentationLicenceRestriction = compiler_fam_query.value(row_index++).toInt();
250 CompFam->HardwareLicenceRestriction = compiler_fam_query.value(row_index++).toInt();
251 result = true;
252 }
253 if (!result)
254 {
255 CompFam->CompFamilyIndex = 0;
256 CompFam->ShortName = "";
257 CompFam->FullName = "";
258 CompFam->CompilerToolImage = "";
259 CompFam->CompilerDirectory = "";
260 CompFam->SoftwareLicenceRestriction = 0;
262 CompFam->HardwareLicenceRestriction = 0;
263 }
264 if (result) LogAdd(LOG_DEBUG, MODE_DATABASE, "Compiler Instance Data Loaded from Database"); else LogAdd(LOG_DEBUG, MODE_DATABASE, "Compiler Instance Data NOT Loaded from Database");
265 return(result);
266}

References COMP_FAMILY_INFO::CompFamilyIndex, COMP_FAMILY_INFO::CompilerDirectory, COMP_FAMILY_INFO::CompilerToolImage, COMP_FAMILY_INFO::DocumentationLicenceRestriction, COMP_FAMILY_INFO::FullName, COMP_FAMILY_INFO::HardwareLicenceRestriction, LOG_DEBUG, LogAdd(), MODE_DATABASE, COMP_FAMILY_INFO::ShortName, and COMP_FAMILY_INFO::SoftwareLicenceRestriction.

Referenced by LoadProjectInfo().

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

◆ LoadDeveloperData()

bool ReadProjectInfo::LoadDeveloperData ( DEVELOPER_INFO * Person,
int DevIndex )
private

Load the Developer Information for the Selected Licence.

Parameters
PersonDeveloper Structure
DevIndexDatabase Index of the Developer
Returns
Success (true) or Failure (false)

Definition at line 332 of file readprojectinfo.cpp.

333{
334 bool result = false;
335 QString query_string =
336 QString("select * from developer where developer_index = %1").arg(QString::number(DevIndex));
337 QSqlQuery dev_query(query_string);
338 int row_index = 0;
339
340 while (dev_query.next())
341 {
342 person->DeveloperIndex = dev_query.value(row_index++).toInt();
343 person->Name = dev_query.value(row_index++).toString();
344 person->Email = dev_query.value(row_index++).toString();
345 person->Phone = dev_query.value(row_index++).toString();
346 person->Info = dev_query.value(row_index++).toString();
347 person->IsAvailable = dev_query.value(row_index++).toBool();
348 person->Handle = dev_query.value(row_index++).toString();
349 person->DateJoined = dev_query.value(row_index++).toDateTime();
350 person->DateLeft = dev_query.value(row_index++).toDateTime();
351 result = true;
352 }
353 return(result);
354}

References DEVELOPER_INFO::DateJoined, DEVELOPER_INFO::DateLeft, DEVELOPER_INFO::DeveloperIndex, DEVELOPER_INFO::Email, DEVELOPER_INFO::Handle, DEVELOPER_INFO::Info, DEVELOPER_INFO::IsAvailable, DEVELOPER_INFO::Name, and DEVELOPER_INFO::Phone.

Referenced by LoadProjectInfo().

Here is the caller graph for this function:

◆ LoadDevFamilyData()

bool ReadProjectInfo::LoadDevFamilyData ( DEV_FAMILY_INFO * DevFam,
int DevFamilyIndex )
private

Load the Licence Information for the Selected Licence.

Parameters
Pointerto the In Development Family Structure
DevFamilyIndexDatabase Index of the Desired Licence
Returns
Success (true) or Failure (false)

Definition at line 152 of file readprojectinfo.cpp.

153{
154 bool result = false;
155 QString query_string = QString("select * from dev_family where dev_family_index = %1").arg(QString::number(DevFamilyIndex));
156
157 QSqlQuery dev_fam_query(query_string);
158 int row_index = 0;
159 while(dev_fam_query.next())
160 {
161 DevFam->DevFamilyIndex = dev_fam_query.value(row_index++).toInt();
162 DevFam->ShortName = dev_fam_query.value(row_index++).toString();
163 DevFam->FullName = dev_fam_query.value(row_index++).toString();
164 DevFam->DevFamilyImage = dev_fam_query.value(row_index++).toString();
165 result = true;
166
167 }
168 if (!result)
169 {
170 DevFam->DevFamilyIndex = 0;
171 DevFam->ShortName = "";
172 DevFam->FullName = "";
173 DevFam->DevFamilyImage = "";
174 }
175 if (result) LogAdd(LOG_DEBUG, MODE_DATABASE, "Dev Family Data Loaded from Database"); else LogAdd(LOG_DEBUG, MODE_DATABASE, "Deve Family Data NOT Loaded from Database");
176 return(result);
177}

References DEV_FAMILY_INFO::DevFamilyImage, DEV_FAMILY_INFO::DevFamilyIndex, DEV_FAMILY_INFO::FullName, LOG_DEBUG, LogAdd(), MODE_DATABASE, and DEV_FAMILY_INFO::ShortName.

Referenced by LoadProjectInfo().

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

◆ LoadFullHistory()

bool ReadProjectInfo::LoadFullHistory ( VERSION_INFO * Version,
int ProjectIndex )
private

Load the Compiler Family Information for the Selected Licence.

Parameters
VersionVersion whose history is to be Read
ProjectIndexDatabase Index of the Project
Returns
Success (true) or Failure (false)

Definition at line 286 of file readprojectinfo.cpp.

287{
288 bool result = false;
289 QString query_string =
290 QString("select major_version, minor_version, revision, description from proj_version_info where project_id = %1 order by major_version desc, minor_version desc, revision desc").arg(QString::number(ProjectIndex));
291 QSqlQuery version_text_query(query_string);
292
293 Version->FullVersionString.clear();
294
295 while (version_text_query.next())
296 {
297 Version->FullVersionString += QString("<P><B>Version <I>") +
298 FormatVersion(version_text_query.value(0).toInt(), version_text_query.value(1).toInt(), version_text_query.value(2).toInt()) +
299 ":</I></B><BR>" +
300 version_text_query.value(3).toString() + "</P>\n";
301 result = true;
302 }
303 return(result);
304}
QString FormatVersion(int MajorVersion, int MinorVersion, int Revision)
Format the Version information into a String.

References FormatVersion(), and VERSION_INFO::FullVersionString.

Referenced by LoadProjectInfo().

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

◆ LoadLangFamilyData()

bool ReadProjectInfo::LoadLangFamilyData ( LANG_FAMILY_INFO * LangFam,
int LangFamilyIndex )
private

Load the Licence Information for the Selected Licence.

Parameters
Pointerto the Development Famil;y Structure
LangFamilyIndexDatabase Index of the Desired Licence
Returns
Success (true) or Failure (false)

Definition at line 179 of file readprojectinfo.cpp.

180{
181 bool result = false;
182 QString query_string = QString("select * from compiler_family where comp_family_index = %1").arg(QString::number(LangFamilyIndex));
183
184 QSqlQuery lang_fam_query(query_string);
185 int row_index = 0;
186 while(lang_fam_query.next())
187 {
188 LangFam->LangFamilyIndex = lang_fam_query.value(row_index++).toInt();
189 LangFam->ShortName = lang_fam_query.value(row_index++).toString();
190 LangFam->FullName = lang_fam_query.value(row_index++).toString();
191 LangFam->LangFamilyImage = lang_fam_query.value(row_index++).toString();
192 result = true;
193
194 }
195 if (!result)
196 {
197 LangFam->LangFamilyIndex = 0;
198 LangFam->ShortName = "";
199 LangFam->FullName = "";
200 LangFam->LangFamilyImage = "";
201 }
202 if (result) LogAdd(LOG_DEBUG, MODE_DATABASE, "Language Data Loaded from Database"); else LogAdd(LOG_DEBUG, MODE_DATABASE, "Language Data NOT Loaded from Database");
203 return(result);
204}

References LANG_FAMILY_INFO::FullName, LANG_FAMILY_INFO::LangFamilyImage, LANG_FAMILY_INFO::LangFamilyIndex, LOG_DEBUG, LogAdd(), MODE_DATABASE, and LANG_FAMILY_INFO::ShortName.

Referenced by LoadProjectInfo().

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

◆ LoadLicenceData()

bool ReadProjectInfo::LoadLicenceData ( LICENCE_INFO * Licence,
int LicenceIndex )
private

Load the Licence Information for the Selected Licence.

Parameters
Pointerto the Licence Structure
LicenceIndexDatabase Index of the Desired Licence
Returns
Success (true) or Failure (false)

Definition at line 94 of file readprojectinfo.cpp.

95{
96 bool result = false;
97 QString query_string = QString("select * from licence where licence_index = %1").arg(QString::number(LicenceIndex));
98
99 QSqlQuery licence_query(query_string);
100 int row_index = 0;
101 while ( licence_query.next() )
102 {
103 Licence->LicenceIndex = licence_query.value(row_index++).toInt();
104 Licence->ShortName = licence_query.value(row_index++).toString();
105 Licence->FullName = licence_query.value(row_index++).toString();
106 Licence->LicenceURL = licence_query.value(row_index++).toString();
107 Licence->LicenceImage = licence_query.value(row_index++).toString();
108 result = true;
109 }
110 if (!result)
111 {
112 Licence->LicenceIndex = 0;
113 Licence->ShortName = "";
114 Licence->FullName = "";
115 Licence->LicenceURL = "";
116 Licence->LicenceImage = "";
117 }
118 if (result) LogAdd(LOG_DEBUG, MODE_DATABASE, "Licence Data Loaded from Database"); else LogAdd(LOG_DEBUG, MODE_DATABASE, "Licence Data NOT Loaded from Database");
119 return(result);
120}

References LICENCE_INFO::FullName, LICENCE_INFO::LicenceImage, LICENCE_INFO::LicenceIndex, LICENCE_INFO::LicenceURL, LOG_DEBUG, LogAdd(), MODE_DATABASE, and LICENCE_INFO::ShortName.

Referenced by LoadProjectInfo().

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

◆ LoadProjectInfo()

bool ReadProjectInfo::LoadProjectInfo ( PROJECT_INFORMATION * Store,
int ProjectIndex,
int ProjManIndex )

Load Project & relevant System Information into the Structure.

Parameters
ProjectIndexThe Database Index of the Project
ProjManIndexThe Datgabase Index of the Site where the Documentation will be placed

Definition at line 14 of file readprojectinfo.cpp.

15{
16 bool result = false;
17 QString query_string = QString("select * from project where project_index = %1").arg(QString::number(ProjectIndex));
18
19 QSqlQuery project_query(query_string);
20 while ( project_query.next() )
21 {
22 Store->ProjectDesc.ProjectIndex = project_query.value(PT_PROJECT_INDEX).toInt(); // Project Index
23 Store->ProjectDesc.ProjectName = project_query.value(PT_PROJECT_NAME).toString(); // Prject Name
24 Store->VersionInfo.MajorVersion = project_query.value(PT_MAJOR_VERSION).toInt(); // Major Version
25 Store->VersionInfo.MinorVersion = project_query.value(PT_MINOR_VERSION).toInt(); // Minor Version
26 Store->VersionInfo.Revision = project_query.value(PT_REVISION).toInt(); // Revision Level
27 Store->VersionInfo.VersionString = FormatVersion(Store->VersionInfo.MajorVersion, Store->VersionInfo.MinorVersion, Store->VersionInfo.Revision); // Version Numbes as String
28 LoadVersionInfo(&Store->VersionInfo, ProjectIndex); // Text of the Current Version
29 LoadFullHistory(&Store->VersionInfo, ProjectIndex); // Full Version History
30 Store->ProjectDesc.BriefDescription = project_query.value(PT_BRIEF_DESCRIPTION).toString(); // Brief Description
31 LoadDevFamilyData(&Store->DevFamilyInfo, project_query.value(PT_DEV_FAMILY).toInt()); // Development Family
32 LoadLangFamilyData(&Store->LangFamilyInfo, project_query.value(PT_COMPILER_FAMILY).toInt()); // Computer Language Familt
33 LoadStatusInfo(&Store->StatusInfo, project_query.value(PT_PROJECT_STATUS).toInt()); // Status Level
34
35 Store->ProjectLock = project_query.value(PT_PROJECT_LOCK).toBool(); // Project Lock Satus
36 LoadCompilerFamilyData(&Store->CompFamilyInfo, project_query.value(PT_COMPILER_TYPE).toInt()); // Compiler Type
37 Store->StatusInfo.StatusDateTime = project_query.value(PT_STATUS_DATE).toDateTime(); // Status Data Time
38 Store->StatusInfo.StatusDateTimeString = Store->StatusInfo.StatusDateTime.toString(DATETIME_DISPLAY_FORMAT); // Status DateTime as a String
39 LoadLicenceData(&Store->DocLicence, project_query.value(PT_DOC_LICENCE).toInt()); // Documentation Licence
40 LoadLicenceData(&Store->SoftwareLicence, project_query.value(PT_SOFTWARE_LICENCE).toInt()); // Software Licence
41 LoadLicenceData(&Store->HardwareLicence, project_query.value(PT_HARDWARE_LICENCE).toInt()); // Hardware Licence
42 LoadDeveloperData(&Store->Developer, project_query.value(PT_PROJECT_CONTACT).toInt()); // Contact Developer
43 Store->ProjectDesc.FullDescription = project_query.value(PT_FULL_DESCRIPTION).toString(); // Full Description
44 Store->ProjectDesc.ProjectDirectory = project_query.value(PT_PROJECT_DIRECTORY).toString(); // Project Directory
45 Store->ProjectDesc.ProjectIcon = project_query.value(PT_ICON_FILENAME).toString(); // Project Icon
46 Store->ProjectDesc.ProjectOptions = project_query.value(PT_PROJECT_OPTIONS).toUInt(); // Project Options
47 Store->ProjectDesc.ProjectIdent = project_query.value(PT_PROJECT_IDENT).toString(); // Project Identification String
48 Store->DoxyOptions.DoxyLogoFilename = project_query.value(PT_DOXY_PROJECT_LOGO_FILENAME).toString(); // Doxy Project Logo Image
49 Store->DoxyOptions.DoxyHtmlHeaderFilename = project_query.value(PT_DOXY_HTML_HEADER_FILENAME).toString(); // Doxy Project Header File
50 Store->DoxyOptions.DoxyHtmlFooterFilename = project_query.value(PT_DOXY_HTML_FOOTER_FILENAME).toString(); // Doxy Project Footer File
51 Store->DoxyOptions.DoxyExtraStylesheetFilename = project_query.value(PT_DOXY_EXTRA_STYLESHEET_FILENAME).toString(); // Doxy Project Extra Stylesheet Filename
52 LoadAssocGroupData(&Store->InAssocInfo, project_query.value(PT_ASSOC_GROUP).toInt()); // Associated Group Index
53 Store->ProjectDesc.DepartureURL = project_query.value(PT_DEPARTURE_URL).toString(); // Departure URL
54 Store->ProjectDesc.ExeDirectory = project_query.value(PT_EXECUTABLE_DIRECTORY).toString(); // Built Executable Directory
55 Store->ProjectDesc.ExeName = project_query.value(PT_EXECUTABLE_NAME).toString(); // Built Executable Name
56 Store->ProjectQueued = project_query.value(PT_PROJECT_QUEUED).toBool(); // Read the Queued Flag
57 LoadTargetFamilyData(&Store->TargetFamilyInfo, project_query.value(PT_TARGET_FAMILY).toInt()); // target Family
58
59 result = true;
60 }
61 if (result) LogAdd(LOG_DEBUG, MODE_DATABASE, "Project Data Loaded from Database"); else LogAdd(LOG_ERROR, MODE_DATABASE, "Project Data NOT Loaded from Database");
62
63 // Load the Program level Data
64 query_string = QString("select * from project_manager where proj_manager_index = %1").arg(QString::number(ProgramIndex));
65
66 QSqlQuery program_query(query_string);
67 bool result1 = false;
68 while ( program_query.next() )
69 {
70 Store->ProgramInformation.ProgramInformationIndex = program_query.value(PM_PROJ_MANAGER_INDEX).toInt();
71 Store->ProgramInformation.SiteName = program_query.value(PM_SITE_NAME).toString();
72 Store->ProgramInformation.SiteURL = program_query.value(PM_SITE_URL).toString();
73 Store->ProgramInformation.SiteLogo = program_query.value(PM_SITE_LOGO).toString();
74 Store->ProgramInformation.SharedTemplateDirectory = program_query.value(PM_SHARED_TEMPLATE_DIR).toString();
75 Store->ProgramInformation.LocalDevelopmentDirectory = program_query.value(PM_LOCAL_DEV_DIRECTORY).toString();
76 Store->ProgramInformation.ProjectPrefix = program_query.value(PM_PROJECT_PREFIX).toString();
77 Store->ProgramInformation.SuffixSize = program_query.value(PM_SUFFIX_SIZE).toInt();
78 Store->ProgramInformation.PrimaryWebsiteDirectory = program_query.value(PM_PRIMARY_WEBSITE_DIRECTORY).toString();
79 Store->ProgramInformation.PublisherName = program_query.value(PM_PUBLISHER_NAME).toString();
80 Store->ProgramInformation.PublisherWebsite = program_query.value(PM_PUBLISHER_WEBSITE).toString();
81 Store->ProgramInformation.PublisherContactEmail = program_query.value(PM_PUBLISHER_CONTACT_EMAIL).toString();
84 Store->ProgramInformation.ProjectListLineFilename = program_query.value(PM_PROJECT_LIST_LINE_FILENAME).toString();
85 Store->ProgramInformation.DefaultReturnAddress = program_query.value(PM_PROJECT_LIST_RETURN_ADDRESS).toString();
87 result1 = true;
88 }
89 Store->ProgramInformation.CurrentUser = qgetenv("USER");
90 if (result1) LogAdd(LOG_DEBUG, MODE_DATABASE, "Program Data Loaded from Database"); else LogAdd(LOG_ERROR, MODE_DATABASE, "Program Data NOT Loaded from Database");
91 return(result && result1);
92}
bool LoadAssocGroupData(ASSOCIATED_GROUP_INFO *Assoc, int AssociationIndex)
Load the In Association Information for the Selected Licence.
bool LoadCompilerFamilyData(COMP_FAMILY_INFO *CompFam, int CompFamilyIndex)
Load the Compiler Family Information for the Selected Licence.
bool LoadFullHistory(VERSION_INFO *Version, int ProjectIndex)
Load the Compiler Family Information for the Selected Licence.
bool LoadTargetFamilyData(TARGET_FAMILY_INFO *TargetFam, int TargetFamilyIndex)
Load the Compiler Family Information for the Selected Licence.
bool LoadLangFamilyData(LANG_FAMILY_INFO *LangFam, int LangFamilyIndex)
Load the Licence Information for the Selected Licence.
bool LoadLicenceData(LICENCE_INFO *Licence, int LicenceIndex)
Load the Licence Information for the Selected Licence.
bool LoadDevFamilyData(DEV_FAMILY_INFO *DevFam, int DevFamilyIndex)
Load the Licence Information for the Selected Licence.
bool LoadDeveloperData(DEVELOPER_INFO *person, int DevIndex)
Load the Developer Information for the Selected Licence.
bool LoadVersionInfo(VERSION_INFO *Version, int ProjectIndex)
Load the Compiler Family Information for the Selected Licence.
bool LoadStatusInfo(STATUS_INFO *Status, int StatusIndex)
Load the Status Information for the Selected Licence.
@ PM_PROJECT_LIST_FOOTER_FILENAME
@ PM_PUBLISHER_CONTACT_EMAIL
@ PM_PROJECT_DEVELOPMENT_DOXY_DIRECTORY
@ PM_PUBLISHER_NAME
@ PM_SITE_URL
@ PM_PROJECT_LIST_RETURN_ADDRESS
@ PM_PROJ_MANAGER_INDEX
@ PM_SHARED_TEMPLATE_DIR
@ PM_PROJECT_LIST_HEADER_FILENAME
@ PM_LOCAL_DEV_DIRECTORY
@ PM_PROJECT_PREFIX
@ PM_PRIMARY_WEBSITE_DIRECTORY
@ PM_PROJECT_LIST_LINE_FILENAME
@ PM_PUBLISHER_WEBSITE
@ PM_SITE_NAME
@ PM_SITE_LOGO
@ PM_SUFFIX_SIZE
@ PT_SOFTWARE_LICENCE
@ PT_STATUS_DATE
@ PT_PROJECT_QUEUED
@ PT_ICON_FILENAME
@ PT_COMPILER_TYPE
@ PT_PROJECT_INDEX
@ PT_DOC_LICENCE
@ PT_REVISION
@ PT_DOXY_HTML_HEADER_FILENAME
@ PT_PROJECT_NAME
@ PT_DEV_FAMILY
@ PT_PROJECT_IDENT
@ PT_DOXY_EXTRA_STYLESHEET_FILENAME
@ PT_EXECUTABLE_NAME
@ PT_PROJECT_CONTACT
@ PT_MAJOR_VERSION
@ PT_PROJECT_OPTIONS
@ PT_ASSOC_GROUP
@ PT_PROJECT_LOCK
@ PT_DEPARTURE_URL
@ PT_MINOR_VERSION
@ PT_EXECUTABLE_DIRECTORY
@ PT_DOXY_HTML_FOOTER_FILENAME
@ PT_PROJECT_DIRECTORY
@ PT_COMPILER_FAMILY
@ PT_BRIEF_DESCRIPTION
@ PT_PROJECT_STATUS
@ PT_HARDWARE_LICENCE
@ PT_DOXY_PROJECT_LOGO_FILENAME
@ PT_TARGET_FAMILY
@ PT_FULL_DESCRIPTION
#define DATETIME_DISPLAY_FORMAT
DateTime formatting for the program displays.
@ LOG_ERROR
Definition logger.h:52
QString DoxyExtraStylesheetFilename
QString DoxyHtmlHeaderFilename
QString DoxyHtmlFooterFilename
PROGRAM_INFORMATION ProgramInformation
TARGET_FAMILY_INFO TargetFamilyInfo
DEV_FAMILY_INFO DevFamilyInfo
PROJECT_DESCRIPTION ProjectDesc
COMP_FAMILY_INFO CompFamilyInfo
LANG_FAMILY_INFO LangFamilyInfo
ASSOCIATED_GROUP_INFO InAssocInfo
QString StatusDateTimeString
QDateTime StatusDateTime

References PROJECT_DESCRIPTION::BriefDescription, PROJECT_INFORMATION::CompFamilyInfo, PROGRAM_INFORMATION::CurrentUser, DATETIME_DISPLAY_FORMAT, PROGRAM_INFORMATION::DefaultReturnAddress, PROJECT_DESCRIPTION::DepartureURL, PROJECT_INFORMATION::Developer, PROGRAM_INFORMATION::DevelopmentDoxyDocDirectory, PROJECT_INFORMATION::DevFamilyInfo, PROJECT_INFORMATION::DocLicence, DOXY_OPTIONS::DoxyExtraStylesheetFilename, DOXY_OPTIONS::DoxyHtmlFooterFilename, DOXY_OPTIONS::DoxyHtmlHeaderFilename, DOXY_OPTIONS::DoxyLogoFilename, PROJECT_INFORMATION::DoxyOptions, PROJECT_DESCRIPTION::ExeDirectory, PROJECT_DESCRIPTION::ExeName, FormatVersion(), PROJECT_DESCRIPTION::FullDescription, PROJECT_INFORMATION::HardwareLicence, PROJECT_INFORMATION::InAssocInfo, PROJECT_INFORMATION::LangFamilyInfo, LoadAssocGroupData(), LoadCompilerFamilyData(), LoadDeveloperData(), LoadDevFamilyData(), LoadFullHistory(), LoadLangFamilyData(), LoadLicenceData(), LoadStatusInfo(), LoadTargetFamilyData(), LoadVersionInfo(), PROGRAM_INFORMATION::LocalDevelopmentDirectory, LOG_DEBUG, LOG_ERROR, LogAdd(), VERSION_INFO::MajorVersion, VERSION_INFO::MinorVersion, MODE_DATABASE, PM_LOCAL_DEV_DIRECTORY, PM_PRIMARY_WEBSITE_DIRECTORY, PM_PROJ_MANAGER_INDEX, PM_PROJECT_DEVELOPMENT_DOXY_DIRECTORY, PM_PROJECT_LIST_FOOTER_FILENAME, PM_PROJECT_LIST_HEADER_FILENAME, PM_PROJECT_LIST_LINE_FILENAME, PM_PROJECT_LIST_RETURN_ADDRESS, PM_PROJECT_PREFIX, PM_PUBLISHER_CONTACT_EMAIL, PM_PUBLISHER_NAME, PM_PUBLISHER_WEBSITE, PM_SHARED_TEMPLATE_DIR, PM_SITE_LOGO, PM_SITE_NAME, PM_SITE_URL, PM_SUFFIX_SIZE, PROGRAM_INFORMATION::PrimaryWebsiteDirectory, PROJECT_INFORMATION::ProgramInformation, PROGRAM_INFORMATION::ProgramInformationIndex, PROJECT_INFORMATION::ProjectDesc, PROJECT_DESCRIPTION::ProjectDirectory, PROJECT_DESCRIPTION::ProjectIcon, PROJECT_DESCRIPTION::ProjectIdent, PROJECT_DESCRIPTION::ProjectIndex, PROGRAM_INFORMATION::ProjectListFooterFilename, PROGRAM_INFORMATION::ProjectListHeaderFilename, PROGRAM_INFORMATION::ProjectListLineFilename, PROJECT_INFORMATION::ProjectLock, PROJECT_DESCRIPTION::ProjectName, PROJECT_DESCRIPTION::ProjectOptions, PROGRAM_INFORMATION::ProjectPrefix, PROJECT_INFORMATION::ProjectQueued, PT_ASSOC_GROUP, PT_BRIEF_DESCRIPTION, PT_COMPILER_FAMILY, PT_COMPILER_TYPE, PT_DEPARTURE_URL, PT_DEV_FAMILY, PT_DOC_LICENCE, PT_DOXY_EXTRA_STYLESHEET_FILENAME, PT_DOXY_HTML_FOOTER_FILENAME, PT_DOXY_HTML_HEADER_FILENAME, PT_DOXY_PROJECT_LOGO_FILENAME, PT_EXECUTABLE_DIRECTORY, PT_EXECUTABLE_NAME, PT_FULL_DESCRIPTION, PT_HARDWARE_LICENCE, PT_ICON_FILENAME, PT_MAJOR_VERSION, PT_MINOR_VERSION, PT_PROJECT_CONTACT, PT_PROJECT_DIRECTORY, PT_PROJECT_IDENT, PT_PROJECT_INDEX, PT_PROJECT_LOCK, PT_PROJECT_NAME, PT_PROJECT_OPTIONS, PT_PROJECT_QUEUED, PT_PROJECT_STATUS, PT_REVISION, PT_SOFTWARE_LICENCE, PT_STATUS_DATE, PT_TARGET_FAMILY, PROGRAM_INFORMATION::PublisherContactEmail, PROGRAM_INFORMATION::PublisherName, PROGRAM_INFORMATION::PublisherWebsite, VERSION_INFO::Revision, PROGRAM_INFORMATION::SharedTemplateDirectory, PROGRAM_INFORMATION::SiteLogo, PROGRAM_INFORMATION::SiteName, PROGRAM_INFORMATION::SiteURL, PROJECT_INFORMATION::SoftwareLicence, STATUS_INFO::StatusDateTime, STATUS_INFO::StatusDateTimeString, PROJECT_INFORMATION::StatusInfo, PROGRAM_INFORMATION::SuffixSize, PROJECT_INFORMATION::TargetFamilyInfo, PROJECT_INFORMATION::VersionInfo, and VERSION_INFO::VersionString.

Here is the call graph for this function:

◆ LoadStatusInfo()

bool ReadProjectInfo::LoadStatusInfo ( STATUS_INFO * Status,
int StatusIndex )
private

Load the Status Information for the Selected Licence.

Parameters
VersionVersion whose history is to be Read
StatusIndexDatabase Index of the Status Level
Returns
Success (true) or Failure (false)

Definition at line 313 of file readprojectinfo.cpp.

314{
315 bool result = false;
316 QString query_string =
317 QString("select * from project_status where proj_status_index = %1").arg(QString::number(StatusIndex));
318 QSqlQuery status_query(query_string);
319 int row_index = 0;
320
321 while (status_query.next())
322 {
323 Status->StatusIndex = status_query.value(row_index++).toInt();
324 Status->StatusName = status_query.value(row_index++).toString();
325 Status->StatusDescription = status_query.value(row_index++).toString();
326 Status->StatusImage = status_query.value(row_index++).toString();
327 result = true;
328 }
329 return(result);
330}
QString StatusDescription

References STATUS_INFO::StatusDescription, STATUS_INFO::StatusImage, STATUS_INFO::StatusIndex, and STATUS_INFO::StatusName.

Referenced by LoadProjectInfo().

Here is the caller graph for this function:

◆ LoadTargetFamilyData()

bool ReadProjectInfo::LoadTargetFamilyData ( TARGET_FAMILY_INFO * TargetFam,
int TargetFamilyIndex )
private

Load the Compiler Family Information for the Selected Licence.

Parameters
TargetFamIndex to the Target Family Structure
TargetFamilyIndexDatabase Index of the Desired target Family
Returns
Success (true) or Failure (false)

Definition at line 206 of file readprojectinfo.cpp.

207{
208 bool result = false;
209 QString query_string = QString("select * from target_family where target_family_index = %1").arg(QString::number(TargetFamilyIndex));
210
211 QSqlQuery target_fam_query(query_string);
212 int row_index = 0;
213 while(target_fam_query.next())
214 {
215 TargetFam->TargetFamilyIndex = target_fam_query.value(row_index++).toInt();
216 TargetFam->ShortName = target_fam_query.value(row_index++).toString();
217 TargetFam->FullName = target_fam_query.value(row_index++).toString();
218 TargetFam->TargetFamilyImage = target_fam_query.value(row_index++).toString();
219 result = true;
220
221 }
222 if (!result)
223 {
224 TargetFam->TargetFamilyIndex = 0;
225 TargetFam->ShortName = "";
226 TargetFam->FullName = "";
227 TargetFam->TargetFamilyImage = "";
228 }
229 if (result) LogAdd(LOG_DEBUG, MODE_DATABASE, "Language Data Loaded from Database"); else LogAdd(LOG_DEBUG, MODE_DATABASE, "Language Data NOT Loaded from Database");
230 return(result);
231}

References TARGET_FAMILY_INFO::FullName, LOG_DEBUG, LogAdd(), MODE_DATABASE, TARGET_FAMILY_INFO::ShortName, TARGET_FAMILY_INFO::TargetFamilyImage, and TARGET_FAMILY_INFO::TargetFamilyIndex.

Referenced by LoadProjectInfo().

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

◆ LoadVersionInfo()

bool ReadProjectInfo::LoadVersionInfo ( VERSION_INFO * Version,
int ProjectIndex )
private

Load the Compiler Family Information for the Selected Licence.

Parameters
VersionVersion whose history is to be Read
ProjectIndexDatabase Index of the Project
Returns
Success (true) or Failure (false)

Definition at line 268 of file readprojectinfo.cpp.

269{
270 bool result = false;
271 QString query_string =
272 QString("select description, version_timestamp from proj_version_info where project_id = %1 and major_version = %2 and minor_version = %3 and revision = %4")
273 .arg(QString::number(ProjectIndex), QString::number(Version->MajorVersion), QString::number(Version->MinorVersion), QString::number(Version->Revision));
274 QSqlQuery version_text_query(query_string);
275
276 while (version_text_query.next())
277 {
278 Version->CurrentVersionString = version_text_query.value(0).toString();
279 Version->VersionDate = version_text_query.value(1).toDateTime();
280 Version->VersionDateString = Version->VersionDate.toString(DATETIME_DISPLAY_FORMAT);
281 result = true;
282 }
283 return(result);
284}
QString CurrentVersionString

References VERSION_INFO::CurrentVersionString, DATETIME_DISPLAY_FORMAT, VERSION_INFO::MajorVersion, VERSION_INFO::MinorVersion, VERSION_INFO::Revision, VERSION_INFO::VersionDate, and VERSION_INFO::VersionDateString.

Referenced by LoadProjectInfo().

Here is the caller graph for this function:

◆ LogAdd()

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

Send Message to the Log.

Parameters
SeveritySeverity of the Log Message
ModeWhich part of the program does the message relate to
MessageText message to be added to the Log

Definition at line 356 of file readprojectinfo.cpp.

357{
358 REMOTE_LOG_ENTRY log_entry;
359 log_entry.Severity = Severity;
360 log_entry.Mode = Mode;
361 log_entry.Message = Message;
362 emit SendLogEntry(log_entry);
363}
void SendLogEntry(REMOTE_LOG_ENTRY LogEntry)
Send Log Entry to the Log \LogEntry Structure holding Log information.
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 LoadAssocGroupData(), LoadCompilerFamilyData(), LoadDevFamilyData(), LoadLangFamilyData(), LoadLicenceData(), LoadProjectInfo(), LoadTargetFamilyData(), and SetProjectStatus().

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

◆ SendLogEntry

void ReadProjectInfo::SendLogEntry ( REMOTE_LOG_ENTRY LogEntry)
signal

Send Log Entry to the Log \LogEntry Structure holding Log information.

Referenced by LogAdd().

Here is the caller graph for this function:

◆ SetProjectStatus()

bool ReadProjectInfo::SetProjectStatus ( int ProjectIndex,
bool LockState,
bool QueueState )

Set the Locked and Queued State of the Project.

Parameters
ProjectIndexDatabase Project Index
LockStateLocked (true) or Unlocked (false)
QueueStateQueued (true) or Unqueued (false)
Returns
Success (true) or Failure (false)

Definition at line 365 of file readprojectinfo.cpp.

366{
367 bool result;
368 QString set_command_string = QString("UPDATE project SET ")
369 + " project_lock = " + QVariant(LockState).toString()
370 + ", project_queued = " + QVariant(QueueState).toString()
371 + " where project_index = " + QString::number(ProjectIndex);
372
373 QSqlQuery update_query;
374 result = update_query.exec(set_command_string);
375
376 if (result)
377 {
378 if (LockState) current_locked_project = ProjectIndex; else current_locked_project = 0;
379 LogAdd(LOG_DEBUG, MODE_DATABASE, QString("Project with Index: %1 set its Lock/Queque Status.").arg(ProjectIndex) );
380
381 }
382 else
383 {
384 LogAdd(LOG_ERROR, MODE_DATABASE, QString("Project with Index: %1 did NOT set its Lock/Queque Status.").arg(ProjectIndex) );
385 }
386 return(result);
387}
int current_locked_project
Database Index of currently locked Project.

References current_locked_project, LOG_DEBUG, LOG_ERROR, LogAdd(), and MODE_DATABASE.

Here is the call graph for this function:

Field Documentation

◆ ProjectList

QList<PROJECT_INFORMATION> ReadProjectInfo::ProjectList
private

List of Projects to be Processed.

Definition at line 62 of file readprojectinfo.h.


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