[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [atcore] src/widgets: Documentation of atcorewidgets.
From:       Chris Rizzitello <null () kde ! org>
Date:       2018-06-01 1:09:13
Message-ID: E1fOYZ7-0003iD-AQ () code ! kde ! org
[Download RAW message or body]

Git commit 14be2bac85b71ac246d5fb635b9a0348408090c9 by Chris Rizzitello.
Committed on 01/06/2018 at 01:01.
Pushed by rizzitello into branch 'master'.

Documentation of atcorewidgets.

Signed-off-by: Chris Rizzitello <rizzitello@kde.org>

M  +4    -0    src/widgets/about.h
M  +11   -6    src/widgets/axiscontrol.h
M  +13   -3    src/widgets/commandwidget.h
M  +6    -12   src/widgets/logwidget.h
M  +4    -5    src/widgets/movementwidget.h
M  +3    -5    src/widgets/plotwidget.h
M  +4    -4    src/widgets/printwidget.h
M  +25   -4    src/widgets/sdwidget.h
M  +2    -4    src/widgets/statuswidget.h
M  +24   -4    src/widgets/temperaturewidget.h

https://commits.kde.org/atcore/14be2bac85b71ac246d5fb635b9a0348408090c9

diff --git a/src/widgets/about.h b/src/widgets/about.h
index ff336ea..c6d6b32 100644
--- a/src/widgets/about.h
+++ b/src/widgets/about.h
@@ -25,6 +25,10 @@
 
 #include "atcorewidgets_export.h"
 
+/**
+ * @brief An About AtCore dialog.
+ */
+
 class ATCOREWIDGETS_EXPORT About : public QDialog
 {
     Q_OBJECT
diff --git a/src/widgets/axiscontrol.h b/src/widgets/axiscontrol.h
index 14088f2..a0a0dc1 100644
--- a/src/widgets/axiscontrol.h
+++ b/src/widgets/axiscontrol.h
@@ -23,12 +23,6 @@
 #include <QGraphicsEllipseItem>
 
 #include "atcorewidgets_export.h"
-/* Usage:
- *
- * Create a instance of PrinterHotendPositionVisualController and
- * connect the clicked signal, it will give you the axis and value
- * that was clicked.
- */
 
 class ATCOREWIDGETS_EXPORT PieButton : public QObject, public QGraphicsEllipseItem
 {
@@ -67,6 +61,12 @@ private:
     QPalette _palette;
 };
 
+/**
+ * @brief AxisControl is a Widget to generate axis relative movements.
+ *
+ * Usage:
+ * Create a instance of AxisControl and connect the clicked signal, it will give you \
the axis and value that was clicked. + */
 class ATCOREWIDGETS_EXPORT AxisControl : public QGraphicsView
 {
     Q_OBJECT
@@ -81,6 +81,11 @@ protected:
     void resizeEvent(QResizeEvent *);
 
 signals:
+    /**
+     * @brief User has clicked to move an axis.
+     * @param axis: Axis to move
+     * @param value: Amount to move
+     */
     void clicked(QLatin1Char axis, int value);
 
 };
diff --git a/src/widgets/commandwidget.h b/src/widgets/commandwidget.h
index 1a85860..d2b8ebd 100644
--- a/src/widgets/commandwidget.h
+++ b/src/widgets/commandwidget.h
@@ -21,11 +21,12 @@
 #include <QWidget>
 
 #include "atcorewidgets_export.h"
-/* Usage:
+/**
+ * @brief CommandWidget provides a widget to send commands or messages to the \
                printer.
  *
- * Create a instance of the command widget.
+ * Usage:
+ * Connect to commandPressed or messagePressed to capture the events.
  */
-
 class ATCOREWIDGETS_EXPORT CommandWidget : public QWidget
 {
     Q_OBJECT
@@ -33,7 +34,16 @@ public:
     CommandWidget(QWidget *parent = nullptr);
 
 signals:
+    /**
+     * @brief User has requested to send a command.
+     * @param command: The command to send.
+     */
     void commandPressed(const QString &command);
+
+    /**
+     * @brief User has requested to send a message
+     * @param message: The message to send.
+     */
     void messagePressed(const QString &message);
 
 private:
diff --git a/src/widgets/logwidget.h b/src/widgets/logwidget.h
index 7e559a7..347d2e0 100644
--- a/src/widgets/logwidget.h
+++ b/src/widgets/logwidget.h
@@ -22,11 +22,10 @@
 #include <QWidget>
 
 #include "atcorewidgets_export.h"
-/* Usage:
- *
- * Create a instance of the log widget.
- */
 
+/**
+ * @brief The LogWidget will display the log for the connected atcore. Create with a \
pointer to a new QTemporaryFile. + */
 class ATCOREWIDGETS_EXPORT LogWidget : public QWidget
 {
     Q_OBJECT
@@ -34,22 +33,19 @@ public:
     LogWidget(QTemporaryFile *tempFile, QWidget *parent = nullptr);
 
     /**
-     * @brief Add in logger normal type message
-     *
+     * @brief Add a message to the log.
      * @param  msg: Message
      */
     void appendLog(const QString &msg);
 
     /**
-     * @brief Add in logger received type message
-     *
+     * @brief Connect to AtCore::receivedMessage
      * @param  bmsg: Message
      */
     void appendRLog(const QByteArray &bmsg);
 
     /**
-     * @brief Add in logger send type message
-     *
+     * @brief Connect to AtCore::SerialLayer::pushedCommand
      * @param  bmsg: Message
      */
     void appendSLog(const QByteArray &bmsg);
@@ -64,7 +60,6 @@ public:
 private:
     /**
      * @brief Return string with actual time
-     *
      * @return QString
      */
     QString getTime();
@@ -76,7 +71,6 @@ private:
 
     /**
      * @brief Append text in temporary file
-     *
      * @param text
      */
     void writeTempFile(QString text);
diff --git a/src/widgets/movementwidget.h b/src/widgets/movementwidget.h
index c916dd1..94967c9 100644
--- a/src/widgets/movementwidget.h
+++ b/src/widgets/movementwidget.h
@@ -22,11 +22,10 @@
 #include <QWidget>
 
 #include "atcorewidgets_export.h"
-/* Usage:
- *
- * Create a instance of the movement widget. This widget will provide Basic Movement \
Controls. Create it with "showHomeAndDisableWidgets" false if your client provides \
its own actions for homing and disabling the motors. +/**
+ * @brief The MovementWidget class
+ * This widget will provide Basic Movement Controls. Create it with \
"showHomeAndDisableWidgets" false if your client provides its own actions for homing \
                and disabling the motors.
  */
-
 class ATCOREWIDGETS_EXPORT MovementWidget : public QWidget
 {
     Q_OBJECT
@@ -78,7 +77,7 @@ signals:
     void absoluteMove(const QLatin1Char &axis, const double &value);
 
     /**
-     * @brief A relativeMove was requested.
+     * @brief A relativeMove was requested from the AxisControl
      * This should connect to a function that does the following
      *  AtCore::setRelativePosition()
      *  AtCore::move(axis, value)
diff --git a/src/widgets/plotwidget.h b/src/widgets/plotwidget.h
index 60224d9..5f16a4c 100644
--- a/src/widgets/plotwidget.h
+++ b/src/widgets/plotwidget.h
@@ -26,7 +26,9 @@
 #include <QtCharts>
 
 #include "atcorewidgets_export.h"
-
+/**
+ * @brief PlotWidget Show a graph of the temperature over time.
+ */
 class ATCOREWIDGETS_EXPORT PlotWidget : public QWidget
 {
     Q_OBJECT
@@ -37,21 +39,18 @@ public:
 
     /**
      * @brief Create a new plot
-     *
      * @param name p_name: plot name
      */
     void newPlot(const QString &name);
 
     /**
      * @brief Delete plot with name
-     *
      * @param name p_name: name
      */
     void deletePlot(const QString &name);
 
     /**
      * @brief Append point to plot
-     *
      * @param name p_name: plot name
      * @param value p_value: value
      */
@@ -59,7 +58,6 @@ public:
 
     /**
      * @brief Update plot list, need to run after ALL plots added
-     *
      */
     void update();
 private:
diff --git a/src/widgets/printwidget.h b/src/widgets/printwidget.h
index cb0d35d..922aba3 100644
--- a/src/widgets/printwidget.h
+++ b/src/widgets/printwidget.h
@@ -23,11 +23,10 @@
 #include <QWidget>
 
 #include "atcorewidgets_export.h"
-/* Usage:
- *
- * Create a instance of the print widget.
+/**
+ * @brief PrintWidget
+ * provide a basic print widget.
  */
-
 class ATCOREWIDGETS_EXPORT PrintWidget : public QWidget
 {
     Q_OBJECT
@@ -73,6 +72,7 @@ signals:
 
     /**
      * @brief printPressed
+     * Users requested to print a file.
      */
     void printPressed();
 
diff --git a/src/widgets/sdwidget.h b/src/widgets/sdwidget.h
index e8f66e2..3f744aa 100644
--- a/src/widgets/sdwidget.h
+++ b/src/widgets/sdwidget.h
@@ -21,20 +21,41 @@
 #include <QWidget>
 
 #include "atcorewidgets_export.h"
-/* Usage:
- *
- * Create a instance of the sd widget.
+/**
+ * @brief The SdWidget class
+ * Provide basic Sd card actions. Requires Fw Support.
  */
-
 class ATCOREWIDGETS_EXPORT SdWidget : public QWidget
 {
     Q_OBJECT
 public:
+    /**
+     * @brief SdWidget
+     * @param parent
+     */
     SdWidget(QWidget *parent = nullptr);
+
+    /**
+     * @brief update the list of files on the card.
+     * @param fileList
+     */
     void updateFilelist(const QStringList &fileList);
 signals:
+    /**
+     * @brief request a list of files on the card.
+     */
     void requestSdList();
+
+    /**
+     * @brief User has selected to print a file for the sd card.
+     * @param fileName: file to print.
+     */
     void printSdFile(const QString &fileName);
+
+    /**
+     * @brief User has selected to delete a file for the sd card.
+     * @param fileName: file to delete
+     */
     void deleteSdFile(const QString &fileName);
 
 private:
diff --git a/src/widgets/statuswidget.h b/src/widgets/statuswidget.h
index 39f9689..54a2467 100644
--- a/src/widgets/statuswidget.h
+++ b/src/widgets/statuswidget.h
@@ -23,11 +23,9 @@
 #include <QWidget>
 
 #include "atcorewidgets_export.h"
-/* Usage:
- *
- * Create a instance of the status widget.
+/**
+ * @brief The StatusWidget class Status Bar information for atcore
  */
-
 class ATCOREWIDGETS_EXPORT StatusWidget : public QWidget
 {
     Q_OBJECT
diff --git a/src/widgets/temperaturewidget.h b/src/widgets/temperaturewidget.h
index 0f9f202..e4181d1 100644
--- a/src/widgets/temperaturewidget.h
+++ b/src/widgets/temperaturewidget.h
@@ -23,20 +23,40 @@
 #include <QWidget>
 
 #include "atcorewidgets_export.h"
-/* Usage:
- *
- * Create a instance of the temperature widget.
+/**
+ * @brief The TemperatureWidget Control the bed and extruder(s) temperatures
  */
-
 class ATCOREWIDGETS_EXPORT TemperatureWidget : public QWidget
 {
     Q_OBJECT
 public:
+
+    /**
+     * @brief TemperatureWidget
+     * @param parent
+     */
     TemperatureWidget(QWidget *parent = nullptr);
+
+    /**
+     * @brief Update widget with count extruder controls
+     * @param count: number of extruder controls needed.
+     */
     void updateExtruderCount(const int count);
 
 signals:
+    /**
+     * @brief User has changed the bed temperature.
+     * @param temperature: new temperature
+     * @param andWait: true if heat and wait mode
+     */
     void bedTempChanged(const int temperature, bool andWait);
+
+    /**
+     * @brief User has changed the extruder temperature.
+     * @param temperature: new temperature
+     * @param extNum: the extruder to change temperature of
+     * @param andWait: true if head and wait mode.
+     */
     void extTempChanged(const int temperature, const int extNum, bool andWait);
 
 private:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic