fix docs style

This commit is contained in:
Andrei Yankovich 2020-04-19 16:40:19 +03:00
parent 278a926fd8
commit c167b58e7f
10 changed files with 1479 additions and 85 deletions

2
.gitignore vendored
View File

@ -10,6 +10,8 @@
*.dll
*.dylib
docs
# Qt-es
object_script.*.Release
object_script.*.Debug

View File

@ -1,5 +1,5 @@
#include "controller.h"
#include "serviceprivate.h"
#include "controllerprivate.h"
#include <QDateTime>
#include <QVariantMap>
#include <quasarapp.h>
@ -8,7 +8,7 @@ namespace Patronum {
Controller::Controller(const QString &name):
QtServiceController(name) {
d_ptr = new ServicePrivate(name, this);
d_ptr = new ControllerPrivate(name, this);
}
bool Controller::send(int argc, char **argv) {

View File

@ -6,7 +6,7 @@
namespace Patronum {
class ServicePrivate;
class ControllerPrivate;
/**
* @brief The Controller class provide control functionality for your service
@ -56,7 +56,7 @@ protected:
void handleResponce(const QVariantMap &feature);
private:
ServicePrivate *d_ptr = nullptr;
ControllerPrivate *d_ptr = nullptr;
QList<Feature> _features;
bool _responce = false;

View File

@ -0,0 +1,103 @@
#include "controllerprivate.h"
#include "icontroller.h"
#include "localsocket.h"
#include <quasarapp.h>
#include "package.h"
namespace Patronum {
ControllerPrivate::ControllerPrivate(const QString &name, IController *controller, QObject *parent):
QObject(parent) {
_socket = new LocalSocket(name);
_controller = controller;
QObject::connect(_socket, &LocalSocket::sigReceve,
this, &ControllerPrivate::handleReceve);
}
bool ControllerPrivate::sendFeaturesRequest() {
if (!_socket->isValid()) {
QuasarAppUtils::Params::log("scoket is closed!",
QuasarAppUtils::Error);
return false;
}
QByteArray responce;
QDataStream stream(&responce, QIODevice::WriteOnly);
stream << Command::FeaturesRequest;
return _socket->send(responce);
}
bool ControllerPrivate::sendCmd(const QList<Feature> &result) {
if (!_socket->isValid()) {
QuasarAppUtils::Params::log("scoket is closed!",
QuasarAppUtils::Error);
return false;
}
QByteArray responce;
QDataStream stream(&responce, QIODevice::WriteOnly);
stream << Command::Feature << result;
return _socket->send(responce);
}
void ControllerPrivate::handleReceve(QByteArray data) {
if (data.size() < 2) {
return;
}
const Package *package = reinterpret_cast<const Package *>( data.data());
switch (package->cmd) {
case Command::Features: {
if (!_controller) {
QuasarAppUtils::Params::log("System error, controller is not inited!",
QuasarAppUtils::Error);
break;
}
QDataStream stream(package->data);
QList<Feature> features;
stream >> features;
_controller->handleFeatures(features);
break;
}
case Command::FeatureResponce: {
if (!_controller) {
QuasarAppUtils::Params::log("System error, controller is not inited!",
QuasarAppUtils::Error);
break;
}
QDataStream stream(package->data);
QVariantMap feature;
stream >> feature;
_controller->handleResponce(feature);
break;
}
default: {
QuasarAppUtils::Params::log("Wrong command!",
QuasarAppUtils::Error);
break;
}
}
}
}

View File

@ -0,0 +1,30 @@
#ifndef CONTROLLERPRIVATE_H
#define CONTROLLERPRIVATE_H
#include <feature.h>
namespace Patronum {
class IController;
class LocalSocket;
class ControllerPrivate: public QObject
{
Q_OBJECT
public:
ControllerPrivate(const QString& name, IController* controller = nullptr, QObject *parent = nullptr);
bool sendFeaturesRequest();
bool sendCmd(const QList<Feature>& result);
signals:
void sigListFeatures(QList<Feature>);
private:
LocalSocket *_socket = nullptr;
IController *_controller = nullptr;
private slots:
void handleReceve(QByteArray data);
};
}
#endif // CONTROLLERPRIVATE_H

View File

@ -1,18 +1,16 @@
#include "serviceprivate.h"
#include "iservice.h"
#include "icontroller.h"
#include "localsocket.h"
#include "package.h"
#include <quasarapp.h>
namespace Patronum {
Patronum::ServicePrivate::ServicePrivate(const QString &name, IController *controller, IService *service, QObject *parent):
Patronum::ServicePrivate::ServicePrivate(const QString &name, IService *service, QObject *parent):
QObject(parent) {
_socket = new LocalSocket(name);
_service = service;
_controller = controller;
QObject::connect(_socket, &LocalSocket::sigReceve,
this, &ServicePrivate::handleReceve);
@ -35,36 +33,6 @@ bool ServicePrivate::sendCmdResult(const QVariantMap &result) {
return _socket->send(responce);
}
bool ServicePrivate::sendFeaturesRequest() {
if (!_socket->isValid()) {
QuasarAppUtils::Params::log("scoket is closed!",
QuasarAppUtils::Error);
return false;
}
QByteArray responce;
QDataStream stream(&responce, QIODevice::WriteOnly);
stream << Command::FeaturesRequest;
return _socket->send(responce);
}
bool ServicePrivate::sendCmd(const QList<Feature> &result) {
if (!_socket->isValid()) {
QuasarAppUtils::Params::log("scoket is closed!",
QuasarAppUtils::Error);
return false;
}
QByteArray responce;
QDataStream stream(&responce, QIODevice::WriteOnly);
stream << Command::Feature << result;
return _socket->send(responce);
}
void ServicePrivate::handleReceve(QByteArray data) {
if (data.size() < 2) {
@ -102,24 +70,7 @@ void ServicePrivate::handleReceve(QByteArray data) {
break;
}
case Command::Features: {
if (!_controller) {
QuasarAppUtils::Params::log("System error, controller is not inited!",
QuasarAppUtils::Error);
break;
}
QDataStream stream(package->data);
QList<Feature> features;
stream >> features;
_controller->handleFeatures(features);
break;
}
case Command::Feature: {
if (!_service) {
QuasarAppUtils::Params::log("System error, service is not inited!",
@ -137,22 +88,6 @@ void ServicePrivate::handleReceve(QByteArray data) {
}
case Command::FeatureResponce: {
if (!_controller) {
QuasarAppUtils::Params::log("System error, controller is not inited!",
QuasarAppUtils::Error);
break;
}
QDataStream stream(package->data);
QVariantMap feature;
stream >> feature;
_controller->handleResponce(feature);
break;
}
default: {
QuasarAppUtils::Params::log("Wrong command!",
QuasarAppUtils::Error);

View File

@ -7,26 +7,19 @@ namespace Patronum {
class LocalSocket;
class IService;
class IController;
class ServicePrivate: public QObject
{
Q_OBJECT
public:
ServicePrivate(const QString& name, IController* controller = nullptr,
ServicePrivate(const QString& name,
IService* service = nullptr, QObject *parent = nullptr);
bool sendCmdResult(const QVariantMap& result);
bool sendFeaturesRequest();
bool sendCmd(const QList<Feature>& result);
signals:
void sigListFeatures(QList<Feature>);
private:
LocalSocket *_socket = nullptr;
IService *_service = nullptr;
IController *_controller = nullptr;
private slots:
void handleReceve(QByteArray data);

View File

@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
LAYOUT_FILE =
LAYOUT_FILE = /res/styles/DoxygenLayout.xml
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
@ -1193,7 +1193,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET = res/styles/doxygenStyles.css
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@ -1214,7 +1214,7 @@ HTML_EXTRA_FILES =
# Minimum value: 0, maximum value: 359, default value: 220.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_HUE = 18
HTML_COLORSTYLE_HUE = 220
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
# in the HTML output. For a value of 0 the output will use grayscales only. A
@ -1222,7 +1222,7 @@ HTML_COLORSTYLE_HUE = 18
# Minimum value: 0, maximum value: 255, default value: 100.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_SAT = 104
HTML_COLORSTYLE_SAT = 100
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
# luminance component of the colors in the HTML output. Values below 100
@ -1233,7 +1233,7 @@ HTML_COLORSTYLE_SAT = 104
# Minimum value: 40, maximum value: 240, default value: 80.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE_GAMMA = 70
HTML_COLORSTYLE_GAMMA = 80
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
@ -1451,7 +1451,7 @@ GENERATE_ECLIPSEHELP = NO
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
ECLIPSE_DOC_ID = org.doxygen.Project
ECLIPSE_DOC_ID = QuasarApp.Patronum
# If you want full control over the layout of the generated HTML pages it might
# be necessary to disable the index and replace it with your own. The
@ -1479,7 +1479,7 @@ DISABLE_INDEX = NO
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
GENERATE_TREEVIEW = YES
GENERATE_TREEVIEW = NO
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
# doxygen will group on one line in the generated HTML documentation.

194
res/styles/DoxygenLayout.xml Executable file
View File

@ -0,0 +1,194 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.4 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

1137
res/styles/doxygenStyles.css Executable file

File diff suppressed because it is too large Load Diff