itom
Loading...
Searching...
No Matches
helpSystem.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef HELPSYSTEM_H
24#define HELPSYSTEM_H
25
26#include "../../common/sharedStructures.h"
27
28#include <qdir.h>
29#include <qstring.h>
30#include <qmap.h>
31#include <qpair.h>
32
33namespace ito
34{
35
37{
38public:
39 static HelpSystem* getInstance();
40
41 QString getHelpCollectionAbsFileName() const;
42 inline bool isUpToDate() const { return m_upToDate; };
44
45protected:
46
47private:
48 HelpSystem(void);
49 HelpSystem(HelpSystem &/*copyConstr*/) {}
50 ~HelpSystem(void);
51
52 RetVal scanDocumentationFiles(QStringList &qchFiles, quint16 &checksum);
53 RetVal scanPluginQhpFiles(quint16 &checksum);
54 RetVal getCheckSumOfBuild(QDir &helpDir, QString &projectFileName, quint16 &checksum);
55 RetVal getCheckSumOfPluginBuild(quint16 &checksum);
56
57 RetVal rebuildHelpCollection(QStringList &qchFiles, quint16 checksum, QDir &helpDir);
58
59 RetVal buildPluginHelp(quint16 checksum);
60 RetVal buildSinglePluginHelp(const QString &pluginFolder, QDir &buildDir, QDir &sourceDir, QString &tocs, QString &keywords, QString &files, QPair<QString,QString> &mainFileInfo);
61 RetVal analyzeQhpFile(const QString &pluginFolder, QFile &qhpFile, QString &tocs, QString &keywords, QString &files, QStringList &filesToCopy, QPair<QString,QString> &mainFileInfo);
62 QString modifyTocs(const QString &in, const QString &hrefPrefix, QString &mainFile);
63 QString modifyKeywords(const QString &in, const QString &hrefPrefix);
64 QString modifyFiles(const QString &in, const QString &hrefPrefix, const QStringList &excludeContent, QStringList &filesToCopy);
65 RetVal modifyHrefInHtmlFile(const QString &htmlFile, const QString &prefix);
66
67 static bool removeDir(const QDir &directory);
68 static bool copyDir(const QDir &src, const QDir &dst);
69 static bool copyFile(const QFileInfo &srcFileInfo, QDir &dstFolder);
70
71
72 QDir m_helpDirectory;
73 QMap<QString, quint16> m_registeredFilesQCH;
74 QString m_helpCollectionName;
75 QString m_helpCollectionProject;
76 QString m_pluginHelpCollectionName;
77 QString m_pluginHelpCollectionProject;
78 bool m_upToDate;
79
80
81
82
84
87 {
88 public:
90 {
91 #pragma omp critical
92 {
93 if( HelpSystem::m_pHelpSystem != NULL)
94 {
97 }
98 }
99 }
100 };
101 friend class HelpSystemSingleton;
102
103};
104
105}; //namespace ito
106
107#endif
Definition helpSystem.h:87
Definition helpSystem.h:37
RetVal analyzeQhpFile(const QString &pluginFolder, QFile &qhpFile, QString &tocs, QString &keywords, QString &files, QStringList &filesToCopy, QPair< QString, QString > &mainFileInfo)
shortdesc
Definition helpSystem.cpp:833
QString modifyFiles(const QString &in, const QString &hrefPrefix, const QStringList &excludeContent, QStringList &filesToCopy)
shortdesc
Definition helpSystem.cpp:945
RetVal getCheckSumOfBuild(QDir &helpDir, QString &projectFileName, quint16 &checksum)
shortdesc
Definition helpSystem.cpp:307
static HelpSystem * m_pHelpSystem
singleton nach: http://www.oop-trainer.de/Themen/Singleton.html
Definition helpSystem.h:83
static bool copyDir(const QDir &src, const QDir &dst)
shortdesc
Definition helpSystem.cpp:1060
RetVal scanDocumentationFiles(QStringList &qchFiles, quint16 &checksum)
shortdesc
Definition helpSystem.cpp:151
QString getHelpCollectionAbsFileName() const
shortdesc
Definition helpSystem.cpp:130
QString modifyTocs(const QString &in, const QString &hrefPrefix, QString &mainFile)
shortdesc
Definition helpSystem.cpp:873
static bool removeDir(const QDir &directory)
shortdesc
Definition helpSystem.cpp:1024
RetVal buildSinglePluginHelp(const QString &pluginFolder, QDir &buildDir, QDir &sourceDir, QString &tocs, QString &keywords, QString &files, QPair< QString, QString > &mainFileInfo)
shortdesc
Definition helpSystem.cpp:774
RetVal scanPluginQhpFiles(quint16 &checksum)
shortdesc
Definition helpSystem.cpp:214
RetVal modifyHrefInHtmlFile(const QString &htmlFile, const QString &prefix)
shortdesc
Definition helpSystem.cpp:995
RetVal buildPluginHelp(quint16 checksum)
shortdesc
Definition helpSystem.cpp:518
RetVal getCheckSumOfPluginBuild(quint16 &checksum)
shortdesc
Definition helpSystem.cpp:264
static bool copyFile(const QFileInfo &srcFileInfo, QDir &dstFolder)
shortdesc
Definition helpSystem.cpp:1109
RetVal rebuildHelpCollection(QStringList &qchFiles, quint16 checksum, QDir &helpDir)
shortdesc
Definition helpSystem.cpp:391
RetVal rebuildHelpIfNotUpToDate()
shortdesc
Definition helpSystem.cpp:88
QString modifyKeywords(const QString &in, const QString &hrefPrefix)
shortdesc
Definition helpSystem.cpp:910
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.cpp:40