# HG changeset patch # User Jacob Dawid # Date 1302100779 -7200 # Node ID 0a3a2d4e3d8613b54fdfb114ee582f0f8acd8cf2 # Parent 0c9cf8be675e7bb2d6773bac784108b4bd534ff0 Added comments. diff --git a/gui//client.h b/gui//client.h --- a/gui//client.h +++ b/gui//client.h @@ -25,6 +25,13 @@ #include #include +/** + * \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: diff --git a/gui//clientmanager.h b/gui//clientmanager.h --- a/gui//clientmanager.h +++ b/gui//clientmanager.h @@ -23,11 +23,18 @@ #include #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: diff --git a/gui//mainwindow.h b/gui//mainwindow.h --- a/gui//mainwindow.h +++ b/gui//mainwindow.h @@ -22,6 +22,11 @@ #include #include +/** + * \class MainWindow + * + * Represents the main window. + */ class MainWindow : public QMainWindow { Q_OBJECT diff --git a/gui//octaveterminal.h b/gui//octaveterminal.h --- 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: diff --git a/gui//terminalhighlighter.h b/gui//terminalhighlighter.h --- a/gui//terminalhighlighter.h +++ b/gui//terminalhighlighter.h @@ -20,6 +20,12 @@ #define TERMINALHIGHLIGHTER_H #include + +/** + * \class TerminalHighlighter + * + * Subclass Qt's QSyntaxHighlighter-class to provide syntac highlighting. + */ class QTextDocument; class TerminalHighlighter : public QSyntaxHighlighter { Q_OBJECT