From 2d062ef642d09cf688e0d6384557fb59997f9058 Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Wed, 29 Apr 2009 19:52:43 -0700 Subject: [PATCH] Updating Doxygen styling and Licenses --- docs/Doxyfile | 5 +- docs/footer.html | 2 +- src/Baulk/Control/control.h | 41 ++-- src/Baulk/Control/interfacedialog.h | 25 +-- src/Baulk/Control/wrapper_control.h | 14 +- src/Baulk/baulk.h | 19 +- src/Baulk/main.cpp | 6 +- src/Common/baulkdialog.h | 8 +- src/Common/baulkwidget.h | 17 +- src/Common/baulkwindow.h | 7 +- src/Common/baulkxml.h | 20 +- src/Common/compositing.h | 1 + src/Common/handler.h | 7 +- src/Common/libraryloader.h | 30 +-- src/Server/client.h | 25 ++- src/Server/main.cpp | 7 +- src/Server/packet.h | 21 +- src/Server/server.h | 17 +- src/Widgets/BaulkStatus/baulkstatus.h | 10 +- src/Widgets/BaulkStatus/wrapper_baulkstatus.h | 6 +- src/Widgets/BaulkSwallow/baulkswallow.h | 8 +- src/Widgets/BaulkSwallow/wrapper_baulkswallow.h | 7 +- src/Widgets/BaulkTerm/qtermwidget/BlockArray.cpp | 40 ++-- src/Widgets/BaulkTerm/qtermwidget/BlockArray.h | 55 +++-- src/Widgets/BaulkTerm/qtermwidget/Character.h | 85 ++++---- src/Widgets/BaulkTerm/qtermwidget/CharacterColor.h | 77 ++++--- src/Widgets/BaulkTerm/qtermwidget/ColorTables.h | 17 ++ src/Widgets/BaulkTerm/qtermwidget/Emulation.cpp | 54 ++--- src/Widgets/BaulkTerm/qtermwidget/Emulation.h | 129 ++++++----- src/Widgets/BaulkTerm/qtermwidget/Filter.cpp | 38 ++-- src/Widgets/BaulkTerm/qtermwidget/Filter.h | 133 ++++++------ src/Widgets/BaulkTerm/qtermwidget/History.cpp | 48 ++--- src/Widgets/BaulkTerm/qtermwidget/History.h | 78 ++++--- .../BaulkTerm/qtermwidget/KeyboardTranslator.cpp | 78 ++++--- .../BaulkTerm/qtermwidget/KeyboardTranslator.h | 179 ++++++++------- src/Widgets/BaulkTerm/qtermwidget/LineFont.h | 1 + src/Widgets/BaulkTerm/qtermwidget/Pty.cpp | 40 ++-- src/Widgets/BaulkTerm/qtermwidget/Pty.h | 102 +++++---- src/Widgets/BaulkTerm/qtermwidget/Screen.cpp | 39 ++-- src/Widgets/BaulkTerm/qtermwidget/Screen.h | 208 +++++++++--------- src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.cpp | 38 ++-- src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.h | 102 +++++---- src/Widgets/BaulkTerm/qtermwidget/Session.cpp | 45 ++-- src/Widgets/BaulkTerm/qtermwidget/Session.h | 218 ++++++++++--------- src/Widgets/BaulkTerm/qtermwidget/ShellCommand.cpp | 40 ++-- src/Widgets/BaulkTerm/qtermwidget/ShellCommand.h | 57 +++-- .../qtermwidget/TerminalCharacterDecoder.cpp | 42 ++-- .../qtermwidget/TerminalCharacterDecoder.h | 61 +++--- .../BaulkTerm/qtermwidget/TerminalDisplay.cpp | 47 ++-- .../BaulkTerm/qtermwidget/TerminalDisplay.h | 179 ++++++++------- .../BaulkTerm/qtermwidget/Vt102Emulation.cpp | 40 ++-- src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.h | 48 ++--- src/Widgets/BaulkTerm/qtermwidget/k3process.cpp | 41 ++-- src/Widgets/BaulkTerm/qtermwidget/k3process.h | 240 ++++++++++----------- .../BaulkTerm/qtermwidget/k3processcontroller.cpp | 39 ++-- .../BaulkTerm/qtermwidget/k3processcontroller.h | 60 +++--- .../BaulkTerm/qtermwidget/konsole_wcwidth.cpp | 1 + .../BaulkTerm/qtermwidget/konsole_wcwidth.h | 1 + src/Widgets/BaulkTerm/qtermwidget/kpty.cpp | 43 ++-- src/Widgets/BaulkTerm/qtermwidget/kpty.h | 76 ++++--- src/Widgets/BaulkTerm/qtermwidget/kpty_p.h | 87 ++++---- src/Widgets/BaulkTerm/qtermwidget/qtermwidget.cpp | 35 ++- src/Widgets/BaulkTerm/qtermwidget/qtermwidget.h | 105 +++++---- src/Widgets/BaulkTerm/wrapper/baulkterm.h | 34 +-- src/Widgets/BaulkTerm/wrapper/main.cpp | 10 +- src/Widgets/BaulkTerm/wrapper/rightclickmenu.h | 9 +- src/Widgets/BaulkTerm/wrapper/terminalcolour.h | 29 ++- src/Widgets/BaulkTerm/wrapper/wrapper_baulkterm.h | 6 +- src/Widgets/WebBaulk/common.h | 10 +- src/Widgets/WebBaulk/webbaulk.h | 29 ++- src/Widgets/WebBaulk/wrapper_webbaulk.h | 8 +- 71 files changed, 1696 insertions(+), 1788 deletions(-) rewrite src/Widgets/BaulkTerm/qtermwidget/kpty_p.h (76%) diff --git a/docs/Doxyfile b/docs/Doxyfile index bdeda37..a1897ac 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -39,7 +39,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO -BUILTIN_STL_SUPPORT = NO +BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES @@ -101,8 +101,7 @@ FILE_PATTERNS = *.cpp \ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = YES -EXCLUDE_PATTERNS = qtermwidget \ - CMakeCXXCompilerId.cpp +EXCLUDE_PATTERNS = CMakeCXXCompilerId.cpp EXCLUDE_SYMBOLS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * diff --git a/docs/footer.html b/docs/footer.html index 5e8883f..c57d551 100644 --- a/docs/footer.html +++ b/docs/footer.html @@ -1,6 +1,6 @@
- Baulk © 2008 Jacob Alexander (HaaTa), generated by  + Baulk © 2008-2009 Jacob Alexander (HaaTa), generated by  doxygen
diff --git a/src/Baulk/Control/control.h b/src/Baulk/Control/control.h index 46157d0..8f7b4ca 100644 --- a/src/Baulk/Control/control.h +++ b/src/Baulk/Control/control.h @@ -36,11 +36,8 @@ #include "interfacedialog.h" +//! The main control for Baulk. /** - * @author Jacob Alexander (HaaTa) - * - * The main control for Baulk. - * * Handles most, if not all user interaction for Baulk, minus, what is * provided by each Widget. */ @@ -48,8 +45,10 @@ class BaulkControl : public BaulkWidget { Q_OBJECT public: + //! Default Constructor BaulkControl( QWidget *parent = 0 ); + //! Struct for list of libraries, contains a QStringList of names and QList of library loaders struct LibraryList { QStringList name; QList library; @@ -64,51 +63,51 @@ public slots: void modifyGlobalKeyShortcut( int key, QString keyShortcut ); private: - // Main Layout + //! Main Layouts QHBoxLayout *topHLayout; QVBoxLayout *topVLayout; - // Tab Layer + //! Tab Layer QStackedWidget *tabLayer; - // Dynamic Layout + //! Dynamic Layout QSplitter *dynTopLayout; QSplitter *dynBotLayout; int lastKnownGoodIndex; bool invertIndex; - // Global QActions + //! Global QActions QList glbQActions; - // Interface Dialog + //! Interface Dialog BaulkInterfaceDialog *interfaceDialog; - // Library List + //! Library List LibraryList libList; - // Baulk Config Loader/Saver + //! Baulk Config Loader/Saver BaulkXML *xmlConfig; - // QAction Setup + //! QAction Setup QAction *addGlobalAction( QString title, QString keyShortcut, bool globalConnect = false ); void setupQActions(); - // Application Name for Errors + //! Application Name for Errors QString errorName() const { return tr("BaulkControl"); } - // Widget Finders + //! Widget Finders int dynBotIndex(); int dynTopIndex(); private slots: - // Dynamic Librariess + //! Dynamic Librariess void loadLibraries(); + //! Instanciates Information Client void startInformationClient(); - // Tile Manipulation - // ** Focus + //! Tile Manipulation ** Focus void focusDec(); void focusDecBorder(); void focusDown(); @@ -119,7 +118,7 @@ private slots: void focusLayoutInc(); void focusRight(); void focusUp(); - // ** Moving + //! Tile Manipulation ** Moving void moveDec(); void moveDecBorder(); void moveDown(); @@ -130,13 +129,13 @@ private slots: void moveLayoutInc(); void moveRight(); void moveUp(); - // ** Orientation + //! Tile Manipulation ** Orientation void swapOrientationBot(); void swapOrientationTop(); - // ** Removal + //! Tile Manipulation ** Removal void removeWidget(); - // Assistive Functions + //! Assistive Function void globalActionTriggered(); protected: diff --git a/src/Baulk/Control/interfacedialog.h b/src/Baulk/Control/interfacedialog.h index e49e114..8ac081f 100644 --- a/src/Baulk/Control/interfacedialog.h +++ b/src/Baulk/Control/interfacedialog.h @@ -35,25 +35,22 @@ #include #include -/** - * @author Jacob Alexander (HaaTa) - * - * The GUI Controller for all control options in Baulk. - */ +//! The GUI Controller for all control options in Baulk. class BaulkInterfaceDialog : public QObject { Q_OBJECT public: + //! Default Constructor BaulkInterfaceDialog( BaulkWidget *parent ); public slots: - // Control -> Dialog Connectors + //! Control -> Dialog Connectors void actionsDialogLoader(); void configurationDialogLoader(); void newWidgetDialogLoader(); private: - // Dialogs + //! Dialogs BaulkDialog *actionsDialog; BaulkDialog *configurationDialog; BaulkDialog *newWidgetDialog; @@ -61,31 +58,31 @@ private: // Controller BaulkWidget *parentWidget; - // New Widget List + //! New Widget List QListView *newListView; QStringListModel *newListViewModel; - // Configuration Tree + //! Configuration Tree QTreeWidget *configurationTree; - // Hotkey List + //! Hotkey List QTableWidget *actionsTableView; - // Application Name for Errors + //! Application Name for Errors QString errorName() const { return tr("BaulkInterfaceDialog"); } private slots: - // Dialog -> Control Connectors + //! Dialog -> Control Connectors void actionsDialogHotkeyAccepted( int row, int column ); void actionsDialogHotkeyModified( int row, int column ); void newWidgetAccepted( QModelIndex index ); - // Dialog Functionality + //! Dialog Functionality void actionsDialogHotkeyEdit( QTableWidgetItem *item ); signals: - // Dialog -> Control Signals + //! Dialog -> Control Signals void newWidget( LibraryLoader *library ); }; diff --git a/src/Baulk/Control/wrapper_control.h b/src/Baulk/Control/wrapper_control.h index a8ef82e..42dee3a 100644 --- a/src/Baulk/Control/wrapper_control.h +++ b/src/Baulk/Control/wrapper_control.h @@ -35,22 +35,20 @@ #include "control.h" -/** - * @author Jacob Alexander (HaaTa) - * - * DLL Wrapper for BaulkControl - */ +//! DLL Wrapper for BaulkControl // Exported Symbols ******************************************************************************* +//! C Exported Symbols extern "C" EXPORTDLL { + //! List of available symbols QStringList symbolList(); - // Main Widget + //! Main Widget BaulkWidget *control_mainWidget( QWidget *parent = 0 ); - // Widget Name + //! Widget Name QString control_widgetName(); - // Quit Event + //! Quit Event bool allowQuit(); } diff --git a/src/Baulk/baulk.h b/src/Baulk/baulk.h index 64cdd6b..cfcbc5c 100644 --- a/src/Baulk/baulk.h +++ b/src/Baulk/baulk.h @@ -27,11 +27,8 @@ #include #include -/** - * @author Jacob Alexander (HaaTa) - * - * Main GUI Entrance class for Baulk. - * +//! Main GUI Entrance class for Baulk. +/*! * Handles: * - Loading BaulkControl Shared Library * - Connecting message output to BaulkControl @@ -41,10 +38,10 @@ class Baulk : public QMainWindow { Q_OBJECT public: - /// Baulk Constructor + //! Baulk Constructor Baulk( QWidget *parent = 0 ); - /** + /*! * This public function allows \link handler() \endlink * to pass Console Out Messages into Baulk */ @@ -53,18 +50,18 @@ public: bool processCommandArgs(); private: - /// BaulkControl Pointer + //! BaulkControl Pointer BaulkWidget *controller; - /// BaulkControl Library Pointer + //! BaulkControl Library Pointer LibraryLoader *library; private slots: - /// Allows BaulkControl to change the Window Title + //! Allows BaulkControl to change the Window Title void setWindowTitleName( QString windowTitle ); protected: - /** + /*! * Reimplemented QWidget Event that handles the application * Quit Event */ diff --git a/src/Baulk/main.cpp b/src/Baulk/main.cpp index dd9dd40..1807786 100644 --- a/src/Baulk/main.cpp +++ b/src/Baulk/main.cpp @@ -21,15 +21,13 @@ #include "baulk.h" -/// Baulk Declaration for use in handler.h +//! Baulk Declaration for use in handler.h Baulk *baulk; #include #include // Used in X11 only -/** - * @author Jacob Alexander (HaaTa) - * +/*! * First point of entry, which passes to baulk.h. * Captures all debug output for this instance of Baulk. */ diff --git a/src/Common/baulkdialog.h b/src/Common/baulkdialog.h index 3913d43..9bdb2d0 100644 --- a/src/Common/baulkdialog.h +++ b/src/Common/baulkdialog.h @@ -22,10 +22,10 @@ #include #include -/** - * @author Jacob Alexander (HaaTa) - * - * Baulk reimplementation of QDialog + +//! Baulk reimplementation of QDialog +/*! + * A common interface for dialogs in Baulk to be modified globally. */ class BaulkDialog : public QDialog { Q_OBJECT diff --git a/src/Common/baulkwidget.h b/src/Common/baulkwidget.h index 19bfe8c..e85cc04 100644 --- a/src/Common/baulkwidget.h +++ b/src/Common/baulkwidget.h @@ -28,30 +28,33 @@ #include "builddefines.h" -/** - * @author Jacob Alexander (HaaTa) - * - * QWidget Reimplementation for Baulk +//! QWidget Reimplementation for Baulk +/*! + * A QWidget Reimplementation useful for adding subfeatures to all widgets in Baulk. */ class BaulkWidget : public QWidget { Q_OBJECT public: + //! Default Constructor BaulkWidget( QWidget *parent = 0 ); - // For using a QWidget (or derivative) as BaulkWidget + //! Constructor for using a QWidget (or derivative) as BaulkWidget BaulkWidget( QWidget *wrapWidget, QWidget *parent ); - // Properties + //! Internal message logs QStringList msgLogs() const; + //! Add to internal message logs void setMsgLogs( QStringList msgLogs ); + + //! BaulkServ Listen Name QString serverListenName() const; void setServerListenName( QString listenName ); QString windowTitleName() const; void setWindowTitleName( QString titleName ); - // Command Line Argument Processing + //! Command Line Argument Processing virtual bool processCommandArgs(); public slots: diff --git a/src/Common/baulkwindow.h b/src/Common/baulkwindow.h index 9937ca9..6c870f3 100644 --- a/src/Common/baulkwindow.h +++ b/src/Common/baulkwindow.h @@ -22,10 +22,9 @@ #include #include -/** - * @author Jacob Alexander (HaaTa) - * - * Baulk reimplementation of QMainWindow +//! Baulk reimplementation of QMainWindow +/*! + * A QMainWindow reimplementation useful for adding features to all of Baulk */ class BaulkWindow : public QMainWindow { Q_OBJECT diff --git a/src/Common/baulkxml.h b/src/Common/baulkxml.h index 194ba2d..9f9ba29 100644 --- a/src/Common/baulkxml.h +++ b/src/Common/baulkxml.h @@ -28,10 +28,9 @@ #include #include -/** - * @author Jacob Alexander (HaaTa) - * - * Reads/Writes custom XML Configuration files for Baulk. +//! Reads/Writes custom XML Configuration files for Baulk. +/*! + * Custom XML Configuration class for reading and writing configuration files in Baulk and its sub-projects */ class BaulkXML : public QObject { Q_OBJECT @@ -40,18 +39,23 @@ public: BaulkXML( QString configName, QObject *parent = 0 ); ~BaulkXML(); - // Save Config to Disk + //! Save Config to Disk bool saveConfig(); - // Checks for successful XML load + //! Checks for successful XML load bool loadSuccessful(); - // Option + //! Load Option QVariant option( QString settingName, QString propertyKey = "", QVariant property = QVariant(""), bool warnOnNotFound = true ); + //! Save Option void setOption( QString settingName, QVariant value, QString propertyKey = "", QVariant properties = QVariant("") ); - // Profile + //! Current Profile + /*! + * Profiles allow for different sets of options in the same configuration file. + */ QString profile(); + //! Set options profile to use void setProfile( QString profileName ); private: diff --git a/src/Common/compositing.h b/src/Common/compositing.h index 594004d..feb9331 100644 --- a/src/Common/compositing.h +++ b/src/Common/compositing.h @@ -26,6 +26,7 @@ #include #include +//! Provides QT with the information required to do compositing void getDisplayInformation( Display*& display , Visual*& visual , Colormap& colormap ) { display = XOpenDisplay( 0 ); // open default display diff --git a/src/Common/handler.h b/src/Common/handler.h index 1454bd4..5dd4dcc 100644 --- a/src/Common/handler.h +++ b/src/Common/handler.h @@ -27,11 +27,8 @@ QStringList msgLogs; #endif -/** - * @author Jacob Alexander (HaaTa) - * - * Handles all messages sent by the application - * +//! Handles all messages sent by the application +/*! * Baulk * - QDebug only sends messages into Baulk * - QWarning only sends messages into Baulk diff --git a/src/Common/libraryloader.h b/src/Common/libraryloader.h index 35404c2..dda6a4d 100644 --- a/src/Common/libraryloader.h +++ b/src/Common/libraryloader.h @@ -24,46 +24,46 @@ #include "baulkwidget.h" -/** - * @author Jacob Alexander (HaaTa) - * - * Streamlined Library Loader for Baulk +//! Streamlined Library Loader for Baulk +/*! + * A reimplemented QLibray class for convenience functions used in Baulk */ class LibraryLoader : public QLibrary { Q_OBJECT public: + //! Default Constructor LibraryLoader( QObject *parent = 0 ); - // Directory is assumed + + //! Constructor in which the library path is assumed Baulk defaults LibraryLoader( QString libraryName, QObject *parent = 0 ); void setupLibraryLoader( QObject *parent ); - // A list of all errors since initialization, not accurate when using QLibrary directly (unless function reimplemented) + //! A list of all errors since initialization, not accurate when using QLibrary directly (unless function reimplemented) QStringList errorList() const; - // Returns true if a library exists - // Assumes Baulk library directories + //! Returns true if a library exists. Assumes Baulk library directories bool exists( QString libraryName ); - // Loads the Library, returns true if successful, false otherwise - // Assumes Baulk library directories + //! Loads the Library, returns true if successful, false otherwise. Assumes Baulk library directories bool loadLibrary( QString libraryName ); bool loadLibrary( QString libraryName, int versionNumber ); - bool loadLibrary( QString libraryName, bool detectVersion, QString version = "" ); // Uses Baulk Control as required version by default + //! Uses Baulk Control as required version by default + bool loadLibrary( QString libraryName, bool detectVersion, QString version = "" ); - // Less Restrictive Symbol Resolver, provided for convenience, be careful using it + //! Less Restrictive Symbol Resolver, provided for convenience, be careful using it void *lrResolve( QString symbol ); - // Returns a list of loadable libraries in the preferred library directory + //! Returns a list of loadable libraries in the preferred library directory QStringList loadableLibraries(); - // BaulkControl Simplified Loaders + //! BaulkControl Simplified Loaders BaulkWidget *loadBaulkWidget( QString symbolBase, BaulkWidget *parent = 0 ); QAction *loadQAction( QString symbolBase, BaulkWidget *parent = 0 ); QObject *loadQObject( QString symbolBase, BaulkWidget *parent = 0 ); - // Widget Name + //! Widget Name QString widgetName() const; private: diff --git a/src/Server/client.h b/src/Server/client.h index dfdef51..1ce3fc6 100644 --- a/src/Server/client.h +++ b/src/Server/client.h @@ -26,28 +26,38 @@ #include "packet.h" -/** - * @author Jacob Alexander (HaaTa) - * - * Responsible for Communicating with the InformationServer - * +//! Responsible for Communicating with the InformationServer +/*! * Provides an interface for sending/recieving information to/from - * different instances of Baulk. + * different instances of Baulk. */ class InformationClient : public QObject { Q_OBJECT public: + //! Default Constructor + /*! + * Important parameters + * \param call Server Name to connect to + * \param informDaemonOnClose Send a signal to the Server on client exit + */ InformationClient( QString call, bool informDaemonOnClose = true, QObject *parent = 0 ); + + //! Destructor ~InformationClient(); + //! Attempt to instanciate connection to server void connectToServer(); + //! Request client ID from server void requestId(); + //! Client ID assigned by the server int id() const { return currentId; } public slots: + //! Called when data is sent from the server to client void incomingData(); + //! Attempt to start a new server void requestStartNewHostInstance(); private: @@ -63,10 +73,13 @@ private: QString errorName() const { return tr("InformationClient"); } void clientRequest(); + //! Sets the new client ID void newId( int newId ); + //! Sends data to server void outgoingData( QString data ); signals: + //! Signaled if the client ID has changed void idChanged(); }; diff --git a/src/Server/main.cpp b/src/Server/main.cpp index a474ae2..7e7db0f 100644 --- a/src/Server/main.cpp +++ b/src/Server/main.cpp @@ -21,11 +21,8 @@ #include "server.h" -/** - * @author Jacob Alexander (HaaTa) - * - * Baulk Server Daemon - * +//! Baulk Server Daemon +/*! * Executable for instanciating the Daemon. * Uses the message handler to enable Message Output formatting. */ diff --git a/src/Server/packet.h b/src/Server/packet.h index 2cbbea9..2df5f5a 100644 --- a/src/Server/packet.h +++ b/src/Server/packet.h @@ -23,11 +23,8 @@ #include #include -/** - * @author Jacob Alexander (HaaTa) - * - * Encodes/Decodes BaulkPackets for use with InformationServer. - * +//! Encodes/Decodes BaulkPackets for use with InformationServer. +/*! * Packet Details: * * - TO:"destination ID"|FROM:"source ID"|"data flag":"data" @@ -56,20 +53,23 @@ class Packet : public QObject { Q_OBJECT public: - // Decode Packet Constructor + //! Decode Packet Constructor Packet( QString packet, QObject *parent = 0 ); - // Encode Packet Constructor - // - Note: Each String of data MUST be accompanied with a dataFlag string + //! Encode Packet Constructor + /*! - Note: Each String of data MUST be accompanied with a dataFlag string + */ Packet( QString destinationId, QString senderId, QStringList dataFlags = QStringList(), QStringList data = QStringList(), QObject *parent = 0 ); - // Id Conversion + //! Id Conversion struct struct PacketIdInformation { int screenId; int windowId; }; + //! Converts client ID to PacketInformation static PacketIdInformation idToInfo( QString id ); + //! Converts PacketInformation to client ID static QString infoToId( int screenId, int windowId ); @@ -108,6 +108,7 @@ public: encode(); } + //! Encode data to be sent void setEncode( QString destinationId, QString senderId, QStringList dataFlags, QStringList data ) { QList success; success << destinationIdSanityStore( destinationId ) @@ -140,7 +141,7 @@ private: QString errorName() const { return tr("Packet"); } - // Called on encode/decode failure + //! Called on encode/decode failure void debugOutput(); void decode(); diff --git a/src/Server/server.h b/src/Server/server.h index ab65d9e..bf4ca8c 100644 --- a/src/Server/server.h +++ b/src/Server/server.h @@ -33,24 +33,29 @@ #include "client.h" #include "packet.h" +//! Responsible for Passing information between GUI instances of Baulk. /** - * @author Jacob Alexander (HaaTa) - * - * Responsible for Passing information between GUI instances of Baulk. - * * The server takes data thrown at it and passes it to the designated client. */ class InformationServer : public QObject { Q_OBJECT public: + //! Default Constructor + /*! + * One important parameter + * \param listen Server name that clients listen for + */ InformationServer( QString listen, QObject *parent = 0 ); + //! Destructor ~InformationServer(); QLocalServer *serverOpen() const { return server; } + //! Close Server bool terminate(); + //! Command line arguments for executable bool processCommandArgs(); private: @@ -58,6 +63,7 @@ private: int connectedClients; + //! Packet incoming from client Packet *incomingPacket; QLocalServer *server; @@ -68,6 +74,7 @@ private: QVector clientList; QList emptyClientListEntries; + //! Log name for log information QString errorName() const { return tr("InformationServer"); } void clientRedirect(); @@ -76,7 +83,9 @@ private: void serverRequest(); private slots: + //! Called on a connection from a client void connection(); + //! Called when data is sent to the server void incomingData(); signals: diff --git a/src/Widgets/BaulkStatus/baulkstatus.h b/src/Widgets/BaulkStatus/baulkstatus.h index 3fd1274..fb9a8d9 100644 --- a/src/Widgets/BaulkStatus/baulkstatus.h +++ b/src/Widgets/BaulkStatus/baulkstatus.h @@ -23,11 +23,8 @@ #include -/** - * @author Jacob Alexander (HaaTa) - * - * Console Output Viewer for Baulk - * +//! Console Output Viewer for Baulk +/*! * Provides information to the user on running information of Baulk Control * and the window instance that houses it. */ @@ -35,14 +32,17 @@ class BaulkStatus : public BaulkWidget { Q_OBJECT public: + //! Default Constructor BaulkStatus( BaulkWidget *parent = 0 ); private: + //! Current log QStringList current; QTextBrowser *messageBrowser; private slots: + //! Updates log (ie. adds to it) void updateMsgLog( QStringList msgLogs ); }; diff --git a/src/Widgets/BaulkStatus/wrapper_baulkstatus.h b/src/Widgets/BaulkStatus/wrapper_baulkstatus.h index fc51d00..b9c3ba9 100644 --- a/src/Widgets/BaulkStatus/wrapper_baulkstatus.h +++ b/src/Widgets/BaulkStatus/wrapper_baulkstatus.h @@ -31,12 +31,8 @@ #include "baulkstatus.h" -/** - * @author Jacob Alexander (HaaTa) - * - * DLL Wrapper for Baulk Status - */ // Exported Symbols ******************************************************************************* +//! DLL Wrapper for Baulk Status extern "C" EXPORTDLL { QStringList symbolList(); diff --git a/src/Widgets/BaulkSwallow/baulkswallow.h b/src/Widgets/BaulkSwallow/baulkswallow.h index d0d27e5..75bcc5d 100644 --- a/src/Widgets/BaulkSwallow/baulkswallow.h +++ b/src/Widgets/BaulkSwallow/baulkswallow.h @@ -2,12 +2,6 @@ // // Baulk - Copyright (C) 2008 - Jacob Alexander // -// File: baulkswallow.h -// Author(s): Jacob Alexander (HaaTa) -// -// Description: -// Allows the user to embed/swallow any X11 application as a Widget -// // Baulk is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or @@ -32,10 +26,12 @@ #include +//! Allows the user to embed/swallow any X11 application as a Widget class BaulkSwallow : public BaulkWidget { Q_OBJECT public: + //! Default Constructor BaulkSwallow( BaulkWidget *parent = 0 ); private: diff --git a/src/Widgets/BaulkSwallow/wrapper_baulkswallow.h b/src/Widgets/BaulkSwallow/wrapper_baulkswallow.h index 9ec54db..54e7271 100644 --- a/src/Widgets/BaulkSwallow/wrapper_baulkswallow.h +++ b/src/Widgets/BaulkSwallow/wrapper_baulkswallow.h @@ -2,12 +2,6 @@ // // Baulk - Copyright (C) 2008 - Jacob Alexander // -// File: wrapper_baulkswallow.h -// Author(s): Jacob Alexander (HaaTa) -// -// Description: -// DLL Wrapper for Baulk Swallow -// // Baulk is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or @@ -38,6 +32,7 @@ #include "baulkswallow.h" // Exported Symbols ******************************************************************************* +//! DLL Wrapper for Baulk Swallow extern "C" EXPORTDLL { QStringList symbolList(); diff --git a/src/Widgets/BaulkTerm/qtermwidget/BlockArray.cpp b/src/Widgets/BaulkTerm/qtermwidget/BlockArray.cpp index 39ef499..f8a4f41 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/BlockArray.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/BlockArray.cpp @@ -1,25 +1,21 @@ -/* - This file is part of Konsole, an X terminal. - Copyright (C) 2000 by Stephan Kulow - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. - -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 2000 by Stephan Kulow +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "BlockArray.h" diff --git a/src/Widgets/BaulkTerm/qtermwidget/BlockArray.h b/src/Widgets/BaulkTerm/qtermwidget/BlockArray.h index ca47388..9240ada 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/BlockArray.h +++ b/src/Widgets/BaulkTerm/qtermwidget/BlockArray.h @@ -1,24 +1,21 @@ -/* - This file is part of Konsole, an X terminal. - Copyright (C) 2000 by Stephan Kulow - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 2000 by Stephan Kulow +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef BLOCKARRAY_H #define BLOCKARRAY_H @@ -39,11 +36,11 @@ struct Block { size_t size; }; -// /////////////////////////////////////////////////////// + class BlockArray { public: - /** + /*! * Creates a history file for holding * maximal size blocks. If more blocks * are requested, then it drops earlier @@ -51,10 +48,10 @@ public: */ BlockArray(); - /// destructor + //! destructor ~BlockArray(); - /** + /*! * adds the Block at the end of history. * This may drop other blocks. * @@ -67,7 +64,7 @@ public: */ size_t append(Block *block); - /** + /*! * gets the block at the index. Function may return * 0 if the block isn't available any more. * @@ -77,7 +74,7 @@ public: */ const Block *at(size_t index); - /** + /*! * reorders blocks as needed. If newsize is null, * the history is emptied completely. The indices * returned on append won't change their semantic, @@ -89,7 +86,7 @@ public: Block *lastBlock() const; - /** + /*! * Convenient function to set the size in KBytes * instead of blocks */ @@ -107,7 +104,7 @@ private: void decreaseBuffer(size_t newsize); size_t size; - // current always shows to the last inserted block + //! current always shows to the last inserted block size_t current; size_t index; diff --git a/src/Widgets/BaulkTerm/qtermwidget/Character.h b/src/Widgets/BaulkTerm/qtermwidget/Character.h index 0978ce5..2ea14f9 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Character.h +++ b/src/Widgets/BaulkTerm/qtermwidget/Character.h @@ -1,26 +1,21 @@ -/* - This file is part of Konsole, KDE's terminal. - - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 2000 by Stephan Kulow +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef CHARACTER_H #define CHARACTER_H @@ -50,7 +45,7 @@ static const int LINE_DOUBLEHEIGHT = (1 << 2); #define RE_CURSOR (1 << 4) #define RE_EXTENDED_CHAR (1 << 5) -/** +/*! * A single character in the terminal which consists of a unicode character * value, foreground and background colors and a set of rendition attributes * which specify how it should be drawn. @@ -58,7 +53,7 @@ static const int LINE_DOUBLEHEIGHT = (1 << 2); class Character { public: - /** + /*! * Constructs a new character. * * @param _c The unicode character value of this character. @@ -74,9 +69,9 @@ public: union { - /** The unicode character value for this character. */ + /*! The unicode character value for this character. */ quint16 character; - /** + /*! * Experimental addition which allows a single Character instance to contain more than * one unicode character. * @@ -86,32 +81,32 @@ public: quint16 charSequence; }; - /** A combination of RENDITION flags which specify options for drawing the character. */ + /*! A combination of RENDITION flags which specify options for drawing the character. */ quint8 rendition; - /** The foreground color used to draw this character. */ + /*! The foreground color used to draw this character. */ CharacterColor foregroundColor; - /** The color used to draw this character's background. */ + /*! The color used to draw this character's background. */ CharacterColor backgroundColor; - /** + /*! * Returns true if this character has a transparent background when * it is drawn with the specified @p palette. */ bool isTransparent(const ColorEntry* palette) const; - /** + /*! * Returns true if this character should always be drawn in bold when * it is drawn with the specified @p palette, independent of whether * or not the character has the RE_BOLD rendition flag. */ bool isBold(const ColorEntry* base) const; - /** + /*! * Compares two characters and returns true if they have the same unicode character value, * rendition and colors. */ friend bool operator == (const Character& a, const Character& b); - /** + /*! * Compares two characters and returns true if they have different unicode character values, * renditions or colors. */ @@ -153,7 +148,7 @@ inline bool Character::isBold(const ColorEntry* base) const extern unsigned short vt100_graphics[32]; -/** +/*! * A table which stores sequences of unicode characters, referenced * by hash keys. The hash key itself is the same size as a unicode * character ( ushort ) so that it can occupy the same space in @@ -162,11 +157,11 @@ extern unsigned short vt100_graphics[32]; class ExtendedCharTable { public: - /** Constructs a new character table. */ + /*! Constructs a new character table. */ ExtendedCharTable(); ~ExtendedCharTable(); - /** + /*! * Adds a sequences of unicode characters to the table and returns * a hash code which can be used later to look up the sequence * using lookupExtendedChar() @@ -178,7 +173,7 @@ public: * @param length Length of @p unicodePoints */ ushort createExtendedChar(ushort* unicodePoints , ushort length); - /** + /*! * Looks up and returns a pointer to a sequence of unicode characters * which was added to the table using createExtendedChar(). * @@ -190,17 +185,17 @@ public: */ ushort* lookupExtendedChar(ushort hash , ushort& length) const; - /** The global ExtendedCharTable instance. */ + /*! The global ExtendedCharTable instance. */ static ExtendedCharTable instance; private: - // calculates the hash key of a sequence of unicode points of size 'length' + //! calculates the hash key of a sequence of unicode points of size 'length' ushort extendedCharHash(ushort* unicodePoints , ushort length) const; - // tests whether the entry in the table specified by 'hash' matches the - // character sequence 'unicodePoints' of size 'length' + //! tests whether the entry in the table specified by 'hash' matches the + //! character sequence 'unicodePoints' of size 'length' bool extendedCharMatch(ushort hash , ushort* unicodePoints , ushort length) const; - // internal, maps hash keys to character sequence buffers. The first ushort - // in each value is the length of the buffer, followed by the ushorts in the buffer - // themselves. + //! internal, maps hash keys to character sequence buffers. The first ushort + //! in each value is the length of the buffer, followed by the ushorts in the buffer + //! themselves. QHash extendedCharTable; }; diff --git a/src/Widgets/BaulkTerm/qtermwidget/CharacterColor.h b/src/Widgets/BaulkTerm/qtermwidget/CharacterColor.h index 1b86674..c6ece50 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/CharacterColor.h +++ b/src/Widgets/BaulkTerm/qtermwidget/CharacterColor.h @@ -1,26 +1,21 @@ -/* - This file is part of Konsole, KDE's terminal. - - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 2000 by Stephan Kulow +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef CHARACTERCOLOR_H #define CHARACTERCOLOR_H @@ -31,7 +26,7 @@ namespace Konsole { -/** +/*! * An entry in a terminal display's color palette. * * A color palette is an array of 16 ColorEntry instances which map @@ -47,7 +42,7 @@ namespace Konsole class ColorEntry { public: - /** + /*! * Constructs a new color palette entry. * * @param c The color value for this entry. @@ -56,13 +51,13 @@ public: */ ColorEntry(QColor c, bool tr, bool b) : color(c), transparent(tr), bold(b) {} - /** + /*! * Constructs a new color palette entry with an undefined color, and * with the transparent and bold flags set to false. */ ColorEntry() : transparent(false), bold(false) {} - /** + /*! * Sets the color, transparency and boldness of this color to those of @p rhs. */ void operator=(const ColorEntry& rhs) @@ -72,15 +67,15 @@ public: bold = rhs.bold; } - /** The color value of this entry for display. */ + /*! The color value of this entry for display. */ QColor color; - /** + /*! * If true character backgrounds using this color should be transparent. * This is not applicable when the color is used to render text. */ bool transparent; - /** + /*! * If true characters drawn using this color should be bold. * This is not applicable when the color is used to draw a character's background. */ @@ -144,7 +139,7 @@ static const ColorEntry base_color_table[TABLE_COLORS] = #define COLOR_SPACE_256 3 #define COLOR_SPACE_RGB 4 -/** +/*! * Describes the color of a single character in the terminal. */ class CharacterColor @@ -152,7 +147,7 @@ class CharacterColor friend class Character; public: - /** Constructs a new CharacterColor whoose color and color space are undefined. */ + /*! Constructs a new CharacterColor whoose color and color space are undefined. */ CharacterColor() : _colorSpace(COLOR_SPACE_UNDEFINED), _u(0), @@ -160,7 +155,7 @@ public: _w(0) {} - /** + /*! * Constructs a new CharacterColor using the specified @p colorSpace and with * color value @p co * @@ -198,7 +193,7 @@ public: } } - /** + /*! * Returns true if this character color entry is valid. */ bool isValid() @@ -206,7 +201,7 @@ public: return _colorSpace != COLOR_SPACE_UNDEFINED; } - /** + /*! * Toggles the value of this color between a normal system color and the corresponding intensive * system color. * @@ -215,7 +210,7 @@ public: */ void toggleIntensive(); - /** + /*! * Returns the color within the specified color @palette * * The @p palette is only used if this color is one of the 16 system colors, otherwise @@ -223,12 +218,12 @@ public: */ QColor color(const ColorEntry* palette) const; - /** + /*! * Compares two colors and returns true if they represent the same color value and * use the same color space. */ friend bool operator == (const CharacterColor& a, const CharacterColor& b); - /** + /*! * Compares two colors and returns true if they represent different color values * or use different color spaces. */ @@ -257,16 +252,16 @@ inline bool operator != (const CharacterColor& a, const CharacterColor& b) inline const QColor color256(quint8 u, const ColorEntry* base) { - // 0.. 16: system colors + //! 0.. 16: system colors if (u < 8) return base[u+2 ].color; u -= 8; if (u < 8) return base[u+2+BASE_COLORS].color; u -= 8; - // 16..231: 6x6x6 rgb color cube + //! 16..231: 6x6x6 rgb color cube if (u < 216) return QColor(255*((u/36)%6)/5, 255*((u/ 6)%6)/5, 255*((u/ 1)%6)/5); u -= 216; - // 232..255: gray, leaving out black and white + //! 232..255: gray, leaving out black and white int gray = u*10+8; return QColor(gray,gray,gray); } diff --git a/src/Widgets/BaulkTerm/qtermwidget/ColorTables.h b/src/Widgets/BaulkTerm/qtermwidget/ColorTables.h index a3331cd..300e1ef 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/ColorTables.h +++ b/src/Widgets/BaulkTerm/qtermwidget/ColorTables.h @@ -1,3 +1,20 @@ +// e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + + #ifndef _COLOR_TABLE_H #define _COLOR_TABLE_H diff --git a/src/Widgets/BaulkTerm/qtermwidget/Emulation.cpp b/src/Widgets/BaulkTerm/qtermwidget/Emulation.cpp index e767a42..41225fd 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Emulation.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/Emulation.cpp @@ -1,27 +1,24 @@ -/* - This file is part of Konsole, an X terminal. - - Copyright (C) 2007 Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - Copyright (C) 1996 by Matthias Ettrich - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// +// Copyright (C) 2007 Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// Copyright (C) 1996 by Matthias Ettrich +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "Emulation.h" @@ -192,16 +189,12 @@ QString Emulation::keyBindings() // Interpreting Codes --------------------------------------------------------- -/* +/*! This section deals with decoding the incoming character stream. Decoding means here, that the stream is first separated into `tokens' which are then mapped to a `meaning' provided as operations by the `Screen' class. */ - -/*! -*/ - void Emulation::receiveChar(int c) // process application unicode input to terminal // this is a trivial scanner @@ -254,11 +247,10 @@ void Emulation::sendMouseEvent(int /*buttons*/, int /*column*/, int /*row*/, int // Unblocking, Byte to Unicode translation --------------------------------- -- -/* +/*! We are doing code conversion from locale to unicode first. TODO: Character composition from the old code. See #96536 */ - void Emulation::receiveData(const char* text, int length) { emit stateSet(NOTIFYACTIVITY); diff --git a/src/Widgets/BaulkTerm/qtermwidget/Emulation.h b/src/Widgets/BaulkTerm/qtermwidget/Emulation.h index 2782df7..668e082 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Emulation.h +++ b/src/Widgets/BaulkTerm/qtermwidget/Emulation.h @@ -1,28 +1,26 @@ -/* - This file is part of Konsole, an X terminal. - - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// +// Copyright (C) 2007 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef EMULATION_H + #define EMULATION_H // System @@ -45,7 +43,7 @@ class Screen; class ScreenWindow; class TerminalCharacterDecoder; -/** +/*! * This enum describes the available states which * the terminal emulation may be set to. * @@ -53,14 +51,14 @@ class TerminalCharacterDecoder; */ enum { - /** The emulation is currently receiving user input. */ + /*! The emulation is currently receiving user input. */ NOTIFYNORMAL=0, - /** + /*! * The terminal program has triggered a bell event * to get the user's attention. */ NOTIFYBELL=1, - /** + /*! * The emulation is currently receiving data from its * terminal input. */ @@ -70,7 +68,7 @@ enum NOTIFYSILENCE=3 }; -/** +/*! * Base class for terminal emulation back-ends. * * The back-end is responsible for decoding an incoming character stream and @@ -125,27 +123,27 @@ Q_OBJECT public: - /** Constructs a new terminal emulation */ + /*! Constructs a new terminal emulation */ Emulation(); ~Emulation(); - /** + /*! * Creates a new window onto the output from this emulation. The contents * of the window are then rendered by views which are set to use this window using the * TerminalDisplay::setScreenWindow() method. */ ScreenWindow* createWindow(); - /** Returns the size of the screen image which the emulation produces */ + /*! Returns the size of the screen image which the emulation produces */ QSize imageSize(); - /** + /*! * Returns the total number of lines, including those stored in the history. */ int lineCount(); - /** + /*! * Sets the history store used by this emulation. When new lines * are added to the output, older lines at the top of the screen are transferred to a history * store. @@ -154,12 +152,12 @@ public: * type of store. */ void setHistory(const HistoryType&); - /** Returns the history store used by this emulation. See setHistory() */ + /*! Returns the history store used by this emulation. See setHistory() */ const HistoryType& history(); - /** Clears the history scroll. */ + /*! Clears the history scroll. */ void clearHistory(); - /** + /*! * Copies the output history from @p startLine to @p endLine * into @p stream, using @p decoder to convert the terminal * characters into text. @@ -172,12 +170,12 @@ public: virtual void writeToStream(TerminalCharacterDecoder* decoder,int startLine,int endLine); - /** Returns the codec used to decode incoming characters. See setCodec() */ + /*! Returns the codec used to decode incoming characters. See setCodec() */ const QTextCodec* codec() { return _codec; } - /** Sets the codec used to decode incoming characters. */ + /*! Sets the codec used to decode incoming characters. */ void setCodec(const QTextCodec*); - /** + /*! * Convenience method. * Returns true if the current codec used to decode incoming * characters is UTF-8 @@ -185,30 +183,30 @@ public: bool utf8() { Q_ASSERT(_codec); return _codec->mibEnum() == 106; } - /** TODO Document me */ + /*! TODO Document me */ virtual char getErase() const; - /** + /*! * Sets the key bindings used to key events * ( received through sendKeyEvent() ) into character * streams to send to the terminal. */ void setKeyBindings(const QString& name); - /** + /*! * Returns the name of the emulation's current key bindings. * See setKeyBindings() */ QString keyBindings(); - /** + /*! * Copies the current image into the history and clears the screen. */ virtual void clearEntireScreen() =0; - /** Resets the state of the terminal. */ + /*! Resets the state of the terminal. */ virtual void reset() =0; - /** + /*! * Returns true if the active terminal program wants * mouse input events. * @@ -219,28 +217,28 @@ public: public slots: - /** Change the size of the emulation's image */ + /*! Change the size of the emulation's image */ virtual void setImageSize(int lines, int columns); - /** + /*! * Interprets a sequence of characters and sends the result to the terminal. * This is equivalent to calling sendKeyEvent() for each character in @p text in succession. */ virtual void sendText(const QString& text) = 0; - /** + /*! * Interprets a key press event and emits the sendData() signal with * the resulting character stream. */ virtual void sendKeyEvent(QKeyEvent*); - /** + /*! * Converts information about a mouse event into an xterm-compatible escape * sequence and emits the character sequence via sendData() */ virtual void sendMouseEvent(int buttons, int column, int line, int eventType); - /** + /*! * Sends a string of characters to the foreground terminal process. * * @param string The characters to send. @@ -249,7 +247,7 @@ public slots: */ virtual void sendString(const char* string, int length = -1) = 0; - /** + /*! * Processes an incoming stream of characters. receiveData() decodes the incoming * character buffer using the current codec(), and then calls receiveChar() for * each unicode character in the resulting buffer. @@ -265,7 +263,7 @@ public slots: signals: - /** + /*! * Emitted when a buffer of data is ready to send to the * standard input of the terminal. * @@ -274,7 +272,7 @@ signals: */ void sendData(const char* data,int len); - /** + /*! * Requests that sending of input to the emulation * from the terminal process be suspended or resumed. * @@ -285,7 +283,7 @@ signals: */ void lockPtyRequest(bool suspend); - /** + /*! * Requests that the pty used by the terminal process * be set to UTF 8 mode. * @@ -293,7 +291,7 @@ signals: */ void useUtf8Request(bool); - /** + /*! * Emitted when the activity state of the emulation is set. * * @param state The new activity state, one of NOTIFYNORMAL, NOTIFYACTIVITY @@ -301,11 +299,11 @@ signals: */ void stateSet(int state); - /** TODO Document me */ + /*! TODO Document me */ void zmodemDetected(); - /** + /*! * Requests that the color of the text used * to represent the tabs associated with this * emulation be changed. This is a Konsole-specific @@ -315,7 +313,7 @@ signals: */ void changeTabTextColorRequest(int color); - /** + /*! * This is emitted when the program running in the shell indicates whether or * not it is interested in mouse events. * @@ -324,7 +322,7 @@ signals: */ void programUsesMouseChanged(bool usesMouse); - /** + /*! * Emitted when the contents of the screen image change. * The emulation buffers the updates from successive image changes, * and only emits outputChanged() at sensible intervals when @@ -338,7 +336,7 @@ signals: */ void outputChanged(); - /** + /*! * Emitted when the program running in the terminal wishes to update the * session's title. This also allows terminal programs to customize other * aspects of the terminal emulation display. @@ -372,13 +370,13 @@ signals: void titleChanged(int title,const QString& newTitle); - /** + /*! * Emitted when the program running in the terminal changes the * screen size. */ void imageSizeChanged(int lineCount , int columnCount); - /** + /*! * Emitted when the terminal program requests to change various properties * of the terminal display. * @@ -395,13 +393,13 @@ protected: virtual void setMode (int mode) = 0; virtual void resetMode(int mode) = 0; - /** + /*! * Processes an incoming character. See receiveData() * @p ch A unicode character code. */ virtual void receiveChar(int ch); - /** + /*! * Sets the active screen. The terminal has two screens, primary and alternate. * The primary screen is used by default. When certain interactive programs such * as Vim are run, they trigger a switch to the alternate screen. @@ -437,7 +435,7 @@ protected: const KeyboardTranslator* _keyTranslator; // the keyboard layout protected slots: - /** + /*! * Schedules an update of attached views. * Repeated calls to bufferedUpdate() in close succession will result in only a single update, * much like the Qt buffered update of widgets. @@ -463,3 +461,4 @@ private: } #endif // ifndef EMULATION_H + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Filter.cpp b/src/Widgets/BaulkTerm/qtermwidget/Filter.cpp index c3f4919..f063c74 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Filter.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/Filter.cpp @@ -1,23 +1,20 @@ -/* - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "Filter.h" @@ -560,3 +557,4 @@ QList UrlFilter::HotSpot::actions() } //#include "moc_Filter.cpp" + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Filter.h b/src/Widgets/BaulkTerm/qtermwidget/Filter.h index 06ea5e3..72d1b24 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Filter.h +++ b/src/Widgets/BaulkTerm/qtermwidget/Filter.h @@ -1,23 +1,20 @@ -/* - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef FILTER_H #define FILTER_H @@ -36,7 +33,7 @@ namespace Konsole { -/** +/*! * A filter processes blocks of text looking for certain patterns (such as URLs or keywords from a list) * and marks the areas which match the filter's patterns as 'hotspots'. * @@ -57,7 +54,7 @@ namespace Konsole class Filter { public: - /** + /*! * Represents an area of text which matched the pattern a particular filter has been looking for. * * Each hotspot has a type identifier associated with it ( such as a link or a highlighted section ), @@ -72,7 +69,7 @@ public: class HotSpot { public: - /** + /*! * Constructs a new hotspot which covers the area from (@p startLine,@p startColumn) to (@p endLine,@p endColumn) * in a block of text. */ @@ -89,20 +86,20 @@ public: Marker }; - /** Returns the line when the hotspot area starts */ + /*! Returns the line when the hotspot area starts */ int startLine() const; - /** Returns the line where the hotspot area ends */ + /*! Returns the line where the hotspot area ends */ int endLine() const; - /** Returns the column on startLine() where the hotspot area starts */ + /*! Returns the column on startLine() where the hotspot area starts */ int startColumn() const; - /** Returns the column on endLine() where the hotspot area ends */ + /*! Returns the column on endLine() where the hotspot area ends */ int endColumn() const; - /** + /*! * Returns the type of the hotspot. This is usually used as a hint for views on how to represent * the hotspot graphically. eg. Link hotspots are typically underlined when the user mouses over them */ Type type() const; - /** + /*! * Causes the an action associated with a hotspot to be triggered. * * @param object The object which caused the hotspot to be triggered. This is @@ -111,13 +108,13 @@ public: * action should be performed. */ virtual void activate(QObject* object = 0) = 0; - /** + /*! * Returns a list of actions associated with the hotspot which can be used in a * menu or toolbar */ virtual QList actions(); - /** + /*! * Returns the text of a tooltip to be shown when the mouse moves over the hotspot, or * an empty string if there is no tooltip associated with this hotspot. * @@ -126,7 +123,7 @@ public: virtual QString tooltip() const; protected: - /** Sets the type of a hotspot. This should only be set once */ + /*! Sets the type of a hotspot. This should only be set once */ void setType(Type type); private: @@ -138,42 +135,42 @@ public: }; - /** Constructs a new filter. */ + /*! Constructs a new filter. */ Filter(); virtual ~Filter(); - /** Causes the filter to process the block of text currently in its internal buffer */ + /*! Causes the filter to process the block of text currently in its internal buffer */ virtual void process() = 0; - /** + /*! * Empties the filters internal buffer and resets the line count back to 0. * All hotspots are deleted. */ void reset(); - /** Adds a new line of text to the filter and increments the line count */ + /*! Adds a new line of text to the filter and increments the line count */ //void addLine(const QString& string); - /** Returns the hotspot which covers the given @p line and @p column, or 0 if no hotspot covers that area */ + /*! Returns the hotspot which covers the given @p line and @p column, or 0 if no hotspot covers that area */ HotSpot* hotSpotAt(int line , int column) const; - /** Returns the list of hotspots identified by the filter */ + /*! Returns the list of hotspots identified by the filter */ QList hotSpots() const; - /** Returns the list of hotspots identified by the filter which occur on a given line */ + /*! Returns the list of hotspots identified by the filter which occur on a given line */ QList hotSpotsAtLine(int line) const; - /** + /*! * TODO: Document me */ void setBuffer(const QString* buffer , const QList* linePositions); protected: - /** Adds a new hotspot to the list */ + /*! Adds a new hotspot to the list */ void addHotSpot(HotSpot*); - /** Returns the internal buffer */ + /*! Returns the internal buffer */ const QString* buffer(); - /** Converts a character position within buffer() to a line and column */ + /*! Converts a character position within buffer() to a line and column */ void getLineColumn(int position , int& startLine , int& startColumn); private: @@ -184,7 +181,7 @@ private: const QString* _buffer; }; -/** +/*! * A filter which searches for sections of text matching a regular expression and creates a new RegExpFilter::HotSpot * instance for them. * @@ -194,7 +191,7 @@ private: class RegExpFilter : public Filter { public: - /** + /*! * Type of hotspot created by RegExpFilter. The capturedTexts() method can be used to find the text * matched by the filter's regular expression. */ @@ -204,28 +201,28 @@ public: HotSpot(int startLine, int startColumn, int endLine , int endColumn); virtual void activate(QObject* object = 0); - /** Sets the captured texts associated with this hotspot */ + /*! Sets the captured texts associated with this hotspot */ void setCapturedTexts(const QStringList& texts); - /** Returns the texts found by the filter when matching the filter's regular expression */ + /*! Returns the texts found by the filter when matching the filter's regular expression */ QStringList capturedTexts() const; private: QStringList _capturedTexts; }; - /** Constructs a new regular expression filter */ + /*! Constructs a new regular expression filter */ RegExpFilter(); - /** + /*! * Sets the regular expression which the filter searches for in blocks of text. * * Regular expressions which match the empty string are treated as not matching * anything. */ void setRegExp(const QRegExp& text); - /** Returns the regular expression which the filter searches for in blocks of text */ + /*! Returns the regular expression which the filter searches for in blocks of text */ QRegExp regExp() const; - /** + /*! * Reimplemented to search the filter's text buffer for text matching regExp() * * If regexp matches the empty string, then process() will return immediately @@ -234,7 +231,7 @@ public: virtual void process(); protected: - /** + /*! * Called when a match for the regular expression is encountered. Subclasses should reimplement this * to return custom hotspot types */ @@ -247,11 +244,11 @@ private: class FilterObject; -/** A filter which matches URLs in blocks of text */ +/*! A filter which matches URLs in blocks of text */ class UrlFilter : public RegExpFilter { public: - /** + /*! * Hotspot type created by UrlFilter instances. The activate() method opens a web browser * at the given URL when called. */ @@ -263,7 +260,7 @@ public: virtual QList actions(); - /** + /*! * Open a web browser at the current URL. The url itself can be determined using * the capturedTexts() method. */ @@ -307,7 +304,7 @@ private: Filter::HotSpot* _filter; }; -/** +/*! * A chain which allows a group of filters to be processed as one. * The chain owns the filters added to it and deletes them when the chain itself is destroyed. * @@ -329,42 +326,42 @@ class FilterChain : protected QList public: virtual ~FilterChain(); - /** Adds a new filter to the chain. The chain will delete this filter when it is destroyed */ + /*! Adds a new filter to the chain. The chain will delete this filter when it is destroyed */ void addFilter(Filter* filter); - /** Removes a filter from the chain. The chain will no longer delete the filter when destroyed */ + /*! Removes a filter from the chain. The chain will no longer delete the filter when destroyed */ void removeFilter(Filter* filter); - /** Returns true if the chain contains @p filter */ + /*! Returns true if the chain contains @p filter */ bool containsFilter(Filter* filter); - /** Removes all filters from the chain */ + /*! Removes all filters from the chain */ void clear(); - /** Resets each filter in the chain */ + /*! Resets each filter in the chain */ void reset(); - /** + /*! * Processes each filter in the chain */ void process(); - /** Sets the buffer for each filter in the chain to process. */ + /*! Sets the buffer for each filter in the chain to process. */ void setBuffer(const QString* buffer , const QList* linePositions); - /** Returns the first hotspot which occurs at @p line, @p column or 0 if no hotspot was found */ + /*! Returns the first hotspot which occurs at @p line, @p column or 0 if no hotspot was found */ Filter::HotSpot* hotSpotAt(int line , int column) const; - /** Returns a list of all the hotspots in all the chain's filters */ + /*! Returns a list of all the hotspots in all the chain's filters */ QList hotSpots() const; - /** Returns a list of all hotspots at the given line in all the chain's filters */ + /*! Returns a list of all hotspots at the given line in all the chain's filters */ QList hotSpotsAtLine(int line) const; }; -/** A filter chain which processes character images from terminal displays */ +/*! A filter chain which processes character images from terminal displays */ class TerminalImageFilterChain : public FilterChain { public: TerminalImageFilterChain(); virtual ~TerminalImageFilterChain(); - /** + /*! * Set the current terminal image to @p image. * * @param image The terminal image diff --git a/src/Widgets/BaulkTerm/qtermwidget/History.cpp b/src/Widgets/BaulkTerm/qtermwidget/History.cpp index 1e3d721..8ca41f0 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/History.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/History.cpp @@ -1,24 +1,21 @@ -/* - This file is part of Konsole, an X terminal. - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "History.h" @@ -39,7 +36,7 @@ using namespace Konsole; -/* +/*! An arbitrary long scroll. One can modify the scroll only by adding either cells @@ -79,10 +76,9 @@ FIXME: There is noticeable decrease in speed, also. Perhaps, // History File /////////////////////////////////////////// -/* +/*! A Row(X) data type which allows adding elements to the end. */ - HistoryFile::HistoryFile() : ion(-1), length(0), @@ -198,7 +194,7 @@ bool HistoryScroll::hasScroll() // History Scroll File ////////////////////////////////////// -/* +/*! The history scroll makes a Row(Row(Cell)) from two history buffers. The index buffer contains start of line positions which refere to the cells @@ -208,7 +204,6 @@ bool HistoryScroll::hasScroll() (line #1), while the first line (line #0) starts at 0 in cells. */ - HistoryScrollFile::HistoryScrollFile(const QString &logFileName) : HistoryScroll(new HistoryTypeFile(logFileName)), m_logFileName(logFileName) @@ -696,3 +691,4 @@ int HistoryTypeFile::maximumLineCount() const { return 0; } + diff --git a/src/Widgets/BaulkTerm/qtermwidget/History.h b/src/Widgets/BaulkTerm/qtermwidget/History.h index a26a367..db30e9e 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/History.h +++ b/src/Widgets/BaulkTerm/qtermwidget/History.h @@ -1,24 +1,21 @@ -/* - This file is part of Konsole, an X terminal. - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef TEHISTORY_H #define TEHISTORY_H @@ -36,10 +33,10 @@ namespace Konsole { #if 1 -/* + +/*! An extendable tmpfile(1) based buffer. */ - class HistoryFile { public: @@ -50,11 +47,11 @@ public: virtual void get(unsigned char* bytes, int len, int loc); virtual int len(); - //mmaps the file in read-only mode + //! mmaps the file in read-only mode void map(); - //un-mmaps the file + //! un-mmaps the file void unmap(); - //returns true if the file is mmap'ed + //! returns true if the file is mmap'ed bool isMapped(); @@ -63,16 +60,16 @@ private: int length; QTemporaryFile tmpFile; - //pointer to start of mmap'ed file data, or 0 if the file is not mmap'ed + //! pointer to start of mmap'ed file data, or 0 if the file is not mmap'ed char* fileMap; - //incremented whenver 'add' is called and decremented whenever - //'get' is called. - //this is used to detect when a large number of lines are being read and processed from the history - //and automatically mmap the file for better performance (saves the overhead of many lseek-read calls). + //! incremented whenver 'add' is called and decremented whenever + //! 'get' is called. + //! this is used to detect when a large number of lines are being read and processed from the history + //! and automatically mmap the file for better performance (saves the overhead of many lseek-read calls). int readWriteBalance; - //when readWriteBalance goes below this threshold, the file will be mmap'ed automatically + //! when readWriteBalance goes below this threshold, the file will be mmap'ed automatically static const int MAP_THRESHOLD = -1000; }; #endif @@ -92,19 +89,19 @@ public: virtual bool hasScroll(); - // access to history + //! access to history virtual int getLines() = 0; virtual int getLineLen(int lineno) = 0; virtual void getCells(int lineno, int colno, int count, Character res[]) = 0; virtual bool isWrappedLine(int lineno) = 0; - // backward compatibility (obsolete) + //! backward compatibility (obsolete) Character getCell(int lineno, int colno) { Character res; getCells(lineno,colno,1,&res); return res; } - // adding lines. + //! adding lines. virtual void addCells(const Character a[], int count) = 0; - // convenience method - this is virtual so that subclasses can take advantage - // of QVector's implicit copying + //! convenience method - this is virtual so that subclasses can take advantage + //! of QVector's implicit copying virtual void addCellsVector(const QVector& cells) { addCells(cells.data(),cells.size()); @@ -263,16 +260,16 @@ public: HistoryType(); virtual ~HistoryType(); - /** + /*! * Returns true if the history is enabled ( can store lines of output ) * or false otherwise. */ virtual bool isEnabled() const = 0; - /** + /*! * Returns true if the history size is unlimited. */ bool isUnlimited() const { return maximumLineCount() == 0; } - /** + /*! * Returns the maximum number of lines which this history type * can store or 0 if the history can store an unlimited number of lines. */ @@ -342,3 +339,4 @@ protected: } #endif // TEHISTORY_H + diff --git a/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.cpp b/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.cpp index 1f7f112..684d134 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.cpp @@ -1,25 +1,22 @@ -/* - This source file was part of Konsole, a terminal emulator. - - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This source file was part of Konsole, a terminal emulator. +// +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "KeyboardTranslator.h" @@ -221,24 +218,24 @@ void KeyboardTranslatorWriter::writeEntry( const KeyboardTranslator::Entry& entr } -// each line of the keyboard translation file is one of: -// -// - keyboard "name" -// - key KeySequence : "characters" -// - key KeySequence : CommandName -// -// KeySequence begins with the name of the key ( taken from the Qt::Key enum ) -// and is followed by the keyboard modifiers and state flags ( with + or - in front -// of each modifier or flag to indicate whether it is required ). All keyboard modifiers -// and flags are optional, if a particular modifier or state is not specified it is -// assumed not to be a part of the sequence. The key sequence may contain whitespace -// -// eg: "key Up+Shift : scrollLineUp" -// "key Next-Shift : "\E[6~" -// -// (lines containing only whitespace are ignored, parseLine assumes that comments have -// already been removed) -// +//! each line of the keyboard translation file is one of: +//! +//! - keyboard "name" +//! - key KeySequence : "characters" +//! - key KeySequence : CommandName +//! +//! KeySequence begins with the name of the key ( taken from the Qt::Key enum ) +//! and is followed by the keyboard modifiers and state flags ( with + or - in front +//! of each modifier or flag to indicate whether it is required ). All keyboard modifiers +//! and flags are optional, if a particular modifier or state is not specified it is +//! assumed not to be a part of the sequence. The key sequence may contain whitespace +//! +//! eg: "key Up+Shift : scrollLineUp" +//! "key Next-Shift : "\E[6~" +//! +//! (lines containing only whitespace are ignored, parseLine assumes that comments have +//! already been removed) +//! KeyboardTranslatorReader::KeyboardTranslatorReader( QIODevice* source ) : _source(source) @@ -901,3 +898,4 @@ KeyboardTranslatorManager* KeyboardTranslatorManager::instance() { return theKeyboardTranslatorManager; } + diff --git a/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.h b/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.h index e0082ae..99df290 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.h +++ b/src/Widgets/BaulkTerm/qtermwidget/KeyboardTranslator.h @@ -1,25 +1,22 @@ -/* - This source file is part of Konsole, a terminal emulator. - - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This source file is part of Konsole, a terminal emulator. +// +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef KEYBOARDTRANSLATOR_H #define KEYBOARDTRANSLATOR_H @@ -34,7 +31,7 @@ typedef void (*CleanUpFunction)(); -/** +/*! * @internal * * Helper class for K_GLOBAL_STATIC to clean up the object on library unload or application @@ -113,7 +110,7 @@ class QTextStream; namespace Konsole { -/** +/*! * A convertor which maps between key sequences pressed by the user and the * character strings which should be sent to the terminal and commands * which should be invoked when those character sequences are pressed. @@ -129,7 +126,7 @@ namespace Konsole class KeyboardTranslator { public: - /** + /*! * The meaning of a particular key sequence may depend upon the state which * the terminal emulation is in. Therefore findEntry() may return a different * Entry depending upon the state flags supplied. @@ -139,56 +136,56 @@ public: */ enum State { - /** Indicates that no special state is active */ + /*! Indicates that no special state is active */ NoState = 0, - /** + /*! * TODO More documentation */ NewLineState = 1, - /** + /*! * Indicates that the terminal is in 'Ansi' mode. * TODO: More documentation */ AnsiState = 2, - /** + /*! * TODO More documentation */ CursorKeysState = 4, - /** + /*! * Indicates that the alternate screen ( typically used by interactive programs * such as screen or vim ) is active */ AlternateScreenState = 8, - /** Indicates that any of the modifier keys is active. */ + /*! Indicates that any of the modifier keys is active. */ AnyModifierState = 16 }; Q_DECLARE_FLAGS(States,State) - /** + /*! * This enum describes commands which are associated with particular key sequences. */ enum Command { - /** Indicates that no command is associated with this command sequence */ + /*! Indicates that no command is associated with this command sequence */ NoCommand = 0, - /** TODO Document me */ + /*! TODO Document me */ SendCommand = 1, - /** Scroll the terminal display up one page */ + /*! Scroll the terminal display up one page */ ScrollPageUpCommand = 2, - /** Scroll the terminal display down one page */ + /*! Scroll the terminal display down one page */ ScrollPageDownCommand = 4, - /** Scroll the terminal display up one line */ + /*! Scroll the terminal display up one line */ ScrollLineUpCommand = 8, - /** Scroll the terminal display down one line */ + /*! Scroll the terminal display down one line */ ScrollLineDownCommand = 16, - /** Toggles scroll lock mode */ + /*! Toggles scroll lock mode */ ScrollLockCommand = 32, - /** Echos the operating system specific erase character. */ + /*! Echos the operating system specific erase character. */ EraseCommand = 64 }; Q_DECLARE_FLAGS(Commands,Command) - /** + /*! * Represents an association between a key sequence pressed by the user * and the character sequence and commands associated with it for a particular * KeyboardTranslator. @@ -196,23 +193,23 @@ public: class Entry { public: - /** + /*! * Constructs a new entry for a keyboard translator. */ Entry(); - /** + /*! * Returns true if this entry is null. * This is true for newly constructed entries which have no properties set. */ bool isNull() const; - /** Returns the commands associated with this entry */ + /*! Returns the commands associated with this entry */ Command command() const; - /** Sets the command associated with this entry. */ + /*! Sets the command associated with this entry. */ void setCommand(Command command); - /** + /*! * Returns the character sequence associated with this entry, optionally replacing * wildcard '*' characters with numbers to indicate the keyboard modifiers being pressed. * @@ -227,10 +224,10 @@ public: QByteArray text(bool expandWildCards = false, Qt::KeyboardModifiers modifiers = Qt::NoModifier) const; - /** Sets the character sequence associated with this entry */ + /*! Sets the character sequence associated with this entry */ void setText(const QByteArray& text); - /** + /*! * Returns the character sequence associated with this entry, * with any non-printable characters replaced with escape sequences. * @@ -242,12 +239,12 @@ public: QByteArray escapedText(bool expandWildCards = false, Qt::KeyboardModifiers modifiers = Qt::NoModifier) const; - /** Returns the character code ( from the Qt::Key enum ) associated with this entry */ + /*! Returns the character code ( from the Qt::Key enum ) associated with this entry */ int keyCode() const; - /** Sets the character code associated with this entry */ + /*! Sets the character code associated with this entry */ void setKeyCode(int keyCode); - /** + /*! * Returns a bitwise-OR of the enabled keyboard modifiers associated with this entry. * If a modifier is set in modifierMask() but not in modifiers(), this means that the entry * only matches when that modifier is NOT pressed. @@ -257,15 +254,15 @@ public: */ Qt::KeyboardModifiers modifiers() const; - /** Returns the keyboard modifiers which are valid in this entry. See modifiers() */ + /*! Returns the keyboard modifiers which are valid in this entry. See modifiers() */ Qt::KeyboardModifiers modifierMask() const; - /** See modifiers() */ + /*! See modifiers() */ void setModifiers( Qt::KeyboardModifiers modifiers ); - /** See modifierMask() and modifiers() */ + /*! See modifierMask() and modifiers() */ void setModifierMask( Qt::KeyboardModifiers modifiers ); - /** + /*! * Returns a bitwise-OR of the enabled state flags associated with this entry. * If flag is set in stateMask() but not in state(), this means that the entry only * matches when the terminal is NOT in that state. @@ -275,27 +272,27 @@ public: */ States state() const; - /** Returns the state flags which are valid in this entry. See state() */ + /*! Returns the state flags which are valid in this entry. See state() */ States stateMask() const; - /** See state() */ + /*! See state() */ void setState( States state ); - /** See stateMask() */ + /*! See stateMask() */ void setStateMask( States mask ); - /** + /*! * Returns the key code and modifiers associated with this entry * as a QKeySequence */ //QKeySequence keySequence() const; - /** + /*! * Returns this entry's conditions ( ie. its key code, modifier and state criteria ) * as a string. */ QString conditionToString() const; - /** + /*! * Returns this entry's result ( ie. its command or character sequence ) * as a string. * @@ -305,7 +302,7 @@ public: QString resultToString(bool expandWildCards = false, Qt::KeyboardModifiers modifiers = Qt::NoModifier) const; - /** + /*! * Returns true if this entry matches the given key sequence, specified * as a combination of @p keyCode , @p modifiers and @p state. */ @@ -330,24 +327,24 @@ public: QByteArray _text; }; - /** Constructs a new keyboard translator with the given @p name */ + /*! Constructs a new keyboard translator with the given @p name */ KeyboardTranslator(const QString& name); //KeyboardTranslator(const KeyboardTranslator& other); - /** Returns the name of this keyboard translator */ + /*! Returns the name of this keyboard translator */ QString name() const; - /** Sets the name of this keyboard translator */ + /*! Sets the name of this keyboard translator */ void setName(const QString& name); - /** Returns the descriptive name of this keyboard translator */ + /*! Returns the descriptive name of this keyboard translator */ QString description() const; - /** Sets the descriptive name of this keyboard translator */ + /*! Sets the descriptive name of this keyboard translator */ void setDescription(const QString& description); - /** + /*! * Looks for an entry in this keyboard translator which matches the given * key code, keyboard modifiers and state flags. * @@ -362,24 +359,24 @@ public: Qt::KeyboardModifiers modifiers , States state = NoState) const; - /** + /*! * Adds an entry to this keyboard translator's table. Entries can be looked up according * to their key sequence using findEntry() */ void addEntry(const Entry& entry); - /** + /*! * Replaces an entry in the translator. If the @p existing entry is null, * then this is equivalent to calling addEntry(@p replacement) */ void replaceEntry(const Entry& existing , const Entry& replacement); - /** + /*! * Removes an entry from the table. */ void removeEntry(const Entry& entry); - /** Returns a list of all entries in the translator. */ + /*! Returns a list of all entries in the translator. */ QList entries() const; private: @@ -393,7 +390,7 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardTranslator::States) Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardTranslator::Commands) -/** +/*! * Parses the contents of a Keyboard Translator (.keytab) file and * returns the entries found in it. * @@ -424,27 +421,27 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardTranslator::Commands) class KeyboardTranslatorReader { public: - /** Constructs a new reader which parses the given @p source */ + /*! Constructs a new reader which parses the given @p source */ KeyboardTranslatorReader( QIODevice* source ); - /** + /*! * Returns the description text. * TODO: More documentation */ QString description() const; - /** Returns true if there is another entry in the source stream */ + /*! Returns true if there is another entry in the source stream */ bool hasNextEntry(); - /** Returns the next entry found in the source stream */ + /*! Returns the next entry found in the source stream */ KeyboardTranslator::Entry nextEntry(); - /** + /*! * Returns true if an error occurred whilst parsing the input or * false if no error occurred. */ bool parseError(); - /** + /*! * Parses a condition and result string for a translator entry * and produces a keyboard translator entry. * @@ -487,23 +484,23 @@ private: bool _hasNext; }; -/** Writes a keyboard translation to disk. */ +/*! Writes a keyboard translation to disk. */ class KeyboardTranslatorWriter { public: - /** + /*! * Constructs a new writer which saves data into @p destination. * The caller is responsible for closing the device when writing is complete. */ KeyboardTranslatorWriter(QIODevice* destination); ~KeyboardTranslatorWriter(); - /** + /*! * Writes the header for the keyboard translator. * @param description Description of the keyboard translator. */ void writeHeader( const QString& description ); - /** Writes a translator entry. */ + /*! Writes a translator entry. */ void writeEntry( const KeyboardTranslator::Entry& entry ); private: @@ -511,14 +508,14 @@ private: QTextStream* _writer; }; -/** +/*! * Manages the keyboard translations available for use by terminal sessions, * see KeyboardTranslator. */ class KeyboardTranslatorManager { public: - /** + /*! * Constructs a new KeyboardTranslatorManager and loads the list of * available keyboard translations. * @@ -528,7 +525,7 @@ public: KeyboardTranslatorManager(); ~KeyboardTranslatorManager(); - /** + /*! * Adds a new translator. If a translator with the same name * already exists, it will be replaced by the new translator. * @@ -536,17 +533,17 @@ public: */ void addTranslator(KeyboardTranslator* translator); - /** + /*! * Deletes a translator. Returns true on successful deletion or false otherwise. * * TODO: More documentation */ bool deleteTranslator(const QString& name); - /** Returns the default translator for Konsole. */ + /*! Returns the default translator for Konsole. */ const KeyboardTranslator* defaultTranslator(); - /** + /*! * Returns the keyboard translator with the given name or 0 if no translator * with that name exists. * @@ -554,7 +551,7 @@ public: * the on-disk .keyboard file is loaded and parsed. */ const KeyboardTranslator* findTranslator(const QString& name); - /** + /*! * Returns a list of the names of available keyboard translators. * * The first time this is called, a search for available @@ -562,7 +559,7 @@ public: */ QList allTranslators(); - /** Returns the global KeyboardTranslatorManager instance. */ + /*! Returns the global KeyboardTranslatorManager instance. */ static KeyboardTranslatorManager* instance(); private: diff --git a/src/Widgets/BaulkTerm/qtermwidget/LineFont.h b/src/Widgets/BaulkTerm/qtermwidget/LineFont.h index 9b64143..3d694d4 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/LineFont.h +++ b/src/Widgets/BaulkTerm/qtermwidget/LineFont.h @@ -19,3 +19,4 @@ static const quint32 LineChars[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001c00, 0x00001084, 0x00007000, 0x00421000, 0x00039ce0, 0x000039ce, 0x000e7380, 0x00e73800, 0x000e7f80, 0x00e73884, 0x0003fce0, 0x004239ce }; + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Pty.cpp b/src/Widgets/BaulkTerm/qtermwidget/Pty.cpp index 144e5e2..3a88a19 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Pty.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/Pty.cpp @@ -1,24 +1,21 @@ -/* - This file is part of Konsole, an X terminal. - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "Pty.h" @@ -318,3 +315,4 @@ int Pty::foregroundProcessGroup() const } //#include "moc_Pty.cpp" + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Pty.h b/src/Widgets/BaulkTerm/qtermwidget/Pty.h index f3e9432..ac6103a 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Pty.h +++ b/src/Widgets/BaulkTerm/qtermwidget/Pty.h @@ -1,26 +1,23 @@ -/* - This file is part of Konsole, KDE's terminal emulator. - - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, KDE's terminal emulator. +// +// Copyright (C) 2007 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef PTY_H #define PTY_H @@ -37,7 +34,7 @@ namespace Konsole { -/** +/*! * The Pty class is used to start the terminal process, * send data to it, receive data from it and manipulate * various properties of the pseudo-teletype interface @@ -56,7 +53,7 @@ Q_OBJECT public: - /** + /*! * Constructs a new Pty. * * Connect to the sendData() slot and receivedData() signal to prepare @@ -68,7 +65,7 @@ Q_OBJECT Pty(); ~Pty(); - /** + /*! * Starts the terminal process. * * Returns 0 if the process was started successfully or non-zero @@ -97,30 +94,30 @@ Q_OBJECT // const QString& dbusSession ); - /** TODO: Document me */ + /*! TODO: Document me */ void setWriteable(bool writeable); - /** + /*! * Enables or disables Xon/Xoff flow control. */ void setXonXoff(bool on); - /** + /*! * Sets the size of the window (in lines and columns of characters) * used by this teletype. */ void setWindowSize(int lines, int cols); - /** Returns the size of the window used by this teletype. See setWindowSize() */ + /*! Returns the size of the window used by this teletype. See setWindowSize() */ QSize windowSize() const; - /** TODO Document me */ + /*! TODO Document me */ void setErase(char erase); - /** */ + /*! */ char erase() const; - /** + /*! * Returns the process id of the teletype's current foreground * process. This is the process which is currently reading * input sent to the terminal via. sendData() @@ -130,7 +127,7 @@ Q_OBJECT */ int foregroundProcessGroup() const; - /** + /*! * Returns whether the buffer used to send data to the * terminal process is full. */ @@ -139,12 +136,12 @@ Q_OBJECT public slots: - /** + /*! * Put the pty into UTF-8 mode on systems which support it. */ void setUtf8Mode(bool on); - /** + /*! * Suspend or resume processing of data from the standard * output of the terminal process. * @@ -155,7 +152,7 @@ Q_OBJECT */ void lockPty(bool lock); - /** + /*! * Sends data to the process currently controlling the * teletype ( whose id is returned by foregroundProcessGroup() ) * @@ -166,14 +163,14 @@ Q_OBJECT signals: - /** + /*! * Emitted when the terminal process terminates. * * @param exitCode The status code which the process exited with. */ void done(int exitCode); - /** + /*! * Emitted when a new block of data is received from * the teletype. * @@ -182,7 +179,7 @@ Q_OBJECT */ void receivedData(const char* buffer, int length); - /** + /*! * Emitted when the buffer used to send data to the terminal * process becomes empty, i.e. all data has been sent. */ @@ -191,28 +188,28 @@ Q_OBJECT private slots: - // called when terminal process exits + //! called when terminal process exits void donePty(); - // called when data is received from the terminal process + //! called when data is received from the terminal process void dataReceived(K3Process*, char* buffer, int length); - // sends the first enqueued buffer of data to the - // terminal process + //! sends the first enqueued buffer of data to the + //! terminal process void doSendJobs(); - // called when the terminal process is ready to - // receive more data + //! called when the terminal process is ready to + //! receive more data void writeReady(); private: - // takes a list of key=value pairs and adds them - // to the environment for the process + //! takes a list of key=value pairs and adds them + //! to the environment for the process void addEnvironmentVariables(const QStringList& environment); - // enqueues a buffer of data to be sent to the - // terminal process + //! enqueues a buffer of data to be sent to the + //! terminal process void appendSendJob(const char* buffer, int length); - // a buffer of data in the queue to be sent to the - // terminal process + //! a buffer of data in the queue to be sent to the + //! terminal process class SendJob { public: SendJob() {} @@ -241,3 +238,4 @@ Q_OBJECT } #endif // PTY_H + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Screen.cpp b/src/Widgets/BaulkTerm/qtermwidget/Screen.cpp index ead0066..7d0e502 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Screen.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/Screen.cpp @@ -1,24 +1,21 @@ -/* - This file is part of Konsole, an X terminal. - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "Screen.h" diff --git a/src/Widgets/BaulkTerm/qtermwidget/Screen.h b/src/Widgets/BaulkTerm/qtermwidget/Screen.h index a4ad199..2c72c77 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Screen.h +++ b/src/Widgets/BaulkTerm/qtermwidget/Screen.h @@ -1,26 +1,23 @@ -/* - This file is part of Konsole, KDE's terminal. - - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, KDE's terminal. +// +// Copyright (C) 2007 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef SCREEN_H #define SCREEN_H @@ -54,7 +51,7 @@ struct ScreenParm class TerminalCharacterDecoder; -/** +/*! \brief An image of characters with associated attributes. The terminal emulation ( Emulation ) receives a serial stream of @@ -80,46 +77,46 @@ class TerminalCharacterDecoder; class Screen { public: - /** Construct a new screen image of size @p lines by @p columns. */ + /*! Construct a new screen image of size @p lines by @p columns. */ Screen(int lines, int columns); ~Screen(); // VT100/2 Operations // Cursor Movement - /** Move the cursor up by @p n lines. */ + /*! Move the cursor up by @p n lines. */ void cursorUp (int n); - /** Move the cursor down by @p n lines. */ + /*! Move the cursor down by @p n lines. */ void cursorDown (int n); - /** Move the cursor to the left by @p n columns. */ + /*! Move the cursor to the left by @p n columns. */ void cursorLeft (int n); - /** Move the cursor to the right by @p n columns. */ + /*! Move the cursor to the right by @p n columns. */ void cursorRight (int n); - /** Position the cursor on line @p y. */ + /*! Position the cursor on line @p y. */ void setCursorY (int y); - /** Position the cursor at column @p x. */ + /*! Position the cursor at column @p x. */ void setCursorX (int x); - /** Position the cursor at line @p y, column @p x. */ + /*! Position the cursor at line @p y, column @p x. */ void setCursorYX (int y, int x); - /** + /*! * Sets the margins for scrolling the screen. * * @param topLine The top line of the new scrolling margin. * @param bottomLine The bottom line of the new scrolling margin. */ void setMargins (int topLine , int bottomLine); - /** Returns the top line of the scrolling region. */ + /*! Returns the top line of the scrolling region. */ int topMargin() const; - /** Returns the bottom line of the scrolling region. */ + /*! Returns the bottom line of the scrolling region. */ int bottomMargin() const; - /** + /*! * Resets the scrolling margins back to the top and bottom lines * of the screen. */ void setDefaultMargins(); - /** + /*! * Moves the cursor down one line, if the MODE_NewLine mode * flag is enabled then the cursor is returned to the leftmost * column first. @@ -128,146 +125,146 @@ public: * or index() otherwise. */ void NewLine (); - /** + /*! * Moves the cursor down one line and positions it at the beginning * of the line. */ void NextLine (); - /** + /*! * Move the cursor down one line. If the cursor is on the bottom * line of the scrolling region (as returned by bottomMargin()) the * scrolling region is scrolled up by one line instead. */ void index (); - /** + /*! * Move the cursor up one line. If the cursor is on the top line * of the scrolling region (as returned by topMargin()) the scrolling * region is scrolled down by one line instead. */ void reverseIndex(); - /** + /*! * Scroll the scrolling region of the screen up by @p n lines. * The scrolling region is initially the whole screen, but can be changed * using setMargins() */ void scrollUp(int n); - /** + /*! * Scroll the scrolling region of the screen down by @p n lines. * The scrolling region is initially the whole screen, but can be changed * using setMargins() */ void scrollDown(int n); - /** + /*! * Moves the cursor to the beginning of the current line. * Equivalent to setCursorX(0) */ void Return (); - /** + /*! * Moves the cursor one column to the left and erases the character * at the new cursor position. */ void BackSpace (); - /** + /*! * Moves the cursor @p n tab-stops to the right. */ void Tabulate (int n = 1); - /** + /*! * Moves the cursor @p n tab-stops to the left. */ void backTabulate(int n); // Editing - /** + /*! * Erase @p n characters beginning from the current cursor position. * This is equivalent to over-writing @p n characters starting with the current * cursor position with spaces. * If @p n is 0 then one character is erased. */ void eraseChars (int n); - /** + /*! * Delete @p n characters beginning from the current cursor position. * If @p n is 0 then one character is deleted. */ void deleteChars (int n); - /** + /*! * Insert @p n blank characters beginning from the current cursor position. * The position of the cursor is not altered. * If @p n is 0 then one character is inserted. */ void insertChars (int n); - /** + /*! * Removes @p n lines beginning from the current cursor position. * The position of the cursor is not altered. * If @p n is 0 then one line is removed. */ void deleteLines (int n); - /** + /*! * Inserts @p lines beginning from the current cursor position. * The position of the cursor is not altered. * If @p n is 0 then one line is inserted. */ void insertLines (int n); - /** Clears all the tab stops. */ + /*! Clears all the tab stops. */ void clearTabStops(); - /** Sets or removes a tab stop at the cursor's current column. */ + /*! Sets or removes a tab stop at the cursor's current column. */ void changeTabStop(bool set); - /** Resets (clears) the specified screen @p mode. */ + /*! Resets (clears) the specified screen @p mode. */ void resetMode (int mode); - /** Sets (enables) the specified screen @p mode. */ + /*! Sets (enables) the specified screen @p mode. */ void setMode (int mode); - /** + /*! * Saves the state of the specified screen @p mode. It can be restored * using restoreMode() */ void saveMode (int mode); - /** Restores the state of a screen @p mode saved by calling saveMode() */ + /*! Restores the state of a screen @p mode saved by calling saveMode() */ void restoreMode (int mode); - /** Returns whether the specified screen @p mode is enabled or not .*/ + /*! Returns whether the specified screen @p mode is enabled or not .*/ bool getMode (int mode) const; - /** + /*! * Saves the current position and appearence (text color and style) of the cursor. * It can be restored by calling restoreCursor() */ void saveCursor (); - /** Restores the position and appearence of the cursor. See saveCursor() */ + /*! Restores the position and appearence of the cursor. See saveCursor() */ void restoreCursor(); - /** Clear the whole screen, moving the current screen contents into the history first. */ + /*! Clear the whole screen, moving the current screen contents into the history first. */ void clearEntireScreen(); - /** + /*! * Clear the area of the screen from the current cursor position to the end of * the screen. */ void clearToEndOfScreen(); - /** + /*! * Clear the area of the screen from the current cursor position to the start * of the screen. */ void clearToBeginOfScreen(); - /** Clears the whole of the line on which the cursor is currently positioned. */ + /*! Clears the whole of the line on which the cursor is currently positioned. */ void clearEntireLine(); - /** Clears from the current cursor position to the end of the line. */ + /*! Clears from the current cursor position to the end of the line. */ void clearToEndOfLine(); - /** Clears from the current cursor position to the beginning of the line. */ + /*! Clears from the current cursor position to the beginning of the line. */ void clearToBeginOfLine(); - /** Fills the entire screen with the letter 'E' */ + /*! Fills the entire screen with the letter 'E' */ void helpAlign (); - /** + /*! * Enables the given @p rendition flag. Rendition flags control the appearence * of characters on the screen. * * @see Character::rendition */ void setRendition (int rendition); - /** + /*! * Disables the given @p rendition flag. Rendition flags control the appearence * of characters on the screen. * @@ -275,7 +272,7 @@ public: */ void resetRendition(int rendition); - /** + /*! * Sets the cursor's foreground color. * @param space The color space used by the @p color argument * @param color The new foreground color. The meaning of this depends on @@ -284,7 +281,7 @@ public: * @see CharacterColor */ void setForeColor (int space, int color); - /** + /*! * Sets the cursor's background color. * @param space The color space used by the @p color argumnet. * @param color The new background color. The meaning of this depends on @@ -293,25 +290,25 @@ public: * @see CharacterColor */ void setBackColor (int space, int color); - /** + /*! * Resets the cursor's color back to the default and sets the * character's rendition flags back to the default settings. */ void setDefaultRendition(); - /** Returns the column which the cursor is positioned at. */ + /*! Returns the column which the cursor is positioned at. */ int getCursorX() const; - /** Returns the line which the cursor is positioned on. */ + /*! Returns the line which the cursor is positioned on. */ int getCursorY() const; - /** TODO Document me */ + /*! TODO Document me */ void clear(); - /** + /*! * Sets the position of the cursor to the 'home' position at the top-left * corner of the screen (0,0) */ void home(); - /** + /*! * Resets the state of the screen. This resets the various screen modes * back to their default states. The cursor style and colors are reset * (as if setDefaultRendition() had been called) @@ -330,7 +327,7 @@ public: */ void reset(bool clearScreen = true); - /** + /*! * Displays a new character at the current cursor position. * * If the cursor is currently positioned at the right-edge of the screen and @@ -346,7 +343,7 @@ public: // Do composition with last shown character FIXME: Not implemented yet for KDE 4 void compose(const QString& compose); - /** + /*! * Resizes the image to a new fixed size of @p new_lines by @p new_columns. * In the case that @p new_columns is smaller than the current number of columns, * existing lines are not truncated. This prevents characters from being lost @@ -357,7 +354,7 @@ public: */ void resizeImage(int new_lines, int new_columns); - /** + /*! * Returns the current screen image. * The result is an array of Characters of size [getLines()][getColumns()] which * must be freed by the caller after use. @@ -369,7 +366,7 @@ public: */ void getImage( Character* dest , int size , int startLine , int endLine ) const; - /** + /*! * Returns the additional attributes associated with lines in the image. * The most important attribute is LINE_WRAPPED which specifies that the * line is wrapped, @@ -378,27 +375,27 @@ public: QVector getLineProperties( int startLine , int endLine ) const; - /** Return the number of lines. */ + /*! Return the number of lines. */ int getLines() { return lines; } - /** Return the number of columns. */ + /*! Return the number of columns. */ int getColumns() { return columns; } - /** Return the number of lines in the history buffer. */ + /*! Return the number of lines in the history buffer. */ int getHistLines (); - /** + /*! * Sets the type of storage used to keep lines in the history. * If @p copyPreviousScroll is true then the contents of the previous * history buffer are copied into the new scroll. */ void setScroll(const HistoryType& , bool copyPreviousScroll = true); - /** Returns the type of storage used to keep lines in the history. */ + /*! Returns the type of storage used to keep lines in the history. */ const HistoryType& getScroll(); - /** + /*! * Returns true if this screen keeps lines that are scrolled off the screen * in a history buffer. */ bool hasScroll(); - /** + /*! * Sets the start of the selection. * * @param column The column index of the first character in the selection. @@ -407,7 +404,7 @@ public: */ void setSelectionStart(const int column, const int line, const bool columnmode); - /** + /*! * Sets the end of the current selection. * * @param column The column index of the last character in the selection. @@ -415,37 +412,37 @@ public: */ void setSelectionEnd(const int column, const int line); - /** + /*! * Retrieves the start of the selection or the cursor position if there * is no selection. */ void getSelectionStart(int& column , int& line); - /** + /*! * Retrieves the end of the selection or the cursor position if there * is no selection. */ void getSelectionEnd(int& column , int& line); - /** Clears the current selection */ + /*! Clears the current selection */ void clearSelection(); void setBusySelecting(bool busy) { sel_busy = busy; } - /** + /*! * Returns true if the character at (@p column, @p line) is part of the * current selection. */ bool isSelected(const int column,const int line) const; - /** + /*! * Convenience method. Returns the currently selected text. * @param preserveLineBreaks Specifies whether new line characters should * be inserted into the returned text at the end of each terminal line. */ QString selectedText(bool preserveLineBreaks); - /** + /*! * Copies part of the output to a stream. * * @param decoder A decoder which coverts terminal characters into text @@ -454,13 +451,13 @@ public: */ void writeToStream(TerminalCharacterDecoder* decoder, int from, int to); - /** + /*! * Sets the selection to line @p no in the history and returns * the text of that line from the history buffer. */ QString getHistoryLine(int no); - /** + /*! * Copies the selected characters, set using @see setSelBeginXY and @see setSelExtentXY * into a stream. * @@ -473,10 +470,10 @@ public: void writeSelectionToStream(TerminalCharacterDecoder* decoder , bool preserveLineBreaks = true); - /** TODO Document me */ + /*! TODO Document me */ void checkSelection(int from, int to); - /** + /*! * Sets or clears an attribute of the current line. * * @param property The attribute to set or clear @@ -493,7 +490,7 @@ public: void setLineProperty(LineProperty property , bool enable); - /** + /*! * Returns the number of lines that the image has been scrolled up or down by, * since the last call to resetScrolledLines(). * @@ -502,7 +499,7 @@ public: */ int scrolledLines() const; - /** + /*! * Returns the region of the image which was last scrolled. * * This is the area of the image from the top margin to the @@ -510,13 +507,13 @@ public: */ QRect lastScrolledRegion() const; - /** + /*! * Resets the count of the number of lines that the image has been scrolled up or down by, * see scrolledLines() */ void resetScrolledLines(); - /** + /*! * Returns the number of lines of output which have been * dropped from the history since the last call * to resetDroppedLines() @@ -527,13 +524,13 @@ public: */ int droppedLines() const; - /** + /*! * Resets the count of the number of lines dropped from * the history. */ void resetDroppedLines(); - /** + /*! * Fills the buffer @p dest with @p count instances of the default (ie. blank) * Character style. */ @@ -660,3 +657,4 @@ private: } #endif // SCREEN_H + diff --git a/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.cpp b/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.cpp index f29dcd0..0ff5b7f 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.cpp @@ -1,23 +1,20 @@ -/* - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "ScreenWindow.h" @@ -294,3 +291,4 @@ void ScreenWindow::notifyOutputChanged() } //#include "moc_ScreenWindow.cpp" + diff --git a/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.h b/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.h index d2955ab..9ebb94f 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.h +++ b/src/Widgets/BaulkTerm/qtermwidget/ScreenWindow.h @@ -1,23 +1,20 @@ -/* - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef SCREENWINDOW_H #define SCREENWINDOW_H @@ -35,7 +32,7 @@ namespace Konsole class Screen; -/** +/*! * Provides a window onto a section of a terminal screen. * This window can then be rendered by a terminal display widget ( TerminalDisplay ). * @@ -56,7 +53,7 @@ class ScreenWindow : public QObject Q_OBJECT public: - /** + /*! * Constructs a new screen window with the given parent. * A screen must be specified by calling setScreen() before calling getImage() or getLineProperties(). * @@ -68,12 +65,12 @@ public: ScreenWindow(QObject* parent = 0); virtual ~ScreenWindow(); - /** Sets the screen which this window looks onto */ + /*! Sets the screen which this window looks onto */ void setScreen(Screen* screen); - /** Returns the screen which this window looks onto */ + /*! Returns the screen which this window looks onto */ Screen* screen() const; - /** + /*! * Returns the image of characters which are currently visible through this window * onto the screen. * @@ -82,13 +79,13 @@ public: */ Character* getImage(); - /** + /*! * Returns the line attributes associated with the lines of characters which * are currently visible through this window */ QVector getLineProperties(); - /** + /*! * Returns the number of lines which the region of the window * specified by scrollRegion() has been scrolled by since the last call * to resetScrollCount(). scrollRegion() is in most cases the @@ -101,12 +98,12 @@ public: */ int scrollCount() const; - /** + /*! * Resets the count of scrolled lines returned by scrollCount() */ void resetScrollCount(); - /** + /*! * Returns the area of the window which was last scrolled, this is * usually the whole window area. * @@ -115,61 +112,61 @@ public: */ QRect scrollRegion() const; - /** + /*! * Sets the start of the selection to the given @p line and @p column within * the window. */ void setSelectionStart( int column , int line , bool columnMode ); - /** + /*! * Sets the end of the selection to the given @p line and @p column within * the window. */ void setSelectionEnd( int column , int line ); - /** + /*! * Retrieves the start of the selection within the window. */ void getSelectionStart( int& column , int& line ); - /** + /*! * Retrieves the end of the selection within the window. */ void getSelectionEnd( int& column , int& line ); - /** + /*! * Returns true if the character at @p line , @p column is part of the selection. */ bool isSelected( int column , int line ); - /** + /*! * Clears the current selection */ void clearSelection(); - /** Sets the number of lines in the window */ + /*! Sets the number of lines in the window */ void setWindowLines(int lines); - /** Returns the number of lines in the window */ + /*! Returns the number of lines in the window */ int windowLines() const; - /** Returns the number of columns in the window */ + /*! Returns the number of columns in the window */ int windowColumns() const; - /** Returns the total number of lines in the screen */ + /*! Returns the total number of lines in the screen */ int lineCount() const; - /** Returns the total number of columns in the screen */ + /*! Returns the total number of columns in the screen */ int columnCount() const; - /** Returns the index of the line which is currently at the top of this window */ + /*! Returns the index of the line which is currently at the top of this window */ int currentLine() const; - /** + /*! * Returns the position of the cursor * within the window. */ QPoint cursorPosition() const; - /** + /*! * Convenience method. Returns true if the window is currently at the bottom * of the screen. */ bool atEndOfOutput() const; - /** Scrolls the window so that @p line is at the top of the window */ + /*! Scrolls the window so that @p line is at the top of the window */ void scrollTo( int line ); enum RelativeScrollMode @@ -178,7 +175,7 @@ public: ScrollPages }; - /** + /*! * Scrolls the window relative to its current position on the screen. * * @param mode Specifies whether @p amount refers to the number of lines or the number @@ -189,7 +186,7 @@ public: */ void scrollBy( RelativeScrollMode mode , int amount ); - /** + /*! * Specifies whether the window should automatically move to the bottom * of the screen when new output is added. * @@ -197,13 +194,13 @@ public: * screen() ) when the notifyOutputChanged() method is called. */ void setTrackOutput(bool trackOutput); - /** + /*! * Returns whether the window automatically moves to the bottom of the screen as * new output is added. See setTrackOutput() */ bool trackOutput() const; - /** + /*! * Returns the text which is currently selected. * * @param preserveLineBreaks See Screen::selectedText() @@ -211,7 +208,7 @@ public: QString selectedText( bool preserveLineBreaks ) const; public slots: - /** + /*! * Notifies the window that the contents of the associated terminal screen have changed. * This moves the window to the bottom of the screen if trackOutput() is true and causes * the outputChanged() signal to be emitted. @@ -219,19 +216,19 @@ public slots: void notifyOutputChanged(); signals: - /** + /*! * Emitted when the contents of the associated terminal screen ( see screen() ) changes. */ void outputChanged(); - /** + /*! * Emitted when the screen window is scrolled to a different position. * * @param line The line which is now at the top of the window. */ void scrolled(int line); - /** + /*! * Emitted when the selection is changed. */ void selectionChanged(); @@ -254,3 +251,4 @@ private: } #endif // SCREENWINDOW_H + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Session.cpp b/src/Widgets/BaulkTerm/qtermwidget/Session.cpp index ab78495..32bb854 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Session.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/Session.cpp @@ -1,27 +1,23 @@ -/* - This file is part of Konsole - - Copyright (C) 2006-2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - Additional fixes for BaulkTerm by Jacob Alexander (HaaTa) , Copyright (C) 2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole +// +// Copyright (C) 2006-2007 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "Session.h" @@ -1012,3 +1008,4 @@ void SessionGroup::disconnectPair(Session* master , Session* other) } //#include "moc_Session.cpp" + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Session.h b/src/Widgets/BaulkTerm/qtermwidget/Session.h index 7b2ae25..0763623 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Session.h +++ b/src/Widgets/BaulkTerm/qtermwidget/Session.h @@ -1,26 +1,23 @@ -/* - This file is part of Konsole, an X terminal. - - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// +// Copyright (C) 2007 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef SESSION_H #define SESSION_H @@ -43,7 +40,7 @@ class Pty; class TerminalDisplay; //class ZModemDialog; -/** +/*! * Represents a terminal session consisting of a pseudo-teletype and a terminal emulation. * The pseudo-teletype (or PTY) handles I/O between the terminal process and Konsole. * The terminal emulation ( Emulation and subclasses ) processes the output stream from the @@ -64,7 +61,7 @@ public: Q_PROPERTY(QString keyBindings READ keyBindings WRITE setKeyBindings) Q_PROPERTY(QSize size READ size WRITE setSize) - /** + /*! * Constructs a new session. * * To start the terminal process, call the run() method, @@ -78,27 +75,27 @@ public: Session(); ~Session(); - /** + /*! * Returns true if the session is currently running. This will be true * after run() has been called successfully. */ bool isRunning() const; - /** + /*! * Sets the profile associated with this session. * * @param profileKey A key which can be used to obtain the current * profile settings from the SessionManager */ void setProfileKey(const QString& profileKey); - /** + /*! * Returns the profile key associated with this session. * This can be passed to the SessionManager to obtain the current * profile settings. */ QString profileKey() const; - /** + /*! * Adds a new view for this session. * * The viewing widget will display the output from the terminal and @@ -109,7 +106,7 @@ public: * closed when the last view is removed. */ void addView(TerminalDisplay* widget); - /** + /*! * Removes a view from this session. When the last view is removed, * the session will be closed automatically. * @@ -118,53 +115,53 @@ public: */ void removeView(TerminalDisplay* widget); - /** + /*! * Returns the views connected to this session */ QList views() const; - /** + /*! * Returns the terminal emulation instance being used to encode / decode * characters to / from the process. */ Emulation* emulation() const; - /** + /*! * Returns the environment of this session as a list of strings like * VARIABLE=VALUE */ QStringList environment() const; - /** + /*! * Sets the environment for this session. * @p environment should be a list of strings like * VARIABLE=VALUE */ void setEnvironment(const QStringList& environment); - /** Returns the unique ID for this session. */ + /*! Returns the unique ID for this session. */ int sessionId() const; - /** + /*! * Return the session title set by the user (ie. the program running * in the terminal), or an empty string if the user has not set a custom title */ QString userTitle() const; - /** + /*! * This enum describes the contexts for which separate * tab title formats may be specified. */ enum TabTitleContext { - /** Default tab title format */ + /*! Default tab title format */ LocalTabTitle, - /** + /*! * Tab title format used session currently contains * a connection to a remote computer (via SSH) */ RemoteTabTitle }; - /** + /*! * Sets the format used by this session for tab titles. * * @param context The context whoose format should be set. @@ -174,33 +171,33 @@ public: * elements available depend on the @p context */ void setTabTitleFormat(TabTitleContext context , const QString& format); - /** Returns the format used by this session for tab titles. */ + /*! Returns the format used by this session for tab titles. */ QString tabTitleFormat(TabTitleContext context) const; - /** Returns the arguments passed to the shell process when run() is called. */ + /*! Returns the arguments passed to the shell process when run() is called. */ QStringList arguments() const; - /** Returns the program name of the shell process started when run() is called. */ + /*! Returns the program name of the shell process started when run() is called. */ QString program() const; - /** + /*! * Sets the command line arguments which the session's program will be passed when * run() is called. */ void setArguments(const QStringList& arguments); - /** Sets the program to be executed when run() is called. */ + /*! Sets the program to be executed when run() is called. */ void setProgram(const QString& program); - /** Returns the session's current working directory. */ + /*! Returns the session's current working directory. */ QString initialWorkingDirectory() { return _initialWorkingDir; } - /** + /*! * Sets the initial working directory for the session when it is run * This has no effect once the session has been started. */ void setInitialWorkingDirectory( const QString& dir ); - /** + /*! * Sets the type of history store used by this session. * Lines of output produced by the terminal are added * to the history store. The type of history store @@ -209,26 +206,26 @@ public: * (in memory, on-disk etc.) used. */ void setHistoryType(const HistoryType& type); - /** + /*! * Returns the type of history store used by this session. */ const HistoryType& historyType() const; - /** + /*! * Clears the history store used by this session. */ void clearHistory(); - /** + /*! * Enables monitoring for activity in the session. * This will cause notifySessionState() to be emitted * with the NOTIFYACTIVITY state flag when output is * received from the terminal. */ void setMonitorActivity(bool); - /** Returns true if monitoring for activity is enabled. */ + /*! Returns true if monitoring for activity is enabled. */ bool isMonitorActivity() const; - /** + /*! * Enables monitoring for silence in the session. * This will cause notifySessionState() to be emitted * with the NOTIFYSILENCE state flag when output is not @@ -236,15 +233,15 @@ public: * time, specified with setMonitorSilenceSeconds() */ void setMonitorSilence(bool); - /** + /*! * Returns true if monitoring for inactivity (silence) * in the session is enabled. */ bool isMonitorSilence() const; - /** See setMonitorSilence() */ + /*! See setMonitorSilence() */ void setMonitorSilenceSeconds(int seconds); - /** + /*! * Sets the key bindings used by this session. The bindings * specify how input key sequences are translated into * the character stream which is sent to the terminal. @@ -254,79 +251,79 @@ public: * KeyboardTranslatorManager class. */ void setKeyBindings(const QString& id); - /** Returns the name of the key bindings used by this session. */ + /*! Returns the name of the key bindings used by this session. */ QString keyBindings() const; - /** + /*! * This enum describes the available title roles. */ enum TitleRole { - /** The name of the session. */ + /*! The name of the session. */ NameRole, - /** The title of the session which is displayed in tabs etc. */ + /*! The title of the session which is displayed in tabs etc. */ DisplayedTitleRole }; - /** Sets the session's title for the specified @p role to @p title. */ + /*! Sets the session's title for the specified @p role to @p title. */ void setTitle(TitleRole role , const QString& title); - /** Returns the session's title for the specified @p role. */ + /*! Returns the session's title for the specified @p role. */ QString title(TitleRole role) const; - /** Convenience method used to read the name property. Returns title(Session::NameRole). */ + /*! Convenience method used to read the name property. Returns title(Session::NameRole). */ QString nameTitle() const { return title(Session::NameRole); } - /** Sets the name of the icon associated with this session. */ + /*! Sets the name of the icon associated with this session. */ void setIconName(const QString& iconName); - /** Returns the name of the icon associated with this session. */ + /*! Returns the name of the icon associated with this session. */ QString iconName() const; - /** Sets the text of the icon associated with this session. */ + /*! Sets the text of the icon associated with this session. */ void setIconText(const QString& iconText); - /** Returns the text of the icon associated with this session. */ + /*! Returns the text of the icon associated with this session. */ QString iconText() const; - /** Specifies whether a utmp entry should be created for the pty used by this session. */ + /*! Specifies whether a utmp entry should be created for the pty used by this session. */ void setAddToUtmp(bool); - /** Sends the specified @p signal to the terminal process. */ + /*! Sends the specified @p signal to the terminal process. */ bool sendSignal(int signal); - /** + /*! * Specifies whether to close the session automatically when the terminal * process terminates. */ void setAutoClose(bool b) { _autoClose = b; } - /** + /*! * Sets whether flow control is enabled for this terminal * session. */ void setFlowControlEnabled(bool enabled); - /** Returns whether flow control is enabled for this terminal session. */ + /*! Returns whether flow control is enabled for this terminal session. */ bool flowControlEnabled() const; - /** + /*! * Sends @p text to the current foreground terminal program. */ void sendText(const QString& text) const; - /** + /*! * Returns the process id of the terminal process. * This is the id used by the system API to refer to the process. */ int processId() const; - /** + /*! * Returns the process id of the terminal's foreground process. * This is initially the same as processId() but can change * as the user starts other programs inside the terminal. */ int foregroundProcessId() const; - /** Returns the terminal session's window size in lines and columns. */ + /*! Returns the terminal session's window size in lines and columns. */ QSize size(); - /** + /*! * Emits a request to resize the session to accommodate * the specified window size. * @@ -334,10 +331,10 @@ public: */ void setSize(const QSize& size); - /** Sets the text codec used by this session's terminal emulation. */ + /*! Sets the text codec used by this session's terminal emulation. */ void setCodec(QTextCodec* codec); - /** + /*! * Sets whether the session has a dark background or not. The session * uses this information to set the COLORFGBG variable in the process's * environment, which allows the programs running in the terminal to determine @@ -346,13 +343,13 @@ public: * This has no effect once the session is running. */ void setDarkBackground(bool darkBackground); - /** + /*! * Returns true if the session has a dark background. * See setDarkBackground() */ bool hasDarkBackground() const; - /** + /*! * Attempts to get the shell program to redraw the current display area. * This can be used after clearing the screen, for example, to get the * shell to redraw the prompt line. @@ -365,21 +362,21 @@ public: public slots: - /** + /*! * Starts the terminal session. * * This creates the terminal process and connects the teletype to it. */ void run(); - /** + /*! * Closes the terminal session. This sends a hangup signal * (SIGHUP) to the terminal process and causes the done(Session*) * signal to be emitted. */ void close(); - /** + /*! * Changes the session title or other customizable aspects of the terminal * emulation display. For a list of what may be changed see the * Emulation::titleChanged() signal. @@ -388,26 +385,26 @@ public slots: signals: - /** Emitted when the terminal process starts. */ + /*! Emitted when the terminal process starts. */ void started(); - /** + /*! * Emitted when the terminal process exits. */ void finished(); - /** + /*! * Emitted when output is received from the terminal process. */ void receivedData( const QString& text ); - /** Emitted when the session's title has changed. */ + /*! Emitted when the session's title has changed. */ void titleChanged(); - /** Emitted when the session's profile has changed. */ + /*! Emitted when the session's profile has changed. */ void profileChanged(const QString& profile); - /** + /*! * Emitted when the activity state of this session changes. * * @param state The new state of the session. This may be one @@ -415,10 +412,10 @@ signals: */ void stateChanged(int state); - /** Emitted when a bell event occurs in the session. */ + /*! Emitted when a bell event occurs in the session. */ void bellRequest( const QString& message ); - /** + /*! * Requests that the color the text for any tabs associated with * this session should be changed; * @@ -426,19 +423,19 @@ signals: */ void changeTabTextColorRequest(int); - /** + /*! * Requests that the background color of views on this session * should be changed. */ void changeBackgroundColorRequest(const QColor&); - /** TODO: Document me. */ + /*! TODO: Document me. */ void openUrlRequest(const QString& url); - /** TODO: Document me. */ + /*! TODO: Document me. */ // void zmodemDetected(); - /** + /*! * Emitted when the terminal process requests a change * in the size of the terminal window. * @@ -446,7 +443,7 @@ signals: */ void resizeRequest(const QSize& size); - /** + /*! * Emitted when a profile change command is received from the terminal. * * @param text The text of the command. This is a string of the form @@ -454,7 +451,7 @@ signals: */ void profileChangeCommandReceived(const QString& text); - /** + /*! * Emitted when the flow control state changes. * * @param enabled True if flow control is enabled or false otherwise. @@ -542,7 +539,7 @@ private: }; -/** +/*! * Provides a group of sessions which is divided into master and slave sessions. * Activity in master sessions can be propagated to all sessions within the group. * The type of activity which is propagated and method of propagation is controlled @@ -553,20 +550,20 @@ class SessionGroup : public QObject Q_OBJECT public: - /** Constructs an empty session group. */ + /*! Constructs an empty session group. */ SessionGroup(); - /** Destroys the session group and removes all connections between master and slave sessions. */ + /*! Destroys the session group and removes all connections between master and slave sessions. */ ~SessionGroup(); - /** Adds a session to the group. */ + /*! Adds a session to the group. */ void addSession( Session* session ); - /** Removes a session from the group. */ + /*! Removes a session from the group. */ void removeSession( Session* session ); - /** Returns the list of sessions currently in the group. */ + /*! Returns the list of sessions currently in the group. */ QList sessions() const; - /** + /*! * Sets whether a particular session is a master within the group. * Changes or activity in the group's master sessions may be propagated * to all the sessions in the group, depending on the current masterMode() @@ -575,30 +572,30 @@ public: * @param master True to make this session a master or false otherwise */ void setMasterStatus( Session* session , bool master ); - /** Returns the master status of a session. See setMasterStatus() */ + /*! Returns the master status of a session. See setMasterStatus() */ bool masterStatus( Session* session ) const; - /** + /*! * This enum describes the options for propagating certain activity or * changes in the group's master sessions to all sessions in the group. */ enum MasterMode { - /** + /*! * Any input key presses in the master sessions are sent to all * sessions in the group. */ CopyInputToAll = 1 }; - /** + /*! * Specifies which activity in the group's master sessions is propagated * to all sessions in the group. * * @param mode A bitwise OR of MasterMode flags. */ void setMasterMode( int mode ); - /** + /*! * Returns a bitwise OR of the active MasterMode flags for this group. * See setMasterMode() */ @@ -619,3 +616,4 @@ private: } #endif + diff --git a/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.cpp b/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.cpp index 764dd66..0321551 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.cpp @@ -1,23 +1,20 @@ -/* - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "ShellCommand.h" @@ -108,7 +105,7 @@ QString ShellCommand::expand(const QString& text) return result; } -/* +/*! * expandEnv * * Expand environment variables in text. Escaped '$' characters are ignored. @@ -166,3 +163,4 @@ static bool expandEnv( QString &text ) return expanded; } + diff --git a/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.h b/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.h index 44e0db8..aaf9200 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.h +++ b/src/Widgets/BaulkTerm/qtermwidget/ShellCommand.h @@ -1,23 +1,20 @@ -/* - Copyright (C) 2007 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// Copyright (C) 2007 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef SHELLCOMMAND_H #define SHELLCOMMAND_H @@ -28,7 +25,7 @@ namespace Konsole { -/** +/*! * A class to parse and extract information about shell commands. * * ShellCommand can be used to: @@ -52,36 +49,36 @@ namespace Konsole class ShellCommand { public: - /** + /*! * Constructs a ShellCommand from a command line. * * @param fullCommand The command line to parse. */ ShellCommand(const QString& fullCommand); - /** + /*! * Constructs a ShellCommand with the specified @p command and @p arguments. */ ShellCommand(const QString& command , const QStringList& arguments); - /** Returns the command. */ + /*! Returns the command. */ QString command() const; - /** Returns the arguments. */ + /*! Returns the arguments. */ QStringList arguments() const; - /** + /*! * Returns the full command line. */ QString fullCommand() const; - /** Returns true if this is a root command. */ + /*! Returns true if this is a root command. */ bool isRootCommand() const; - /** Returns true if the program specified by @p command() exists. */ + /*! Returns true if the program specified by @p command() exists. */ bool isAvailable() const; - /** Expands environment variables in @p text .*/ + /*! Expands environment variables in @p text .*/ static QString expand(const QString& text); - /** Expands environment variables in each string in @p list. */ + /*! Expands environment variables in each string in @p list. */ static QStringList expand(const QStringList& items); private: diff --git a/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.cpp b/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.cpp index 18571d9..cb2b558 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.cpp @@ -1,25 +1,22 @@ -/* - This file is part of Konsole, an X terminal. - - Copyright (C) 2006 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// +// Copyright (C) 2006 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "TerminalCharacterDecoder.h" @@ -225,3 +222,4 @@ void HTMLDecoder::setColorTable(const ColorEntry* table) { _colorTable = table; } + diff --git a/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.h b/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.h index 5d97fc3..b42ef78 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.h +++ b/src/Widgets/BaulkTerm/qtermwidget/TerminalCharacterDecoder.h @@ -1,25 +1,22 @@ -/* - This file is part of Konsole, an X terminal. - - Copyright (C) 2006-7 by Robert Knight - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// +// Copyright (C) 2006-7 by Robert Knight +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef TERMINAL_CHARACTER_DECODER_H #define TERMINAL_CHARACTER_DECODER_H @@ -31,7 +28,7 @@ class QTextStream; namespace Konsole { -/** +/*! * Base class for terminal character decoders * * The decoder converts lines of terminal characters which consist of a unicode character, foreground @@ -45,12 +42,12 @@ class TerminalCharacterDecoder public: virtual ~TerminalCharacterDecoder() {} - /** Begin decoding characters. The resulting text is appended to @p output. */ + /*! Begin decoding characters. The resulting text is appended to @p output. */ virtual void begin(QTextStream* output) = 0; - /** End decoding. */ + /*! End decoding. */ virtual void end() = 0; - /** + /*! * Converts a line of terminal characters with associated properties into a text string * and writes the string into an output QTextStream. * @@ -63,7 +60,7 @@ public: LineProperty properties) = 0; }; -/** +/*! * A terminal character decoder which produces plain text, ignoring colours and other appearance-related * properties of the original characters. */ @@ -72,13 +69,13 @@ class PlainTextDecoder : public TerminalCharacterDecoder public: PlainTextDecoder(); - /** + /*! * Set whether trailing whitespace at the end of lines should be included * in the output. * Defaults to true. */ void setTrailingWhitespace(bool enable); - /** + /*! * Returns whether trailing whitespace at the end of lines is included * in the output. */ @@ -97,18 +94,18 @@ private: bool _includeTrailingWhitespace; }; -/** +/*! * A terminal character decoder which produces pretty HTML markup */ class HTMLDecoder : public TerminalCharacterDecoder { public: - /** + /*! * Constructs an HTML decoder using a default black-on-white color scheme. */ HTMLDecoder(); - /** + /*! * Sets the colour table which the decoder uses to produce the HTML colour codes in its * output */ diff --git a/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.cpp b/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.cpp index 84f6f72..34658c8 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.cpp @@ -1,27 +1,23 @@ -/* - This file is part of Konsole, a terminal emulator for KDE. - - Copyright (C) 2006-7 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - Additional fixes for BaulkTerm by Jacob Alexander (HaaTa) , Copyright (C) 2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, a terminal emulator for KDE. +// +// Copyright (C) 2006-7 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "TerminalDisplay.h" @@ -351,7 +347,7 @@ TerminalDisplay::~TerminalDisplay() /* */ /* ------------------------------------------------------------------------- */ -/** +/*! A table for emulating the simple (single width) unicode drawing chars. It represents the 250x - 257x glyphs. If it's zero, we can't use it. if it's not, it's encoded as follows: imagine a 5x5 grid where the points are numbered @@ -2736,3 +2732,4 @@ void TerminalDisplay::setLineSpacing(uint i) } //#include "moc_TerminalDisplay.cpp" + diff --git a/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.h b/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.h index 7d350dd..b7bee18 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.h +++ b/src/Widgets/BaulkTerm/qtermwidget/TerminalDisplay.h @@ -1,25 +1,21 @@ -/* - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - Additional fixes for BaulkTerm by Jacob Alexander (HaaTa) , Copyright (C) 2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// Copyright (C) 2007 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef TERMINALDISPLAY_H #define TERMINALDISPLAY_H @@ -57,7 +53,7 @@ extern unsigned short vt100_graphics[32]; class ScreenWindow; -/** +/*! * A widget which displays output from a terminal emulation and sends input keypresses and mouse activity * to the terminal. * @@ -71,49 +67,49 @@ class TerminalDisplay : public QWidget Q_OBJECT public: - /** Constructs a new terminal display widget with the specified parent. */ + /*! Constructs a new terminal display widget with the specified parent. */ TerminalDisplay(QWidget *parent=0); virtual ~TerminalDisplay(); - /** Returns the terminal color palette used by the display. */ + /*! Returns the terminal color palette used by the display. */ const ColorEntry* colorTable() const; - /** Sets the terminal color palette used by the display. */ + /*! Sets the terminal color palette used by the display. */ void setColorTable(const ColorEntry table[]); - /** Sets an Entry in the ColorTable */ + /*! Sets an Entry in the ColorTable */ void setColorTableEntry( int colorEntry, QColor color, bool transparency, bool bold ); - /** + /*! * Sets the seed used to generate random colors for the display * (in color schemes that support them). */ void setRandomSeed(uint seed); - /** + /*! * Returns the seed used to generate random colors for the display * (in color schemes that support them). */ uint randomSeed() const; - /** Sets the opacity of the terminal display. */ + /*! Sets the opacity of the terminal display. */ void setOpacity(qreal opacity); - /** + /*! * This enum describes the location where the scroll bar is positioned in the display widget. */ enum ScrollBarPosition { - /** Do not show the scroll bar. */ + /*! Do not show the scroll bar. */ NoScrollBar=0, - /** Show the scroll bar on the left side of the display. */ + /*! Show the scroll bar on the left side of the display. */ ScrollBarLeft=1, - /** Show the scroll bar on the right side of the display. */ + /*! Show the scroll bar on the right side of the display. */ ScrollBarRight=2 }; - /** + /*! * Specifies whether the terminal display has a vertical scroll bar, and if so whether it * is shown on the left or right side of the display. */ void setScrollBarPosition(ScrollBarPosition position); - /** + /*! * Sets the current position and range of the display's scroll bar. * * @param cursor The position of the scroll bar's thumb. @@ -121,7 +117,7 @@ public: */ void setScroll(int cursor, int lines); - /** + /*! * Returns the display's filter chain. When the image for the display is updated, * the text is passed through each filter in the chain. Each filter can define * hotspots which correspond to certain strings (such as URLs or particular words). @@ -134,7 +130,7 @@ public: */ FilterChain* filterChain() const; - /** + /*! * Updates the filters in the display's filter chain. This will cause * the hotspots to be updated to match the current image. * @@ -150,34 +146,34 @@ public: */ void processFilters(); - /** + /*! * Returns a list of menu actions created by the filters for the content * at the given @p position. */ QList filterActions(const QPoint& position); - /** Returns true if the cursor is set to blink or false otherwise. */ + /*! Returns true if the cursor is set to blink or false otherwise. */ bool blinkingCursor() { return _hasBlinkingCursor; } - /** Specifies whether or not the cursor blinks. */ + /*! Specifies whether or not the cursor blinks. */ void setBlinkingCursor(bool blink); void setCtrlDrag(bool enable) { _ctrlDrag=enable; } bool ctrlDrag() { return _ctrlDrag; } - /** + /*! * This enum describes the methods for selecting text when * the user triple-clicks within the display. */ enum TripleClickMode { - /** Select the whole line underneath the cursor. */ + /*! Select the whole line underneath the cursor. */ SelectWholeLine, - /** Select from the current cursor position to the end of the line. */ + /*! Select from the current cursor position to the end of the line. */ SelectForwardsFromCursor }; - /** Sets how the text is selected when the user triple clicks within the display. */ + /*! Sets how the text is selected when the user triple clicks within the display. */ void setTripleClickMode(TripleClickMode mode) { _tripleClickMode = mode; } - /** See setTripleClickSelectionMode() */ + /*! See setTripleClickSelectionMode() */ TripleClickMode tripleClickMode() { return _tripleClickMode; } void setLineSpacing(uint); @@ -185,26 +181,26 @@ public: void emitSelection(bool useXselection,bool appendReturn); - /** + /*! * This enum describes the available shapes for the keyboard cursor. * See setKeyboardCursorShape() */ enum KeyboardCursorShape { - /** A rectangular block which covers the entire area of the cursor character. */ + /*! A rectangular block which covers the entire area of the cursor character. */ BlockCursor, - /** + /*! * A single flat line which occupies the space at the bottom of the cursor * character's area. */ UnderlineCursor, - /** + /*! * An cursor shaped like the capital letter 'I', similar to the IBeam * cursor used in Qt/KDE text editors. */ IBeamCursor }; - /** + /*! * Sets the shape of the keyboard cursor. This is the cursor drawn * at the position in the terminal where keyboard input will appear. * @@ -215,12 +211,12 @@ public: * Defaults to BlockCursor */ void setKeyboardCursorShape(KeyboardCursorShape shape); - /** + /*! * Returns the shape of the keyboard cursor. See setKeyboardCursorShape() */ KeyboardCursorShape keyboardCursorShape() const; - /** + /*! * Sets the color used to draw the keyboard cursor. * * The keyboard cursor defaults to using the foreground color of the character @@ -235,21 +231,21 @@ public: */ void setKeyboardCursorColor(bool useForegroundColor , const QColor& color); - /** + /*! * Returns the color of the keyboard cursor, or an invalid color if the keyboard * cursor color is set to change according to the foreground color of the character * underneath it. */ QColor keyboardCursorColor() const; - /** + /*! * Returns the number of lines of text which can be displayed in the widget. * * This will depend upon the height of the widget and the current font. * See fontHeight() */ int lines() { return _lines; } - /** + /*! * Returns the number of characters of text which can be displayed on * each line in the widget. * @@ -258,11 +254,11 @@ public: */ int columns() { return _columns; } - /** + /*! * Returns the height of the characters in the font used to draw the text in the display. */ int fontHeight() { return _fontHeight; } - /** + /*! * Returns the width of the characters in the display. * This assumes the use of a fixed-width font. */ @@ -274,7 +270,7 @@ public: // reimplemented QSize sizeHint() const; - /** + /*! * Sets which characters, in addition to letters and numbers, * are regarded as being part of a word for the purposes * of selecting words in the display by double clicking on them. @@ -286,7 +282,7 @@ public: * of a word ( in addition to letters and numbers ). */ void setWordCharacters(const QString& wc); - /** + /*! * Returns the characters which are considered part of a word for the * purpose of selecting words in the display with the mouse. * @@ -294,7 +290,7 @@ public: */ QString wordCharacters() { return _wordCharacters; } - /** + /*! * Sets the type of effect used to alert the user when a 'bell' occurs in the * terminal session. * @@ -302,7 +298,7 @@ public: * the alert message. */ void setBellMode(int mode); - /** + /*! * Returns the type of effect used to alert the user when a 'bell' occurs in * the terminal session. * @@ -310,66 +306,66 @@ public: */ int bellMode() { return _bellMode; } - /** + /*! * This enum describes the different types of sounds and visual effects which * can be used to alert the user when a 'bell' occurs in the terminal * session. */ enum BellMode { - /** A system beep. */ + /*! A system beep. */ SystemBeepBell=0, - /** + /*! * KDE notification. This may play a sound, show a passive popup * or perform some other action depending on the user's settings. */ NotifyBell=1, - /** A silent, visual bell (eg. inverting the display's colors briefly) */ + /*! A silent, visual bell (eg. inverting the display's colors briefly) */ VisualBell=2, - /** No bell effects */ + /*! No bell effects */ NoBell=3 }; void setSelection(const QString &t); - /** + /*! * Reimplemented. Has no effect. Use setVTFont() to change the font * used to draw characters in the display. */ virtual void setFont(const QFont &); - /** Returns the font used to draw characters in the display */ + /*! Returns the font used to draw characters in the display */ QFont getVTFont() { return font(); } - /** + /*! * Sets the font used to draw the display. Has no effect if @p font * is larger than the size of the display itself. */ void setVTFont(const QFont& font); - /** + /*! * Specified whether anti-aliasing of text in the terminal display * is enabled or not. Defaults to enabled. */ static void setAntialias( bool antialias ) { _antialiasText = antialias; } - /** + /*! * Returns true if anti-aliasing of text in the terminal is enabled. */ static bool antialias() { return _antialiasText; } - /** + /*! * Sets whether or not the current height and width of the * terminal in lines and columns is displayed whilst the widget * is being resized. */ void setTerminalSizeHint(bool on) { _terminalSizeHint=on; } - /** + /*! * Returns whether or not the current height and width of * the terminal in lines and columns is displayed whilst the widget * is being resized. */ bool terminalSizeHint() { return _terminalSizeHint; } - /** + /*! * Sets whether the terminal size display is shown briefly * after the widget is first shown. * @@ -380,7 +376,7 @@ public: void setBidiEnabled(bool set) { _bidiEnabled=set; } bool isBidiEnabled() { return _bidiEnabled; } - /** + /*! * Sets the terminal screen section which is displayed in this widget. * When updateImage() is called, the display fetches the latest character image from the * the associated terminal screen window. @@ -389,44 +385,44 @@ public: * by the TerminalDisplay. */ void setScreenWindow( ScreenWindow* window ); - /** Returns the terminal screen section which is displayed in this widget. See setScreenWindow() */ + /*! Returns the terminal screen section which is displayed in this widget. See setScreenWindow() */ ScreenWindow* screenWindow() const; static bool HAVE_TRANSPARENCY; public slots: - /** + /*! * Causes the terminal display to fetch the latest character image from the associated * terminal screen ( see setScreenWindow() ) and redraw the display. */ void updateImage(); - /** + /*! * Causes the terminal display to fetch the latest line status flags from the * associated terminal screen ( see setScreenWindow() ). */ void updateLineProperties(); - /** Copies the selected text to the clipboard. */ + /*! Copies the selected text to the clipboard. */ void copyClipboard(); - /** + /*! * Pastes the content of the clipboard into the * display. */ void pasteClipboard(); - /** + /*! * Pastes the content of the selection into the * display. */ void pasteSelection(); - /** + /*! * Changes whether the flow control warning box should be shown when the flow control * stop key (Ctrl+S) are pressed. */ void setFlowControlWarningEnabled(bool enabled); - /** + /*! * Causes the widget to display or hide a message informing the user that terminal * output has been suspended (by using the flow control key combination Ctrl+S) * @@ -436,7 +432,7 @@ public slots: */ void outputSuspended(bool suspended); - /** + /*! * Sets whether the program whoose output is being displayed in the view * is interested in mouse events. * @@ -452,10 +448,10 @@ public slots: */ void setUsesMouse(bool usesMouse); - /** See setUsesMouse() */ + /*! See setUsesMouse() */ bool usesMouse() const; - /** + /*! * Shows a notification that a bell event has occurred in the terminal. * TODO: More documentation here */ @@ -463,12 +459,12 @@ public slots: signals: - /** + /*! * Emitted when the user presses a key whilst the terminal widget has focus. */ void keyPressedSignal(QKeyEvent *e); - /** + /*! * Emitted when the user presses the suspend or resume flow control key combinations * * @param suspend true if the user pressed Ctrl+S (the suspend output key combination) or @@ -476,7 +472,7 @@ signals: */ void flowControlKeyPressed(bool suspend); - /** + /*! * A mouse event occurred. * @param button The mouse button (0 for left button, 1 for middle button, 2 for right button, 3 for release) * @param column The character column where the event occurred @@ -487,7 +483,7 @@ signals: void changedFontMetricSignal(int height, int width); void changedContentSizeSignal(int height, int width); - /** + /*! * Emitted when the user right clicks on the display, or right-clicks with the Shift * key held down if usesMouse() is true. * @@ -756,3 +752,4 @@ public: } #endif // TERMINALDISPLAY_H + diff --git a/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.cpp b/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.cpp index 6cbb360..a7c1ae5 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.cpp @@ -1,25 +1,21 @@ -/* - This file is part of Konsole, an X terminal. - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - Additional fixes for BaulkTerm by Jacob Alexander (HaaTa) , Copyright (C) 2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Own #include "Vt102Emulation.h" diff --git a/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.h b/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.h index 4554c1b..784bed8 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.h +++ b/src/Widgets/BaulkTerm/qtermwidget/Vt102Emulation.h @@ -1,26 +1,23 @@ -/* - This file is part of Konsole, an X terminal. - - Copyright (C) 2007 by Robert Knight - Copyright (C) 1997,1998 by Lars Doelle - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. -*/ +// This file is part of Konsole, an X terminal. +// +// Copyright (C) 2007 by Robert Knight +// Copyright (C) 1997,1998 by Lars Doelle +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef VT102EMULATION_H #define VT102EMULATION_H @@ -66,7 +63,7 @@ struct CharCodes bool sa_pound; // saved pound }; -/** +/*! * Provides an xterm compatible terminal emulation based on the DEC VT102 terminal. * A full description of this terminal can be found at http://vt100.net/docs/vt102-ug/ * @@ -82,7 +79,7 @@ Q_OBJECT public: - /** Constructs a new emulation */ + /*! Constructs a new emulation */ Vt102Emulation(); ~Vt102Emulation(); @@ -190,3 +187,4 @@ private: } #endif // VT102EMULATION_H + diff --git a/src/Widgets/BaulkTerm/qtermwidget/k3process.cpp b/src/Widgets/BaulkTerm/qtermwidget/k3process.cpp index de91d57..a406b9f 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/k3process.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/k3process.cpp @@ -1,25 +1,21 @@ -/* - This file is part of the KDE libraries - Copyright (C) 1997 Christian Czezatke (e9025461@student.tuwien.ac.at) - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - +// This file is part of the KDE libraries +// Copyright (C) 1997 Christian Czezatke (e9025461@student.tuwien.ac.at) +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #include "k3process.h" //#include @@ -1051,3 +1047,4 @@ bool K3ShellProcess::start(RunMode runmode, Communication comm) //#include "moc_k3process.cpp" + diff --git a/src/Widgets/BaulkTerm/qtermwidget/k3process.h b/src/Widgets/BaulkTerm/qtermwidget/k3process.h index f8388ea..5d32daa 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/k3process.h +++ b/src/Widgets/BaulkTerm/qtermwidget/k3process.h @@ -1,23 +1,21 @@ -/* This file is part of the KDE libraries - Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +// This file is part of the KDE libraries +// Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef K3PROCESS_H #define K3PROCESS_H @@ -33,7 +31,7 @@ class QSocketNotifier; class K3ProcessPrivate; class KPty; -/** +/*! * @obsolete Use KProcess and KPtyProcess instead. * * Child process invocation, monitoring and control. @@ -123,14 +121,14 @@ class KPty; * * @author Christian Czezatke e9025461@student.tuwien.ac.at * - **/ + */ class K3Process : public QObject { Q_OBJECT public: - /** + /*! * Modes in which the communication channels can be opened. * * If communication for more than one channel is required, @@ -140,18 +138,18 @@ public: * */ enum CommunicationFlag { - NoCommunication = 0, /**< No communication with the process. */ - Stdin = 1, /**< Connect to write to the process with writeStdin(). */ - Stdout = 2, /**< Connect to read from the process' output. */ - Stderr = 4, /**< Connect to read from the process' stderr. */ - AllOutput = 6, /**< Connects to all output channels. */ - All = 7, /**< Connects to all channels. */ - NoRead = 8, /**< If specified with Stdout, no data is actually read from stdout, + NoCommunication = 0, /*!< No communication with the process. */ + Stdin = 1, /*!< Connect to write to the process with writeStdin(). */ + Stdout = 2, /*!< Connect to read from the process' output. */ + Stderr = 4, /*!< Connect to read from the process' stderr. */ + AllOutput = 6, /*!< Connects to all output channels. */ + All = 7, /*!< Connects to all channels. */ + NoRead = 8, /*!< If specified with Stdout, no data is actually read from stdout, * only the signal receivedStdout(int fd, int &len) is emitted. */ - CTtyOnly = NoRead, /**< Tells setUsePty() to create a PTY for the process + CTtyOnly = NoRead, /*!< Tells setUsePty() to create a PTY for the process * and make it the process' controlling TTY, but does not * redirect any I/O channel to the PTY. */ - MergedStderr = 16 /**< If specified with Stdout, the process' stderr will be + MergedStderr = 16 /*!< If specified with Stdout, the process' stderr will be * redirected onto the same file handle as its stdout, i.e., * all error output will be signalled with receivedStdout(). * Don't specify Stderr if you specify MergedStderr. */ @@ -159,36 +157,36 @@ public: Q_DECLARE_FLAGS(Communication, CommunicationFlag) - /** + /*! * Run-modes for a child process. */ enum RunMode { - /** + /*! * The application does not receive notifications from the subprocess when * it is finished or aborted. */ DontCare, - /** + /*! * The application is notified when the subprocess dies. */ NotifyOnExit, - /** + /*! * The application is suspended until the started process is finished. */ Block, - /** + /*! * Same as NotifyOnExit, but the process is run in an own session, * just like with DontCare. */ OwnGroup }; - /** + /*! * Constructor */ explicit K3Process( QObject* parent=0L ); - /** + /*! *Destructor: * * If the process is running when the destructor for this class @@ -198,7 +196,7 @@ public: */ virtual ~K3Process(); - /** + /*! * Sets the executable and the command line argument list for this process. * * For example, doing an "ls -l /usr/local/bin" can be achieved by: @@ -210,34 +208,34 @@ public: * * @param arg the argument to add * @return a reference to this K3Process - **/ + */ K3Process &operator<<(const QString& arg); - /** + /*! * Similar to previous method, takes a char *, supposed to be in locale 8 bit already. */ K3Process &operator<<(const char * arg); - /** + /*! * Similar to previous method, takes a QByteArray, supposed to be in locale 8 bit already. * @param arg the argument to add * @return a reference to this K3Process */ K3Process &operator<<(const QByteArray & arg); - /** + /*! * Sets the executable and the command line argument list for this process, * in a single method call, or add a list of arguments. * @param args the arguments to add * @return a reference to this K3Process - **/ + */ K3Process &operator<<(const QStringList& args); - /** + /*! * Clear a command line argument list that has been set by using * operator<<. */ void clearArguments(); - /** + /*! * Starts the process. * For a detailed description of the * various run modes and communication semantics, have a look at the @@ -262,11 +260,11 @@ public: * * @return true on success, false on error * (see above for error conditions) - **/ + */ virtual bool start(RunMode runmode = NotifyOnExit, Communication comm = NoCommunication); - /** + /*! * Stop the process (by sending it a signal). * * @param signo The signal to send. The default is SIGTERM. @@ -274,13 +272,13 @@ public: */ virtual bool kill(int signo = SIGTERM); - /** + /*! * Checks whether the process is running. * @return true if the process is (still) considered to be running */ bool isRunning() const; - /** Returns the process id of the process. + /*! Returns the process id of the process. * * If it is called after * the process has exited, it returns the process id of the last @@ -289,20 +287,20 @@ public: * Calling it before any child process has been started by this * K3Process instance causes pid() to return 0. * @return the pid of the process or 0 if no process has been started yet. - **/ + */ pid_t pid() const; - /** + /*! * Suspend processing of data from stdout of the child process. */ void suspend(); - /** + /*! * Resume processing of data from stdout of the child process. */ void resume(); - /** + /*! * Suspend execution of the current thread until the child process dies * or the timeout hits. This function is not recommended for programs * with a GUI. @@ -311,7 +309,7 @@ public: */ bool wait(int timeout = -1); - /** + /*! * Checks whether the process exited cleanly. * * @return true if the process has already finished and has exited @@ -319,7 +317,7 @@ public: */ bool normalExit() const; - /** + /*! * Checks whether the process was killed by a signal. * * @return true if the process has already finished and has not exited @@ -327,7 +325,7 @@ public: */ bool signalled() const; - /** + /*! * Checks whether a killed process dumped core. * * @return true if signalled() returns true and the process @@ -336,7 +334,7 @@ public: */ bool coreDumped() const; - /** + /*! * Returns the exit status of the process. * * @return the exit status of the process. Note that this value @@ -344,7 +342,7 @@ public: */ int exitStatus() const; - /** + /*! * Returns the signal the process was killed by. * * @return the signal number that caused the process to exit. @@ -352,7 +350,7 @@ public: */ int exitSignal() const; - /** + /*! * Transmit data to the child process' stdin. * * This function may return false in the following cases: @@ -381,10 +379,10 @@ public: * @param buffer the buffer to write * @param buflen the length of the buffer * @return false if an error has occurred - **/ + */ bool writeStdin(const char *buffer, int buflen); - /** + /*! * Shuts down the Stdin communication link. If no pty is used, this * causes "EOF" to be indicated on the child's stdin file descriptor. * @@ -392,7 +390,7 @@ public: */ bool closeStdin(); - /** + /*! * Shuts down the Stdout communication link. If no pty is used, any further * attempts by the child to write to its stdout file descriptor will cause * it to receive a SIGPIPE. @@ -401,7 +399,7 @@ public: */ bool closeStdout(); - /** + /*! * Shuts down the Stderr communication link. If no pty is used, any further * attempts by the child to write to its stderr file descriptor will cause * it to receive a SIGPIPE. @@ -410,7 +408,7 @@ public: */ bool closeStderr(); - /** + /*! * Deletes the optional utmp entry and closes the pty. * * Make sure to shut down any communication links that are using the pty @@ -420,7 +418,7 @@ public: */ bool closePty(); - /** + /*! * @brief Close stdin, stdout, stderr and the pty * * This is the same that calling all close* functions in a row: @@ -428,13 +426,13 @@ public: */ void closeAll(); - /** + /*! * Lets you see what your arguments are for debugging. * @return the list of arguments */ const QList &args() /* const */ { return arguments; } - /** + /*! * Controls whether the started process should drop any * setuid/setgid privileges or whether it should keep them. * Note that this function is mostly a dummy, as the KDE libraries @@ -445,14 +443,14 @@ public: */ void setRunPrivileged(bool keepPrivileges); - /** + /*! * Returns whether the started process will drop any * setuid/setgid privileges or whether it will keep them. * @return true if the process runs privileged */ bool runPrivileged() const; - /** + /*! * Adds the variable @p name to the process' environment. * This function must be called before starting the process. * @param name the name of the environment variable @@ -460,7 +458,7 @@ public: */ void setEnvironment(const QString &name, const QString &value); - /** + /*! * Changes the current working directory (CWD) of the process * to be started. * This function must be called before starting the process. @@ -468,7 +466,7 @@ public: */ void setWorkingDirectory(const QString &dir); - /** + /*! * Specify whether to start the command via a shell or directly. * The default is to start the command directly. * If @p useShell is true @p shell will be used as shell, or @@ -485,7 +483,7 @@ public: */ void setUseShell(bool useShell, const char *shell = 0); - /** + /*! * This function can be used to quote an argument string such that * the shell processes it properly. This is e. g. necessary for * user-provided file names which may contain spaces or quotes. @@ -495,7 +493,7 @@ public: */ static QString quote(const QString &arg); - /** + /*! * Detaches K3Process from child process. All communication is closed. * No exit notification is emitted any more for the child process. * Deleting the K3Process will no longer kill the child process. @@ -504,7 +502,7 @@ public: */ void detach(); - /** + /*! * Specify whether to create a pty (pseudo-terminal) for running the * command. * This function should be called before starting the process. @@ -516,7 +514,7 @@ public: */ void setUsePty(Communication comm, bool addUtmp); - /** + /*! * Obtains the pty object used by this process. The return value is * valid only after setUsePty() was used with a non-zero argument. * The pty is open only while the process is running. @@ -524,13 +522,13 @@ public: */ KPty *pty() const; - /** + /*! * More or less intuitive constants for use with setPriority(). */ enum { PrioLowest = 20, PrioLow = 10, PrioLower = 5, PrioNormal = 0, PrioHigher = -5, PrioHigh = -10, PrioHighest = -19 }; - /** + /*! * Sets the scheduling priority of the process. * @param prio the new priority in the range -20 (high) to 19 (low). * @return false on error; see setpriority(2) for possible reasons. @@ -538,16 +536,16 @@ public: bool setPriority(int prio); Q_SIGNALS: - /** + /*! * Emitted after the process has terminated when * the process was run in the @p NotifyOnExit (==default option to * start() ) or the Block mode. * @param proc a pointer to the process that has exited - **/ + */ void processExited(K3Process *proc); - /** + /*! * Emitted, when output from the child process has * been received on stdout. * @@ -564,10 +562,10 @@ Q_SIGNALS: * \code * QString myBuf = QLatin1String(buffer, buflen); * \endcode - **/ + */ void receivedStdout(K3Process *proc, char *buffer, int buflen); - /** + /*! * Emitted when output from the child process has * been received on stdout. * @@ -584,11 +582,11 @@ Q_SIGNALS: * @param fd the file descriptor that provides the data * @param len the number of bytes that have been read from @p fd must * be written here - **/ + */ void receivedStdout(int fd, int &len); // KDE4: change, broken API - /** + /*! * Emitted, when output from the child process has * been received on stderr. * @@ -601,35 +599,35 @@ Q_SIGNALS: * @param proc a pointer to the process that has received the data * @param buffer The data received. * @param buflen The number of bytes that are available. - **/ + */ void receivedStderr(K3Process *proc, char *buffer, int buflen); - /** + /*! * Emitted after all the data that has been * specified by a prior call to writeStdin() has actually been * written to the child process. * @param proc a pointer to the process - **/ + */ void wroteStdin(K3Process *proc); protected Q_SLOTS: - /** + /*! * This slot gets activated when data from the child's stdout arrives. * It usually calls childOutput(). * @param fdno the file descriptor for the output */ void slotChildOutput(int fdno); - /** + /*! * This slot gets activated when data from the child's stderr arrives. * It usually calls childError(). * @param fdno the file descriptor for the output */ void slotChildError(int fdno); - /** + /*! * Called when another bulk of data can be sent to the child's * stdin. If there is no more data to be sent to stdin currently * available, this function must disable the QSocketNotifier innot. @@ -639,23 +637,23 @@ protected Q_SLOTS: protected: - /** + /*! * Sets up the environment according to the data passed via * setEnvironment() */ void setupEnvironment(); - /** + /*! * The list of the process' command line arguments. The first entry * in this list is the executable itself. */ QList arguments; - /** + /*! * How to run the process (Block, NotifyOnExit, DontCare). You should * not modify this data member directly from derived classes. */ RunMode run_mode; - /** + /*! * true if the process is currently running. You should not * modify this data member directly from derived classes. Please use * isRunning() for reading the value of this data member since it @@ -663,7 +661,7 @@ protected: */ bool runs; - /** + /*! * The PID of the currently running process. * You should not modify this data member in derived classes. * Please use pid() instead of directly accessing this @@ -672,7 +670,7 @@ protected: */ pid_t pid_; - /** + /*! * The process' exit status as returned by waitpid(). You should not * modify the value of this data member from derived classes. You should * rather use exitStatus() than accessing this data member directly @@ -682,14 +680,14 @@ protected: int status; - /** + /*! * If false, the child process' effective uid & gid will be reset to the * real values. * @see setRunPrivileged() */ bool keepPrivs; - /** + /*! * This function is called from start() right before a fork() takes * place. According to the @p comm parameter this function has to initialize * the in, out and err data members of K3Process. @@ -703,7 +701,7 @@ protected: */ virtual int setupCommunication(Communication comm); - /** + /*! * Called right after a (successful) fork() on the parent side. This function * will usually do some communications cleanup, like closing in[0], * out[1] and out[1]. @@ -717,7 +715,7 @@ protected: */ virtual int commSetupDoneP(); - /** + /*! * Called right after a (successful) fork(), but before an exec() on the child * process' side. It usually duplicates the in[0], out[1] and * err[1] file handles to the respective standard I/O handles. @@ -725,7 +723,7 @@ protected: virtual int commSetupDoneC(); - /** + /*! * Immediately called after a successfully started process in NotifyOnExit * mode has exited. This function normally calls commClose() * and emits the processExited() signal. @@ -733,7 +731,7 @@ protected: */ virtual void processHasExited(int state); - /** + /*! * Cleans up the communication links to the child after it has exited. * This function should act upon the values of pid() and runs. * See the kprocess.cpp source for details. @@ -768,73 +766,73 @@ protected: */ // virtual void commDrain(int notfd); - /** + /*! * Specify the actual executable that should be started (first argument to execve) * Normally the the first argument is the executable but you can * override that with this function. */ void setBinaryExecutable(const char *filename); - /** + /*! * The socket descriptors for stdout. */ int out[2]; - /** + /*! * The socket descriptors for stdin. */ int in[2]; - /** + /*! * The socket descriptors for stderr. */ int err[2]; - /** + /*! * The socket notifier for in[1]. */ QSocketNotifier *innot; - /** + /*! * The socket notifier for out[0]. */ QSocketNotifier *outnot; - /** + /*! * The socket notifier for err[0]. */ QSocketNotifier *errnot; - /** + /*! * Lists the communication links that are activated for the child * process. Should not be modified from derived classes. */ Communication communication; - /** + /*! * Called by slotChildOutput() this function copies data arriving from * the child process' stdout to the respective buffer and emits the signal * receivedStdout(). */ int childOutput(int fdno); - /** + /*! * Called by slotChildError() this function copies data arriving from * the child process' stderr to the respective buffer and emits the signal * receivedStderr(). */ int childError(int fdno); - /** + /*! * The buffer holding the data that has to be sent to the child */ const char *input_data; - /** + /*! * The number of bytes already transmitted */ int input_sent; - /** + /*! * The total length of input_data */ int input_total; - /** + /*! * K3ProcessController is a friend of K3Process because it has to have * access to various data members. */ @@ -848,7 +846,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(K3Process::Communication) class K3ShellProcessPrivate; -/** +/*! * @obsolete * * Use K3Process and K3Process::setUseShell(true) instead. @@ -863,14 +861,14 @@ class K3ShellProcess : public K3Process public: - /** + /*! * Constructor * * If no shellname is specified, the user's default shell is used. */ explicit K3ShellProcess(const char *shellname=0); - /** + /*! * Destructor. */ ~K3ShellProcess(); diff --git a/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.cpp b/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.cpp index ccc53c4..baea618 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.cpp @@ -1,23 +1,21 @@ -/* This file is part of the KDE libraries - Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +// This file is part of the KDE libraries +// Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #include "k3processcontroller.h" #include "k3process.h" @@ -332,3 +330,4 @@ void K3ProcessController::addProcess( int pid ) } //#include "moc_k3processcontroller.cpp" + diff --git a/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.h b/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.h index c077af2..36aa54b 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.h +++ b/src/Widgets/BaulkTerm/qtermwidget/k3processcontroller.h @@ -1,23 +1,21 @@ -/* This file is part of the KDE libraries - Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +// This file is part of the KDE libraries +// Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef K3PROCCTRL_H #define K3PROCCTRL_H @@ -26,7 +24,7 @@ #include -/** +/*! * @short Used internally by K3Process * @internal * @author Christian Czezatke @@ -41,25 +39,25 @@ class K3ProcessController : public QObject Q_OBJECT public: - /** + /*! * Create an instance if none exists yet. * Called by KApplication::KApplication() */ static void ref(); - /** + /*! * Destroy the instance if one exists and it is not referenced any more. * Called by KApplication::~KApplication() */ static void deref(); - /** + /*! * Only a single instance of this class is allowed at a time. * This method provides access to that instance. */ static K3ProcessController *instance(); - /** + /*! * Automatically called upon SIGCHLD. Never call it directly. * If your application (or some library it uses) redirects SIGCHLD, * the new signal handler (and only it) should call the old handler @@ -68,7 +66,7 @@ public: */ static void theSigCHLDHandler(int signal); // KDE4: private - /** + /*! * Wait for any process to exit and handle their exit without * starting an event loop. * This function may cause K3Process to emit any of its signals. @@ -79,13 +77,13 @@ public: */ bool waitForProcessExit(int timeout); - /** + /*! * Call this function to defer processing of the data that became available * on notifierFd(). */ void unscheduleCheck(); - /** + /*! * This function @em must be called at some point after calling * unscheduleCheck(). */ @@ -99,15 +97,15 @@ public: */ int notifierFd() const; - /** + /*! * @internal */ void addKProcess( K3Process* ); - /** + /*! * @internal */ void removeKProcess( K3Process* ); - /** + /*! * @internal */ void addProcess( int pid ); diff --git a/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.cpp b/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.cpp index e4ef117..1c47ca9 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.cpp @@ -214,3 +214,4 @@ int string_width( const QString &txt ) w += konsole_wcwidth( txt[ i ].unicode() ); return w; } + diff --git a/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.h b/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.h index 6f4e46a..1153db8 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.h +++ b/src/Widgets/BaulkTerm/qtermwidget/konsole_wcwidth.h @@ -22,3 +22,4 @@ int konsole_wcwidth_cjk(Q_UINT16 ucs); int string_width( const QString &txt ); #endif + diff --git a/src/Widgets/BaulkTerm/qtermwidget/kpty.cpp b/src/Widgets/BaulkTerm/qtermwidget/kpty.cpp index 62d3cab..f1a4e26 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/kpty.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/kpty.cpp @@ -1,26 +1,22 @@ -/* - - This file is part of the KDE libraries - Copyright (C) 2002 Waldo Bastian - Copyright (C) 2002-2003,2007 Oswald Buddenhagen - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +// This file is part of the KDE libraries +// Copyright (C) 2002 Waldo Bastian +// Copyright (C) 2002-2003,2007 Oswald Buddenhagen +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #include "kpty_p.h" @@ -622,3 +618,4 @@ int KPty::slaveFd() const return d->slaveFd; } + diff --git a/src/Widgets/BaulkTerm/qtermwidget/kpty.h b/src/Widgets/BaulkTerm/qtermwidget/kpty.h index 8286834..3b683cc 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/kpty.h +++ b/src/Widgets/BaulkTerm/qtermwidget/kpty.h @@ -1,24 +1,22 @@ -/* This file is part of the KDE libraries - - Copyright (C) 2003,2007 Oswald Buddenhagen - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ +// This file is part of the KDE libraries +// +// Copyright (C) 2003,2007 Oswald Buddenhagen +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef kpty_h #define kpty_h @@ -28,7 +26,7 @@ struct KPtyPrivate; struct termios; -/** +/*! * Provides primitives for opening & closing a pseudo TTY pair, assigning the * controlling TTY, utmp registration and setting various terminal attributes. */ @@ -37,12 +35,12 @@ class KPty { public: - /** + /*! * Constructor */ KPty(); - /** + /*! * Destructor: * * If the pty is still open, it will be closed. Note, however, that @@ -50,19 +48,19 @@ public: */ ~KPty(); - /** + /*! * Create a pty master/slave pair. * * @return true if a pty pair was successfully opened */ bool open(); - /** + /*! * Close the pty master/slave pair. */ void close(); - /** + /*! * Close the pty slave descriptor. * * When creating the pty, KPty also opens the slave and keeps it open. @@ -76,13 +74,13 @@ public: */ void closeSlave(); - /** + /*! * Creates a new session and process group and makes this pty the * controlling tty. */ void setCTty(); - /** + /*! * Creates an utmp entry for the tty. * This function must be called after calling setCTty and * making this pty the stdin. @@ -94,12 +92,12 @@ public: */ void login(const char *user = 0, const char *remotehost = 0); - /** + /*! * Removes the utmp entry for this tty. */ void logout(); - /** + /*! * Wrapper around tcgetattr(3). * * This function can be used only while the PTY is open. @@ -114,7 +112,7 @@ public: */ bool tcGetAttr(struct ::termios *ttmode) const; - /** + /*! * Wrapper around tcsetattr(3) with mode TCSANOW. * * This function can be used only while the PTY is open. @@ -125,7 +123,7 @@ public: */ bool tcSetAttr(struct ::termios *ttmode); - /** + /*! * Change the logical (screen) size of the pty. * The default is 24 lines by 80 columns. * @@ -137,7 +135,7 @@ public: */ bool setWinSize(int lines, int columns); - /** + /*! * Set whether the pty should echo input. * * Echo is on by default. @@ -151,21 +149,21 @@ public: */ bool setEcho(bool echo); - /** + /*! * @return the name of the slave pty device. * * This function should be called only while the pty is open. */ const char *ttyName() const; - /** + /*! * @return the file descriptor of the master pty * * This function should be called only while the pty is open. */ int masterFd() const; - /** + /*! * @return the file descriptor of the slave pty * * This function should be called only while the pty slave is open. @@ -173,12 +171,12 @@ public: int slaveFd() const; protected: - /** + /*! * @internal */ KPty(KPtyPrivate *d); - /** + /*! * @internal */ KPtyPrivate * const d_ptr; diff --git a/src/Widgets/BaulkTerm/qtermwidget/kpty_p.h b/src/Widgets/BaulkTerm/qtermwidget/kpty_p.h dissimilarity index 76% index 1702b44..053f8e6 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/kpty_p.h +++ b/src/Widgets/BaulkTerm/qtermwidget/kpty_p.h @@ -1,44 +1,43 @@ -/* This file is part of the KDE libraries - - Copyright (C) 2003,2007 Oswald Buddenhagen - - Rewritten for QT4 by e_k , Copyright (C)2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef kpty_p_h -#define kpty_p_h - -#include "kpty.h" - -#include - -struct KPtyPrivate { - Q_DECLARE_PUBLIC(KPty) - - KPtyPrivate(); - bool chownpty(bool grant); - - int masterFd; - int slaveFd; - - QByteArray ttyName; - - KPty *q_ptr; -}; - -#endif +// This file is part of the KDE libraries +// +// Copyright (C) 2003,2007 Oswald Buddenhagen +// +// Rewritten for QT4 by e_k , Copyright (C)2008 +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#ifndef kpty_p_h +#define kpty_p_h + +#include "kpty.h" + +#include + +struct KPtyPrivate { + Q_DECLARE_PUBLIC(KPty) + + KPtyPrivate(); + bool chownpty(bool grant); + + int masterFd; + int slaveFd; + + QByteArray ttyName; + + KPty *q_ptr; +}; + +#endif + diff --git a/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.cpp b/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.cpp index 2b4679e..d9763fd 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.cpp +++ b/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.cpp @@ -1,23 +1,18 @@ -/* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) - - Additional fixes for BaulkTerm by Jacob Alexander (HaaTa) , Copyright (C) 2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - +// Copyright (C) 2008 e_k (e_k@users.sourceforge.net) +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #include "qtermwidget.h" diff --git a/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.h b/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.h index 746e434..e62bac2 100644 --- a/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.h +++ b/src/Widgets/BaulkTerm/qtermwidget/qtermwidget.h @@ -1,23 +1,18 @@ -/* Copyright (C) 2008 e_k (e_k@users.sourceforge.net) - - Additional fixes for BaulkTerm by Jacob Alexander (HaaTa) , Copyright (C) 2008 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - +// Copyright (C) 2008 e_k (e_k@users.sourceforge.net) +// Forked for Baulk - Copyright (C) 2008-2009 - Jacob Alexander +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// any later version, including version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . #ifndef _Q_TERM_WIDGET #define _Q_TERM_WIDGET @@ -37,102 +32,102 @@ public: enum ScrollBarPosition { - /** Do not show the scroll bar. */ + /*! Do not show the scroll bar. */ NoScrollBar=0, - /** Show the scroll bar on the left side of the display. */ + /*! Show the scroll bar on the left side of the display. */ ScrollBarLeft=1, - /** Show the scroll bar on the right side of the display. */ + /*! Show the scroll bar on the right side of the display. */ ScrollBarRight=2 }; - // Terminal Title + //! Terminal Title QString terminalTitle() const; - //Creation of widget + //! Creation of widget QTermWidget(int startnow = 1, //start shell programm immediatelly QWidget *parent = 0); ~QTermWidget(); - //start shell program if it was not started in constructor + //! start shell program if it was not started in constructor void startShellProgram(); //look-n-feel, if you don`t like defaults - //environment + //! environment void setEnvironment(const QStringList& environment); - // Shell program, default is /bin/bash + //! Shell program, default is /bin/bash void setShellProgram(QString &progname); - // Shell program args, default is none + //! Shell program args, default is none void setArgs(QStringList &args); - //Text codec, default is UTF-8 + //! Text codec, default is UTF-8 void setTextCodec(QTextCodec *codec); - //Color scheme, default is white on black + //! Color scheme, default is white on black void setColorScheme(int scheme); - //set size + //! set size void setSize(int h, int v); - // History Type/Size for scrolling - // Types: - // HistoryTypeNone - No History (Default) - // HistoryTypeBlockArray - (Uses lines arg) - // HistoryTypeFile - Allows for unlimited history, slowest - // HistoryTypeBuffer - Limited length buffer (uses line arg) + //! History Type/Size for scrolling + //! Types: + //! - HistoryTypeNone - No History (Default) + //! - HistoryTypeBlockArray - (Uses lines arg) + //! - HistoryTypeFile - Allows for unlimited history, slowest + //! - HistoryTypeBuffer - Limited length buffer (uses line arg) void setHistoryType( QString type = "HistoryTypeNone", int lines = 0 ); - // Presence of scrollbar + //! Presence of scrollbar void setScrollBarPosition(ScrollBarPosition); - // Send some text to terminal + //! Send some text to terminal void sendText(QString &text); - // Sets whether flow control is enabled + //! Sets whether flow control is enabled void setFlowControlEnabled(bool enabled); - // Returns whether flow control is enabled + //! Returns whether flow control is enabled bool flowControlEnabled(void); - /** + /*! * Sets whether the flow control warning box should be shown * when the flow control stop key (Ctrl+S) is pressed. */ void setFlowControlWarningEnabled(bool enabled); - // Individual Colour Control - // See ColorTables.h for numbers + //! Individual Colour Control + //! See ColorTables.h for numbers void setColor( int colorNumber, QColor color, bool transparency, bool bold ); - // Real Transparency - // Opacity Setting - Window Manager must support Compositing + //! Real Transparency + //! Opacity Setting - Window Manager must support Compositing void setOpacity( qreal opacity ); signals: - // Terminal Closed + //! Terminal Closed void finished(); - // Title Updated + //! Title Updated void terminalTitleUpdate( QString title ); - // Mouse Click + //! Mouse Click void mouseSignal( int button, int column, int line, int eventType ); void rightClickAction(); public slots: - // Paste clipboard content to terminal + //! Paste clipboard content to terminal void copyClipboard(); - // Copies selection to clipboard + //! Copies selection to clipboard void pasteClipboard(); - // Updates Display Image, useful for forcing terminal display updates + //! Updates Display Image, useful for forcing terminal display updates void updateImage(); - // Terminal font - // Default is application font with family Monospace, size 10 + //! Terminal font + //! Default is application font with family Monospace, size 10 void setTerminalFont(QFont font); protected: diff --git a/src/Widgets/BaulkTerm/wrapper/baulkterm.h b/src/Widgets/BaulkTerm/wrapper/baulkterm.h index d67c298..4f020ce 100644 --- a/src/Widgets/BaulkTerm/wrapper/baulkterm.h +++ b/src/Widgets/BaulkTerm/wrapper/baulkterm.h @@ -39,49 +39,51 @@ #include "rightclickmenu.h" #include "terminalcolour.h" -/** - * @author Jacob Alexander (HaaTa) - * - * Additional functionality for qtermwidget - */ +//! Additional functionality for qtermwidget class BaulkTerm : public BaulkWidget { Q_OBJECT public: + //! Default Constructor + /*! + * \param startNow 1 for starting the terminal right away, 0 for starting later + * \see startShellProgram + * \param standalone true if the terminal is started in standalone mode, false if used as a library + */ BaulkTerm( int startNow = 1, bool standalone = false, QWidget *parent = 0 ); - // Command Line Args + //! Command Line Args virtual bool processCommandArgs(); - // Start Terminal + //! Start Terminal void startShellProgram(); - // External Settings + //! External Settings bool useDaemon() const { return daemonEnabled; } QString listenName() const { return daemonListenName; } public slots: - // New Terminal + //! New Terminal void newTerminal( bool useMainWindow = false ); private: int startPriority; - // Terminal + //! Terminal QTermWidget *term; QTermWidget *mainTerm; QList termList; QVBoxLayout *termLayout; - // Terminal Right Click Menu + //! Terminal Right Click Menu BaulkTermRightClickMenu *rightClickMenu; - // Configuration File Pointer + //! Configuration File Pointer BaulkXML *xmlConfig; - // Configuration Settings + //! Configuration Settings qreal opacity; qreal fadeOpacity; @@ -103,7 +105,7 @@ private: QString shellProgram; QStringList environmentVariables; - // Normal Colours + //! Normal Colours TerminalColour foreground; TerminalColour background; TerminalColour black; @@ -115,7 +117,7 @@ private: TerminalColour cyan; TerminalColour white; - // Intensive Colours + //! Intensive Colours TerminalColour intForeground; TerminalColour intBackground; TerminalColour intBlack; @@ -128,7 +130,7 @@ private: TerminalColour intWhite; - // Configuration Functions + //! Configuration Functions void configurationDefaults(); void configurationLoad(); void configurationSave(); diff --git a/src/Widgets/BaulkTerm/wrapper/main.cpp b/src/Widgets/BaulkTerm/wrapper/main.cpp index 9ecf29c..0f98552 100644 --- a/src/Widgets/BaulkTerm/wrapper/main.cpp +++ b/src/Widgets/BaulkTerm/wrapper/main.cpp @@ -23,23 +23,21 @@ #include "baulkterm.h" -/// Baulk Declaration for use in handler.h +//! Baulk Declaration for use in handler.h BaulkTerm *baulk; #include #include -/** - * @author Jacob Alexander (HaaTa) - * +/*! * First point of entry, which passes to baulk.h. * Captures all debug output for this instance of Baulk. */ int main( int argc, char *argv[] ) { - // Message Handler + //! Message Handler qInstallMsgHandler( handler ); - // Compositing Information + //! Compositing Information Display* display = 0; Visual* visual = 0; Colormap colormap = 0; diff --git a/src/Widgets/BaulkTerm/wrapper/rightclickmenu.h b/src/Widgets/BaulkTerm/wrapper/rightclickmenu.h index 3406e0d..3f989c3 100644 --- a/src/Widgets/BaulkTerm/wrapper/rightclickmenu.h +++ b/src/Widgets/BaulkTerm/wrapper/rightclickmenu.h @@ -27,15 +27,12 @@ #include "baulkdialog.h" -/** - * @author Jacob Alexander (HaaTa) - * - * The menu available when the user right clicks on the terminal session - */ +//! The menu available when the user right clicks on the terminal session class BaulkTermRightClickMenu : public QMenu { Q_OBJECT public: + //! Default Constructor BaulkTermRightClickMenu( QWidget *parent = 0 ); QAction *copyAction; @@ -44,7 +41,9 @@ public: QAction *transparencyAction; private slots: + //! Font Dialog Call void fontDialog(); + //! Transparency Dialog Call void transparencyDialog(); signals: diff --git a/src/Widgets/BaulkTerm/wrapper/terminalcolour.h b/src/Widgets/BaulkTerm/wrapper/terminalcolour.h index 937de71..53be329 100644 --- a/src/Widgets/BaulkTerm/wrapper/terminalcolour.h +++ b/src/Widgets/BaulkTerm/wrapper/terminalcolour.h @@ -15,11 +15,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -/** - * @author Jacob Alexander (HaaTa) - * - * A container for Terminal Colours - * +//! A container for Terminal Colours +/*! * Contains, QColor, transparency bool, and bold bool */ @@ -33,27 +30,39 @@ class TerminalColour { public: - // Constructors + //! Default Constructor TerminalColour(); + //! Convenience Constructor + /*! + * The same as setOptions + * \param useColour colour to set \see setColour + * \param useTransparency \see setTransparency + * \param useBold \see useBold + */ TerminalColour( QColor useColour, bool useTransparency, bool useBold ); - // Colour + //! Colour QColor colour() const; void setColour( QColor useColour ); - // Bold + //! Bold bool bold() const; void setBold( bool useBold ); - // Transparency + //! Transparency bool transparency() const; void setTransparency( bool useTransparency ); - // Encompassing + //! !String representation QString toString() const; + //! QVariant representation QVariant toVariant() const; + + //! Convience set for Colour, Transparency and Bold void setOptions( QColor useColour, bool useTransparency, bool useBold ); + //! Set options from QString representation void setFromString( QString config ); + //! Set options from QVariant representation void setFromVariant( QVariant config ); private: diff --git a/src/Widgets/BaulkTerm/wrapper/wrapper_baulkterm.h b/src/Widgets/BaulkTerm/wrapper/wrapper_baulkterm.h index bbab42d..25cb83f 100644 --- a/src/Widgets/BaulkTerm/wrapper/wrapper_baulkterm.h +++ b/src/Widgets/BaulkTerm/wrapper/wrapper_baulkterm.h @@ -32,12 +32,8 @@ #include "baulkterm.h" -/** - * @author Jacob Alexander (HaaTa) - * - * DLL Wrapper for qtermwidget, for use in Baulk. - */ // Exported Symbols ******************************************************************************* +//! DLL Wrapper for qtermwidget, for use in Baulk. extern "C" EXPORTDLL { QStringList symbolList(); diff --git a/src/Widgets/WebBaulk/common.h b/src/Widgets/WebBaulk/common.h index c54e7ea..098a6b3 100644 --- a/src/Widgets/WebBaulk/common.h +++ b/src/Widgets/WebBaulk/common.h @@ -15,22 +15,20 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -/** - * @author Jacob Alexander (HaaTa) - * - * Common Functions and Classes for WebBaulk - */ - #ifndef __COMMON_H #define __COMMON_H #include #include +// Common Functions and Classes for WebBaulk + +//! ToolButton Convenience class class ToolButton : public QToolButton { Q_OBJECT public: + //! Constructor allowing for text to be added directly ToolButton( QString text, QWidget *parent = 0 ); }; diff --git a/src/Widgets/WebBaulk/webbaulk.h b/src/Widgets/WebBaulk/webbaulk.h index 2a47a9f..1ccec13 100644 --- a/src/Widgets/WebBaulk/webbaulk.h +++ b/src/Widgets/WebBaulk/webbaulk.h @@ -36,22 +36,19 @@ #include "common.h" -/** - * @author Jacob Alexander (HaaTa) - * - * A WebKit browser for Baulk, using a vim control scheme - */ +//! A WebKit browser for Baulk, using a vim control scheme class WebBaulk : public BaulkWidget { Q_OBJECT public: + //! Default Constructor WebBaulk( QWidget *parent = 0 ); private: - // Current WebView + //! Current WebView QWebView *webview; - // Convenience Widgets + //! Convenience Widgets QLabel *loadLabel; QLineEdit *addressBarLineEdit; ToolButton *backToolButton; @@ -62,37 +59,37 @@ private: ToolButton *nextTabToolButton; ToolButton *previousTabToolButton; - // Information Viewer + //! Information Viewer QStackedWidget *infoLayer; QTreeWidget *tabTree; - // Tabs + //! Tabs QStackedWidget *tabLayer; - // Misc + //! Misc QSplitter *subLayout; QVBoxLayout *mainLayout; - // Top Bar Setup + //! Top Bar Setup void topBarSetup(); - // Information Viewer Setup + //! Information Viewer Setup void infoViewerSetup(); private slots: - // URL + //! URL void acceptUrl(); void updateUrl( QUrl url ); - // Status + //! Status void statusUpdate( int progress ); - // Tabs + //! Tabs void nextTab(); void prevTab(); void newTab(); - // Title + //! Title void updateTabTitle( QString title ); }; diff --git a/src/Widgets/WebBaulk/wrapper_webbaulk.h b/src/Widgets/WebBaulk/wrapper_webbaulk.h index c7254b9..9174880 100644 --- a/src/Widgets/WebBaulk/wrapper_webbaulk.h +++ b/src/Widgets/WebBaulk/wrapper_webbaulk.h @@ -31,12 +31,8 @@ #include "webbaulk.h" -/** - * @author Jacob Alexander (HaaTa) - * - * DLL Wrapper for WebBaulk - */ -// Exported Symbols +// Exported Symbols ******************************************************************************* +//! DLL Wrapper for WebBaulk extern "C" EXPORTDLL { QStringList symbolList(); -- 2.11.4.GIT