diff --git a/src/graph/model/linegraphmanager.h b/src/graph/model/linegraphmanager.h index 26b55041..5908bdfc 100644 --- a/src/graph/model/linegraphmanager.h +++ b/src/graph/model/linegraphmanager.h @@ -9,6 +9,15 @@ class LineGraphScene; +/*! + * \brief Class for managing LineGraphScene instances + * + * The manager listens for changes on railway plan and + * decides which of the registered LineGraphScene needs + * to be updated. + * + * \sa LineGraphScene + */ class LineGraphManager : public QObject { Q_OBJECT diff --git a/src/graph/model/linegraphscene.h b/src/graph/model/linegraphscene.h index b19ee75a..a3807b2a 100644 --- a/src/graph/model/linegraphscene.h +++ b/src/graph/model/linegraphscene.h @@ -16,14 +16,25 @@ namespace sqlite3pp { class database; } +/*! + * \brief Enum to describe view content type + */ enum class LineGraphType { - NoGraph = 0, - SingleStation, - RailwaySegment, - RailwayLine + NoGraph = 0, //!< No content displayed + SingleStation, //!< Show a single station + RailwaySegment, //!< Show two adjacent stations and the segment in between + RailwayLine //!< Show a complete railway line (multiple adjacent segments) }; +/*! + * \brief Class to store line information + * + * Stores information to draw railway content in a LineGraphView + * + * \sa LineGraphManager + * \sa LineGraphView + */ class LineGraphScene : public QObject { Q_OBJECT diff --git a/src/graph/model/stationgraphobject.h b/src/graph/model/stationgraphobject.h index 6b1b26ab..97cdd193 100644 --- a/src/graph/model/stationgraphobject.h +++ b/src/graph/model/stationgraphobject.h @@ -9,9 +9,10 @@ #include /*! - * Graph of a railway station + * \brief Graph of a railway station * * Contains informations to draw station name, platforms and jobs + * \sa PlatformGraph */ class StationGraphObject { @@ -23,7 +24,7 @@ class StationGraphObject utils::StationType stationType; /*! - * Graph of the job while is stopping + * \brief Graph of the job while is stopping * * Contains informations to draw job line on top of the PlatformGraph */ @@ -38,7 +39,7 @@ class StationGraphObject } JobStopGraph; /*! - * Graph of the job while is moving + * \brief Graph of the job while is moving * * Contains informations to draw job line between two adjacent stations */ @@ -57,9 +58,11 @@ class StationGraphObject } JobLineGraph; /*! - * Graph of a station track (platform) + * \brief Graph of a station track (platform) * * Contains informations to draw platform line and header name + * \sa JobStopGraph + * \sa JobLineGraph */ typedef struct { diff --git a/src/graph/view/backgroundhelper.h b/src/graph/view/backgroundhelper.h index 1357be1e..fad1686e 100644 --- a/src/graph/view/backgroundhelper.h +++ b/src/graph/view/backgroundhelper.h @@ -7,6 +7,15 @@ class QPainter; class LineGraphScene; +/*! + * \brief Helper class to render LineGraphView contents + * + * Contains static helper functions to draw each part of the view + * + * \sa LineGraphView + * \sa HourPanel + * \sa StationLabelsHeader + */ class BackgroundHelper { public: diff --git a/src/graph/view/hourpanel.h b/src/graph/view/hourpanel.h index 1534abd0..dba5c93a 100644 --- a/src/graph/view/hourpanel.h +++ b/src/graph/view/hourpanel.h @@ -3,6 +3,15 @@ #include +/*! + * \brief Helper widget to draw hour labels + * + * Draws hour labels on the view vertical header + * + * \sa LineGraphScene + * \sa LineGraphView + * \sa BackgroundHelper + */ class HourPanel : public QWidget { Q_OBJECT diff --git a/src/graph/view/linegraphtoolbar.h b/src/graph/view/linegraphtoolbar.h index d640c3d9..7f49d8cf 100644 --- a/src/graph/view/linegraphtoolbar.h +++ b/src/graph/view/linegraphtoolbar.h @@ -12,6 +12,14 @@ class CustomCompletionLineEdit; class LineGraphScene; class ISqlFKMatchModel; +/*! + * \brief Toolbar to select railway stations or lines + * + * Consist of a combobox and a line edit + * The combo box selects the content type (\sa LineGraphType) + * The line edit allows to choose which item of selected type + * should be shown. + */ class LineGraphToolbar : public QWidget { Q_OBJECT diff --git a/src/graph/view/linegraphview.h b/src/graph/view/linegraphview.h index f80ddaf1..c11d16ab 100644 --- a/src/graph/view/linegraphview.h +++ b/src/graph/view/linegraphview.h @@ -8,6 +8,15 @@ class LineGraphScene; class StationLabelsHeader; class HourPanel; +/*! + * \brief Widget to display a LineGraphScene + * + * A scrollable widget which renders LineGraphScene contents + * Moving the mouse cursor on the contents, tooltips will show + * + * \sa LineGraphWidget + * \sa BackgroundHelper + */ class LineGraphView : public QAbstractScrollArea { Q_OBJECT diff --git a/src/graph/view/linegraphwidget.h b/src/graph/view/linegraphwidget.h index 99f68c23..43c10cdf 100644 --- a/src/graph/view/linegraphwidget.h +++ b/src/graph/view/linegraphwidget.h @@ -9,6 +9,16 @@ class LineGraphScene; class LineGraphView; class LineGraphToolbar; +/*! + * \brief An all-in-one widget as a railway line view + * + * This widget encapsulate a toolbar to select which + * contents user wants to see (stations, segments or railway lines) + * and a view which renders the chosen contents + * + * \sa LineGraphToolbar + * \sa LineGraphView + */ class LineGraphWidget : public QWidget { Q_OBJECT diff --git a/src/graph/view/stationlabelsheader.h b/src/graph/view/stationlabelsheader.h index 0b3297a8..08608062 100644 --- a/src/graph/view/stationlabelsheader.h +++ b/src/graph/view/stationlabelsheader.h @@ -5,6 +5,16 @@ class LineGraphScene; +/*! + * \brief Helper widget to draw station labels + * + * Draws station labels (with platform numbers below) on + * the view horizontal header + * + * \sa LineGraphScene + * \sa LineGraphView + * \sa BackgroundHelper + */ class StationLabelsHeader : public QWidget { Q_OBJECT