changeset 13344:0a3a2d4e3d86

Added comments.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Wed, 06 Apr 2011 16:39:39 +0200
parents 0c9cf8be675e
children 01eb3fd5faf5
files gui//client.h gui//clientmanager.h gui//mainwindow.h gui//octaveterminal.h gui//terminalhighlighter.h
diffstat 5 files changed, 46 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui//client.h
+++ b/gui//client.h
@@ -25,6 +25,13 @@
 #include <QThread>
 #include <QMutex>
 
+/**
+  * \class Client
+  *
+  * A client is a representation of another external unit Quint is communicating with.
+  * Usually this will be the octave process. A client is launched by providing a command
+  * that will be executed. It will handle the process itself.
+  */
 class Client : public QObject {
     Q_OBJECT
     friend class ClientManager;
@@ -41,6 +48,7 @@
     void lostConnection();
 
 protected:
+    /** Clients may only be created by the client manager. */
     Client(QString command);
 
 private slots:
@@ -55,6 +63,15 @@
     QMutex m_access;
 };
 
+/**
+  * \class PendingRequest
+  *
+  * The PendingRequest class helps to communicate with clients. It automatically locks
+  * the client until the PendingRequest is deleted. As soon as the request is being
+  * answered, it will send out the answered()-Signal. It buffers all input and delivers
+  * it by offering the fetchData() and fetchError()-methods. A request is considered
+  * as answered, when the termination string is found in the buffer.
+  */
 class PendingRequest : public QObject {
     Q_OBJECT
 public:
--- a/gui//clientmanager.h
+++ b/gui//clientmanager.h
@@ -23,11 +23,18 @@
 #include <QObject>
 #include "client.h"
 
+/**
+  * \class ClientManager
+  *
+  * The client manager is a singleton that keeps track of all current clients.
+  */
 class Client;
 class ClientManager : public QObject {
     Q_OBJECT
 public:
     static ClientManager& clientManager();
+
+    /** Factory function to produce new clients. */
     Client *startProcess(QString command);
 
 private:
--- a/gui//mainwindow.h
+++ b/gui//mainwindow.h
@@ -22,6 +22,11 @@
 #include <QtGui/QMainWindow>
 #include <QMdiArea>
 
+/**
+  * \class MainWindow
+  *
+  * Represents the main window.
+  */
 class MainWindow : public QMainWindow
 {
     Q_OBJECT
--- a/gui//octaveterminal.h
+++ b/gui//octaveterminal.h
@@ -32,6 +32,11 @@
 #include "client.h"
 #include "terminalhighlighter.h"
 
+/**
+  * \class TerminalCommandLine
+  *
+  * Extends the QLineEdit by a history function.
+  */
 class TerminalCommandLine : public QLineEdit {
     Q_OBJECT
 public:
@@ -102,6 +107,12 @@
     int m_commandHistoryIndex;
 };
 
+/**
+  * \class OctaveTerminal
+  *
+  * Provides a complete OctaveTerminal. Unless there is no octave client assigned to
+  * this terminal it will be not functional.
+  */
 class OctaveTerminal : public QMdiSubWindow {
     Q_OBJECT
 public:
--- a/gui//terminalhighlighter.h
+++ b/gui//terminalhighlighter.h
@@ -20,6 +20,12 @@
 #define TERMINALHIGHLIGHTER_H
 
 #include <QSyntaxHighlighter>
+
+/**
+  * \class TerminalHighlighter
+  *
+  * Subclass Qt's QSyntaxHighlighter-class to provide syntac highlighting.
+  */
 class QTextDocument;
 class TerminalHighlighter : public QSyntaxHighlighter {
     Q_OBJECT