From 8f1bbd43539e14c8cfbb449b247f166cf85745e9 Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Sat, 5 Nov 2011 17:26:45 +0800 Subject: [PATCH] Remove trailing white spaces --- src/Application.h | 8 +- src/BookmarkHandler.cpp | 10 +- src/BookmarkHandler.h | 10 +- src/Character.h | 18 +-- src/CharacterColor.h | 38 +++---- src/ColorScheme.h | 54 ++++----- src/ColorSchemeEditor.h | 2 +- src/CopyInputDialog.cpp | 16 ++- src/CopyInputDialog.h | 21 ++-- src/EditProfileDialog.h | 20 ++-- src/Emulation.h | 146 ++++++++++++------------- src/Filter.h | 76 ++++++------- src/History.h | 4 +- src/HistorySizeDialog.h | 12 +- src/IncrementalSearchBar.cpp | 2 +- src/IncrementalSearchBar.h | 26 ++--- src/KeyBindingEditor.h | 12 +- src/KeyboardTranslator.h | 88 +++++++-------- src/MainWindow.h | 14 +-- src/ManageProfilesDialog.h | 8 +- src/ProcessInfo.h | 82 +++++++------- src/Profile.h | 110 +++++++++---------- src/ProfileList.h | 30 ++--- src/Pty.h | 36 +++--- src/Screen.h | 194 ++++++++++++++++----------------- src/ScreenWindow.h | 44 ++++---- src/Session.h | 18 +-- src/SessionController.h | 48 ++++---- src/SessionManager.h | 58 +++++----- src/ShellCommand.cpp | 2 +- src/ShellCommand.h | 16 +-- src/TerminalCharacterDecoder.h | 12 +- src/TerminalDisplay.h | 146 ++++++++++++------------- src/ViewContainer.h | 82 +++++++------- src/ViewManager.h | 64 +++++------ src/ViewProperties.h | 24 ++-- src/ViewSplitter.h | 34 +++--- src/Vt102Emulation.h | 18 +-- src/WarningBox.cpp | 2 +- src/WarningBox.h | 4 +- src/ZModemDialog.cpp | 2 +- src/main.cpp | 4 +- 42 files changed, 810 insertions(+), 805 deletions(-) diff --git a/src/Application.h b/src/Application.h index 47085e5fd..617f72523 100644 --- a/src/Application.h +++ b/src/Application.h @@ -20,7 +20,7 @@ #ifndef APPLICATION_H #define APPLICATION_H -// KDE +// KDE #include // Konsole @@ -39,7 +39,7 @@ class Session; /** * The Konsole Application. * - * The application consists of one or more main windows and a set of factories to create + * The application consists of one or more main windows and a set of factories to create * new sessions and views. * * To create a new main window with a default terminal session, call the newInstance() method. @@ -60,10 +60,10 @@ public: /** Creates a new main window and opens a default terminal session */ virtual int newInstance(); - /** + /** * Creates a new, empty main window and connects to its newSessionRequest() * and newWindowRequest() signals to trigger creation of new sessions or - * windows when then they are emitted. + * windows when then they are emitted. */ MainWindow* newMainWindow(); diff --git a/src/BookmarkHandler.cpp b/src/BookmarkHandler.cpp index c784e6229..bd6e502df 100644 --- a/src/BookmarkHandler.cpp +++ b/src/BookmarkHandler.cpp @@ -1,7 +1,7 @@ /* This file was part of the KDE libraries Copyright 2002 Carsten Pfeiffer - Copyright 2007-2008 Robert Knight + Copyright 2007-2008 Robert Knight library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -38,9 +38,9 @@ using namespace Konsole; -BookmarkHandler::BookmarkHandler( KActionCollection* collection, - KMenu* menu, - bool toplevel , +BookmarkHandler::BookmarkHandler( KActionCollection* collection, + KMenu* menu, + bool toplevel, QObject* parent ) : QObject( parent ), KBookmarkOwner(), @@ -146,7 +146,7 @@ QList > BookmarkHandler::currentBookmarkList() const return list; } -void BookmarkHandler::setViews(const QList& views) +void BookmarkHandler::setViews(const QList& views) { _views = views; } diff --git a/src/BookmarkHandler.h b/src/BookmarkHandler.h index 872083d50..6c42e2093 100644 --- a/src/BookmarkHandler.h +++ b/src/BookmarkHandler.h @@ -5,7 +5,7 @@ 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, version 2 + License as published by the Free Software Foundation, version 2 or (at your option) any later version. This library is distributed in the hope that it will be useful, @@ -46,7 +46,7 @@ class ViewProperties; * providing a suggested title and URL when the user clicks the "Add Bookmark" item in * the bookmarks menu. * - * The bookmark handler is associated with a session controller, which is used to + * The bookmark handler is associated with a session controller, which is used to * determine the working URL of the current session. When the user changes the active * view, the bookmark handler's controller should be changed using setController() * @@ -76,7 +76,7 @@ public: virtual QList > currentBookmarkList() const; virtual void openFolderinTabs(const KBookmarkGroup& group); - /** + /** * Returns the menu which this bookmark handler inserts its actions into. */ KMenu* menu() const { return _menu; } @@ -98,10 +98,10 @@ signals: * * @param url The url of the bookmark which was selected by the user. */ - void openUrl( const KUrl& url ); + void openUrl( const KUrl& url ); /** - * Emitted when the user selects 'Open Folder in Tabs' + * Emitted when the user selects 'Open Folder in Tabs' * from the bookmark menu. * * @param urls The urls of the bookmarks in the folder whoose diff --git a/src/Character.h b/src/Character.h index 12e3ea177..f6fbefd10 100644 --- a/src/Character.h +++ b/src/Character.h @@ -80,7 +80,7 @@ inline bool isSupportedLineChar(quint16 codePoint ) class Character { public: - /** + /** * Constructs a new character. * * @param _c The unicode character value of this character. @@ -95,7 +95,7 @@ public: : character(_c), rendition(_r), foregroundColor(_f), backgroundColor(_b) {} /** The unicode character value for this character. - * + * * if RE_EXTENDED_CHAR character is a hash code which can be used to look up the unicode * character sequence in the ExtendedCharTable used to create the sequence. */ @@ -105,11 +105,11 @@ public: quint8 rendition; /** The foreground color used to draw this character. */ - CharacterColor foregroundColor; + CharacterColor foregroundColor; /** 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. */ @@ -117,16 +117,16 @@ public: /** * 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. + * or not the character has the RE_BOLD rendition flag. */ ColorEntry::FontWeight fontWeight(const ColorEntry* base) const; - /** + /** * returns true if the format (color, rendition flag) of the compared characters is equal */ bool equalsFormat(const Character& other) const; - /** + /** * Compares two characters and returns true if they have the same unicode character value, * rendition and colors. */ @@ -222,7 +222,7 @@ public: * which was added to the table using createExtendedChar(). * * @param hash The hash key returned by createExtendedChar() - * @param length This variable is set to the length of the + * @param length This variable is set to the length of the * character sequence. * * @return A unicode character sequence of size @p length. @@ -234,7 +234,7 @@ public: private: // calculates the hash key of a sequence of unicode points of size 'length' ushort extendedCharHash(const ushort* unicodePoints , ushort length) const; - // tests whether the entry in the table specified by 'hash' matches the + // tests whether the entry in the table specified by 'hash' matches the // character sequence 'unicodePoints' of size 'length' bool extendedCharMatch(ushort hash , const ushort* unicodePoints , ushort length) const; // internal, maps hash keys to character sequence buffers. The first ushort diff --git a/src/CharacterColor.h b/src/CharacterColor.h index bd2c92653..97e603c20 100644 --- a/src/CharacterColor.h +++ b/src/CharacterColor.h @@ -31,14 +31,14 @@ namespace Konsole { -/** - * An entry in a terminal display's color palette. +/** + * An entry in a terminal display's color palette. * * A color palette is an array of 16 ColorEntry instances which map * system color indexes (from 0 to 15) into actual colors. * * Each entry can be set as bold, in which case any text - * drawn using the color should be drawn in bold. + * drawn using the color should be drawn in bold. * * Each entry can also be transparent, in which case the terminal * display should avoid drawing the background for any characters @@ -48,25 +48,25 @@ class ColorEntry { public: /** Specifies the weight to use when drawing text with this color. */ - enum FontWeight + enum FontWeight { /** Always draw text in this color with a bold weight. */ Bold, /** Always draw text in this color with a normal weight. */ Normal, - /** - * Use the current font weight set by the terminal application. + /** + * Use the current font weight set by the terminal application. * This is the default behavior. */ UseCurrentFormat }; - /** + /** * Constructs a new color palette entry. * * @param c The color value for this entry. * @param tr Specifies that the color should be transparent when used as a background color. - * @param weight Specifies the font weight to use when drawing text with this color. + * @param weight Specifies the font weight to use when drawing text with this color. */ ColorEntry(QColor c, bool tr, FontWeight weight = UseCurrentFormat) : color(c), transparent(tr), fontWeight(weight) {} @@ -90,13 +90,13 @@ public: /** The color value of this entry for display. */ QColor color; - /** - * If true character backgrounds using this color should be transparent. + /** + * If true character backgrounds using this color should be transparent. * This is not applicable when the color is used to render text. */ bool transparent; /** - * Specifies the font weight to use when drawing text with this color. + * Specifies the font weight to use when drawing text with this color. * This is not applicable when the color is used to draw a character's background. */ FontWeight fontWeight; @@ -157,8 +157,8 @@ public: _w(0) {} - /** - * Constructs a new CharacterColor using the specified @p colorSpace and with + /** + * Constructs a new CharacterColor using the specified @p colorSpace and with * color value @p co * * The meaning of @p co depends on the @p colorSpace used. @@ -195,7 +195,7 @@ public: } } - /** + /** * Returns true if this character color entry is valid. */ bool isValid() @@ -203,15 +203,15 @@ public: return _colorSpace != COLOR_SPACE_UNDEFINED; } - /** + /** * Set this color as an intensive system color. - * + * * This is only applicable if the color is using the COLOR_SPACE_DEFAULT or COLOR_SPACE_SYSTEM * color spaces. */ void setIntensive(); - /** + /** * Returns the color within the specified color @p palette * * The @p palette is only used if this color is one of the 16 system colors, otherwise @@ -219,7 +219,7 @@ 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. */ @@ -233,7 +233,7 @@ public: private: quint8 _colorSpace; - // bytes storing the character color + // bytes storing the character color quint8 _u; quint8 _v; quint8 _w; diff --git a/src/ColorScheme.h b/src/ColorScheme.h index 23b8ce912..fd37397e2 100644 --- a/src/ColorScheme.h +++ b/src/ColorScheme.h @@ -70,16 +70,16 @@ private: }; /** - * Represents a color scheme for a terminal display. + * Represents a color scheme for a terminal display. * * The color scheme includes the palette of colors used to draw the text and character backgrounds - * in the display and the opacity level of the display background. + * in the display and the opacity level of the display background. */ class ColorScheme { public: - /** - * Constructs a new color scheme which is initialised to the default color set + /** + * Constructs a new color scheme which is initialised to the default color set * for Konsole. */ ColorScheme(); @@ -104,7 +104,7 @@ public: /** Sets a single entry within the color palette. */ void setColorTableEntry(int index , const ColorEntry& entry); - /** + /** * Copies the color entries which form the palette for this color scheme * into @p table. @p table should be an array with TABLE_COLORS entries. * @@ -122,28 +122,28 @@ public: */ ColorEntry colorEntry(int index , uint randomSeed = 0) const; - /** - * Convenience method. Returns the - * foreground color for this scheme, - * this is the primary color used to draw the + /** + * Convenience method. Returns the + * foreground color for this scheme, + * this is the primary color used to draw the * text in this scheme. */ QColor foregroundColor() const; /** - * Convenience method. Returns the background color for - * this scheme, this is the primary color used to + * Convenience method. Returns the background color for + * this scheme, this is the primary color used to * draw the terminal background in this scheme. */ QColor backgroundColor() const; - /** + /** * Returns true if this color scheme has a dark background. * The background color is said to be dark if it has a value of less than 127 * in the HSV color space. */ bool hasDarkBackground() const; - /** + /** * Sets the opacity level of the display background. @p opacity ranges * between 0 (completely transparent background) and 1 (completely * opaque background). @@ -153,7 +153,7 @@ public: * TODO: More documentation */ void setOpacity(qreal opacity); - /** + /** * Returns the opacity level for this color scheme, see setOpacity() * TODO: More documentation */ @@ -163,12 +163,12 @@ public: ColorSchemeWallpaper::Ptr wallpaper() const; - /** + /** * Enables randomization of the background color. This will cause * the palette returned by getColorTable() and colorEntry() to * be adjusted depending on the value of the random seed argument * to them. - */ + */ void setRandomizedBackgroundColor(bool randomize); /** Returns true if the background color is randomized. */ @@ -204,8 +204,8 @@ private: // writes a single colour entry to a KConfig source void writeColorEntry(KConfig& config , const QString& colorName, const ColorEntry& entry,const RandomizationRange& range) const; - // sets the amount of randomization allowed for a particular color - // in the palette. creates the randomization table if + // sets the amount of randomization allowed for a particular color + // in the palette. creates the randomization table if // it does not already exist void setRandomizationRange( int index , quint16 hue , quint8 saturation , quint8 value ); @@ -229,7 +229,7 @@ private: static const ColorEntry defaultTable[]; // table of default color entries }; -/** +/** * A color scheme which uses colors from the standard KDE color palette. * * This is designed primarily for the benefit of users who are using specially @@ -255,13 +255,13 @@ public: class KDE3ColorSchemeReader { public: - /** - * Constructs a new reader which reads from the specified device. - * The device should be open in read-only mode. + /** + * Constructs a new reader which reads from the specified device. + * The device should be open in read-only mode. */ KDE3ColorSchemeReader( QIODevice* device ); - /** + /** * Reads and parses the contents of the .schema file from the input * device and returns the ColorScheme defined within it. * @@ -324,16 +324,16 @@ public: void addColorScheme(ColorScheme* scheme); /** - * Deletes a color scheme. Returns true on successful deletion or false otherwise. + * Deletes a color scheme. Returns true on successful deletion or false otherwise. */ bool deleteColorScheme(const QString& name); - /** - * Returns a list of the all the available color schemes. + /** + * Returns a list of the all the available color schemes. * This may be slow when first called because all of the color * scheme resources on disk must be located, read and parsed. * - * Subsequent calls will be inexpensive. + * Subsequent calls will be inexpensive. */ QList allColorSchemes(); diff --git a/src/ColorSchemeEditor.h b/src/ColorSchemeEditor.h index e2376356c..e1290c54c 100644 --- a/src/ColorSchemeEditor.h +++ b/src/ColorSchemeEditor.h @@ -43,7 +43,7 @@ class ColorScheme; * * The dialog creates a copy of the supplied color scheme to which * any changes made are applied. The modified color scheme - * can be retrieved using the colorScheme() method. + * can be retrieved using the colorScheme() method. * * When changes are made the colorsChanged() signal is emitted. */ diff --git a/src/CopyInputDialog.cpp b/src/CopyInputDialog.cpp index 7e47e6087..163f8cbbb 100644 --- a/src/CopyInputDialog.cpp +++ b/src/CopyInputDialog.cpp @@ -54,8 +54,8 @@ CopyInputDialog::CopyInputDialog(QWidget* parent) filterProxyModel->setSourceModel(_model); filterProxyModel->setFilterKeyColumn(-1); - connect(_ui->filterEdit,SIGNAL(textChanged(QString)),filterProxyModel, - SLOT(setFilterFixedString(QString))); + connect(_ui->filterEdit,SIGNAL(textChanged(QString)), + filterProxyModel, SLOT(setFilterFixedString(QString))); _ui->sessionList->setModel(filterProxyModel); _ui->sessionList->setColumnHidden(0,true); // Hide number column @@ -73,13 +73,13 @@ void CopyInputDialog::setChosenSessions(const QSet& sessions) if (_masterSession) checked.insert(_masterSession); - _model->setCheckedSessions(checked); + _model->setCheckedSessions(checked); } QSet CopyInputDialog::chosenSessions() const { return _model->checkedSessions(); } -void CopyInputDialog::setMasterSession(Session* session) +void CopyInputDialog::setMasterSession(Session* session) { if (_masterSession) _model->setCheckable(_masterSession,true); @@ -103,7 +103,7 @@ void CopyInputDialog::setSelectionChecked(bool checked) foreach(const QModelIndex &index,selected) setRowChecked(index.row(),checked); } - else + else { for (int i=0;i sessions) { diff --git a/src/CopyInputDialog.h b/src/CopyInputDialog.h index 33a67770f..0c33882bc 100644 --- a/src/CopyInputDialog.h +++ b/src/CopyInputDialog.h @@ -41,7 +41,7 @@ class CheckableSessionModel; /** * Dialog which allows the user to mark a list of sessions to copy - * the input from the current session to. The current session is + * the input from the current session to. The current session is * set using setMasterSession(). After the dialog has been executed, * the set of chosen sessions can be retrieved using chosenSessions() */ @@ -52,8 +52,8 @@ Q_OBJECT public: CopyInputDialog(QWidget* parent = 0); ~CopyInputDialog(); - /** - * Sets the 'source' session whoose input will be copied to + /** + * Sets the 'source' session whose input will be copied to * other sessions. This session is displayed grayed out in the list * and cannot be unchecked. */ @@ -81,24 +81,24 @@ private: QPointer _masterSession; }; -/** - * A list of sessions with a checkbox next to each one which allows the +/** + * A list of sessions with a checkbox next to each one which allows the * user to select a subset of the available sessions to perform * some action on them. */ class CheckableSessionModel : public SessionListModel { -Q_OBJECT +Q_OBJECT public: - CheckableSessionModel(QObject* parent); + CheckableSessionModel(QObject* parent); void setCheckColumn(int column); int checkColumn() const; - /** - * Sets whether a session can be checked or un-checked. - * Non-checkable items have the Qt::ItemIsEnabled flag unset. + /** + * Sets whether a session can be checked or un-checked. + * Non-checkable items have the Qt::ItemIsEnabled flag unset. */ void setCheckable(Session* session, bool checkable); @@ -120,6 +120,7 @@ private: QSet _fixedSessions; int _checkColumn; }; + inline int CheckableSessionModel::checkColumn() const { return _checkColumn; } diff --git a/src/EditProfileDialog.h b/src/EditProfileDialog.h index 9090f1bbf..9ad19789f 100644 --- a/src/EditProfileDialog.h +++ b/src/EditProfileDialog.h @@ -49,9 +49,9 @@ namespace Konsole /** * A dialog which allows the user to edit a profile. * After the dialog is created, it can be initialised with the settings - * for a profile using setProfile(). When the user makes changes to the + * for a profile using setProfile(). When the user makes changes to the * dialog and accepts the changes, the dialog will update the - * profile in the SessionManager by calling the SessionManager's + * profile in the SessionManager by calling the SessionManager's * changeProfile() method. * * Some changes made in the dialog are preview-only changes which cause @@ -79,8 +79,8 @@ public: */ void setProfile(Profile::Ptr profile); - /** - * Selects the text in the profile name edit area. + /** + * Selects the text in the profile name edit area. * When the dialog is being used to create a new profile, * this can be used to draw the user's attention to the profile name * and make it easy for them to change it. @@ -90,7 +90,7 @@ public: public slots: // reimplemented virtual void accept(); - // reimplemented + // reimplemented virtual void reject(); protected: @@ -216,7 +216,7 @@ private: // it to _tempProfile. void createTempProfile(); - // Enable or disable apply button, used only within + // Enable or disable apply button, used only within // updateTempProfileProperty(). void updateButtonApply(); @@ -244,8 +244,8 @@ private: Profile::Ptr _profile; // keeps track of pages which need to be updated to match the current - // profile. all elements in this vector are set to true when the - // profile is changed and individual elements are set to false + // profile. all elements in this vector are set to true when the + // profile is changed and individual elements are set to false // after an update by a call to ensurePageLoaded() QVector _pageNeedsUpdate; QHash _previewedProperties; @@ -272,12 +272,12 @@ public: virtual QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index) const; - /** + /** * Sets the timeline used to control the entry animation * for this delegate. * * During a call to paint(), the value of the timeLine is used to - * determine how to render the item ( with 0 being the beginning + * determine how to render the item ( with 0 being the beginning * of the animation and 1.0 being the end ) */ void setEntryTimeLine( QTimeLine* timeLine ); diff --git a/src/Emulation.h b/src/Emulation.h index 366e40ecf..cf2983457 100644 --- a/src/Emulation.h +++ b/src/Emulation.h @@ -26,7 +26,7 @@ // System #include -// Qt +// Qt #include #include #include @@ -44,23 +44,23 @@ class Screen; class ScreenWindow; class TerminalCharacterDecoder; -/** - * This enum describes the available states which +/** + * This enum describes the available states which * the terminal emulation may be set to. * - * These are the values used by Emulation::stateChanged() + * These are the values used by Emulation::stateChanged() */ enum { /** 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 + /** + * The emulation is currently receiving data from its * terminal input. */ NOTIFYACTIVITY=2, @@ -72,28 +72,28 @@ enum /** * Base class for terminal emulation back-ends. * - * The back-end is responsible for decoding an incoming character stream and + * The back-end is responsible for decoding an incoming character stream and * producing an output image of characters. * * When input from the terminal is received, the receiveData() slot should be called with - * the data which has arrived. The emulation will process the data and update the + * the data which has arrived. The emulation will process the data and update the * screen image accordingly. The codec used to decode the incoming character stream - * into the unicode characters used internally can be specified using setCodec() + * into the unicode characters used internally can be specified using setCodec() * - * The size of the screen image can be specified by calling setImageSize() with the + * The size of the screen image can be specified by calling setImageSize() with the * desired number of lines and columns. When new lines are added, old content - * is moved into a history store, which can be set by calling setHistory(). + * is moved into a history store, which can be set by calling setHistory(). * - * The screen image can be accessed by creating a ScreenWindow onto this emulation - * by calling createWindow(). Screen windows provide access to a section of the - * output. Each screen window covers the same number of lines and columns as the + * The screen image can be accessed by creating a ScreenWindow onto this emulation + * by calling createWindow(). Screen windows provide access to a section of the + * output. Each screen window covers the same number of lines and columns as the * image size returned by imageSize(). The screen window can be moved up and down - * and provides transparent access to both the current on-screen image and the + * and provides transparent access to both the current on-screen image and the * previous output. The screen windows emit an outputChanged signal * when the section of the image they are looking at changes. * Graphical views can then render the contents of a screen window, listening for notifications - * of output changes from the screen window which they are associated with and updating - * accordingly. + * of output changes from the screen window which they are associated with and updating + * accordingly. * * The emulation also is also responsible for converting input from the connected views such * as keypresses and mouse activity into a character string which can be sent @@ -106,9 +106,9 @@ enum * character sequences. The name of the key bindings set used can be specified using * setKeyBindings() * - * The emulation maintains certain state information which changes depending on the - * input received. The emulation can be reset back to its starting state by calling - * reset(). + * The emulation maintains certain state information which changes depending on the + * input received. The emulation can be reset back to its starting state by calling + * reset(). * * The emulation also maintains an activity state, which specifies whether * terminal is currently active ( when data is received ), normal @@ -119,12 +119,12 @@ enum * a 'bell' event in different ways. */ class KONSOLEPRIVATE_EXPORT Emulation : public QObject -{ +{ Q_OBJECT public: - /** Constructs a new terminal emulation */ + /** Constructs a new terminal emulation */ Emulation(); ~Emulation(); @@ -140,15 +140,15 @@ public: /** * Returns the total number of lines, including those stored in the history. - */ + */ int lineCount() const; - /** + /** * 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. + * store. * - * The number of lines which are kept and the storage location depend on the + * The number of lines which are kept and the storage location depend on the * type of store. */ void setHistory(const HistoryType&); @@ -157,12 +157,12 @@ public: /** Clears the history scroll. */ void clearHistory(); - /** - * Copies the output history from @p startLine to @p endLine + /** + * Copies the output history from @p startLine to @p endLine * into @p stream, using @p decoder to convert the terminal - * characters into text. + * characters into text. * - * @param decoder A decoder which converts lines of terminal characters with + * @param decoder A decoder which converts lines of terminal characters with * appearance attributes into output text. PlainTextDecoder is the most commonly * used decoder. * @param startLine Index of first line to copy @@ -175,8 +175,8 @@ public: /** Sets the codec used to decode incoming characters. */ void setCodec(const QTextCodec*); - /** - * Convenience method. + /** + * Convenience method. * Returns true if the current codec used to decode incoming * characters is UTF-8 */ @@ -187,19 +187,19 @@ public: /** Returns the special character used for erasing character. */ virtual char eraseChar() 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() const; - /** + /** * Copies the current image into the history and clears the screen. */ virtual void clearEntireScreen() =0; @@ -207,7 +207,7 @@ public: /** Resets the state of the terminal. */ virtual void reset() =0; - /** + /** * Returns true if the active terminal program wants * mouse input events. * @@ -216,42 +216,42 @@ public: */ bool programUsesMouse() const; -public slots: +public slots: /** 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. + * 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. + * Sends a string of characters to the foreground terminal process. * - * @param string The characters to send. + * @param string The characters to send. * @param length Length of @p string or if set to a negative value, @p string will * be treated as a null-terminated string and its length will be determined automatically. */ 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. + * each unicode character in the resulting buffer. * * receiveData() also starts a timer which causes the outputChanged() signal * to be emitted when it expires. The timer allows multiple updates in quick @@ -264,8 +264,8 @@ public slots: signals: - /** - * Emitted when a buffer of data is ready to send to the + /** + * Emitted when a buffer of data is ready to send to the * standard input of the terminal. * * @param data The buffer of data ready to be sent @@ -273,20 +273,20 @@ signals: */ void sendData(const char* data,int len); - /** + /** * Requests that sending of input to the emulation * from the terminal process be suspended or resumed. * - * @param suspend If true, requests that sending of - * input from the terminal process' stdout be + * @param suspend If true, requests that sending of + * input from the terminal process' stdout be * suspended. Otherwise requests that sending of - * input be resumed. + * input be resumed. */ void lockPtyRequest(bool suspend); /** * Requests that the pty used by the terminal process - * be set to UTF 8 mode. + * be set to UTF 8 mode. * * Refer to the IUTF8 entry in termios(3) for more information. */ @@ -317,7 +317,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. * @@ -326,7 +326,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 @@ -336,14 +336,14 @@ signals: * created with createWindow() to listen for this signal. * * ScreenWindow objects created using createWindow() will emit their - * own outputChanged() signal in response to this signal. + * own outputChanged() signal in response to this signal. */ void outputChanged(); /** - * Emitted when the program running in the terminal wishes to update the + * 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. + * aspects of the terminal emulation display. * * This signal is emitted when the escape sequence "\033]ARG;VALUE\007" * is received in the input string, where ARG is a number specifying what @@ -351,7 +351,7 @@ signals: * * TODO: The name of this method is not very accurate since this method * is used to perform a whole range of tasks besides just setting - * the user-title of the session. + * the user-title of the session. * * @param title Specifies what to change. *
    @@ -360,16 +360,16 @@ signals: *
  • 2 - Set session title to @p newTitle
  • *
  • 11 - Set the session's default background color to @p newTitle, * where @p newTitle can be an HTML-style string ("#RRGGBB") or a named - * color (eg 'red', 'blue'). + * color (eg 'red', 'blue'). * See http://doc.trolltech.com/4.2/qcolor.html#setNamedColor for more * details. *
  • *
  • 31 - Supposedly treats @p newTitle as a URL and opens it (NOT IMPLEMENTED)
  • - *
  • 32 - Sets the icon associated with the session. @p newTitle is the name + *
  • 32 - Sets the icon associated with the session. @p newTitle is the name * of the icon to use, which can be the name of any icon in the current KDE icon * theme (eg: 'konsole', 'kate', 'folder_home')
  • *
- * @param newTitle Specifies the new title + * @param newTitle Specifies the new title */ void titleChanged(int title,const QString& newTitle); @@ -386,9 +386,9 @@ signals: */ void imageSizeInitialized(); - /** + /** * Emitted when the terminal program requests to change various properties - * of the terminal display. + * of the terminal display. * * A profile change command occurs when a special escape sequence, followed * by a string containing a series of name and value pairs is received. @@ -399,7 +399,7 @@ signals: */ void profileChangeCommandReceived(const QString& text); - /** + /** * Emitted when a flow control key combination ( Ctrl+S or Ctrl+Q ) is pressed. * @param suspendKeyPressed True if Ctrl+S was pressed to suspend output or Ctrl+Q to * resume output. @@ -422,13 +422,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. + * @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. @@ -447,7 +447,7 @@ protected: QList _windows; - Screen* _currentScreen; // pointer to the screen which is currently active, + Screen* _currentScreen; // pointer to the screen which is currently active, // this is one of the elements in the screen[] array Screen* _screen[2]; // 0 = primary screen ( used by most programs, including the shell @@ -456,17 +456,17 @@ protected: // scrollbars are not enabled in this mode ) - //decodes an incoming C-style character stream into a unicode QString using + //decodes an incoming C-style character stream into a unicode QString using //the current text codec. (this allows for rendering of non-ASCII characters in text files etc.) const QTextCodec* _codec; QTextDecoder* _decoder; 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. + * much like the Qt buffered update of widgets. */ void bufferedUpdate(); @@ -476,7 +476,7 @@ protected slots: // used to emit the selectedText(QString) signal void checkSelectedText(); -private slots: +private slots: // triggered by timer, causes the emulation to send an updated screen image to each // view diff --git a/src/Filter.h b/src/Filter.h index 73afd3d6f..7fad7ff0c 100644 --- a/src/Filter.h +++ b/src/Filter.h @@ -44,7 +44,7 @@ namespace Konsole * activate() method should be called. Depending on the type of hotspot this will trigger a suitable response. * * For example, if a hotspot represents a URL then a suitable action would be opening that URL in a web browser. - * Hotspots may have more than one action, in which case the list of actions can be obtained using the + * Hotspots may have more than one action, in which case the list of actions can be obtained using the * actions() method. * * Different subclasses of filter will return different types of hotspot. @@ -64,13 +64,13 @@ public: * activate() method should be called. Depending on the type of hotspot this will trigger a suitable response. * * For example, if a hotspot represents a URL then a suitable action would be opening that URL in a web browser. - * Hotspots may have more than one action, in which case the list of actions can be obtained using the - * actions() method. These actions may then be displayed in a popup menu or toolbar for example. + * Hotspots may have more than one action, in which case the list of actions can be obtained using the + * actions() method. These actions may then be displayed in a popup menu or toolbar for example. */ 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. */ @@ -85,7 +85,7 @@ public: Link, // this hotspot represents a marker Marker - }; + }; /** Returns the line when the hotspot area starts */ int startLine() const; @@ -95,31 +95,31 @@ public: int startColumn() const; /** 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. + /** + * Causes the an action associated with a hotspot to be triggered. * * @param object The object which caused the hotspot to be triggered. This is * typically null ( in which case the default action should be performed ) or * one of the objects from the actions() list. In which case the associated - * action should be performed. + * 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 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. * - * The default implementation returns an empty string. + * The default implementation returns an empty string. */ virtual QString tooltip() const; @@ -143,9 +143,9 @@ public: /** 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. + * All hotspots are deleted. */ void reset(); @@ -161,7 +161,7 @@ public: /** 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); @@ -182,17 +182,17 @@ private: const QString* _buffer; }; -/** - * A filter which searches for sections of text matching a regular expression and creates a new RegExpFilter::HotSpot +/** + * A filter which searches for sections of text matching a regular expression and creates a new RegExpFilter::HotSpot * instance for them. * * Subclasses can reimplement newHotSpot() to return custom hotspot types when matches for the regular expression - * are found. + * are found. */ 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. */ @@ -213,26 +213,26 @@ public: /** Constructs a new regular expression filter */ RegExpFilter(); - /** - * Sets the regular expression which the filter searches for in blocks of text. + /** + * 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. + * anything. */ void setRegExp(const QRegExp& 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() + /** + * Reimplemented to search the filter's text buffer for text matching regExp() * * If regexp matches the empty string, then process() will return immediately - * without finding results. + * without finding results. */ virtual void process(); protected: - /** + /** * Called when a match for the regular expression is encountered. Subclasses should reimplement this * to return custom hotspot types */ @@ -246,14 +246,14 @@ private: class FilterObject; /** A filter which matches URLs in blocks of text */ -class UrlFilter : public RegExpFilter +class UrlFilter : public RegExpFilter { public: - /** - * Hotspot type created by UrlFilter instances. The activate() method opens a web browser + /** + * Hotspot type created by UrlFilter instances. The activate() method opens a web browser * at the given URL when called. */ - class HotSpot : public RegExpFilter::HotSpot + class HotSpot : public RegExpFilter::HotSpot { public: HotSpot(int startLine,int startColumn,int endLine,int endColumn); @@ -261,7 +261,7 @@ public: virtual QList actions(); - /** + /** * Open a web browser at the current URL. The url itself can be determined using * the capturedTexts() method. */ @@ -305,11 +305,11 @@ private: Filter::HotSpot* _filter; }; -/** - * A chain which allows a group of filters to be processed as one. +/** + * 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. * - * Use addFilter() to add a new filter to the chain. + * Use addFilter() to add a new filter to the chain. * When new text to be filtered arrives, use addLine() to add each additional * line of text which needs to be processed and then after adding the last line, use * process() to cause each filter in the chain to process the text. @@ -339,7 +339,7 @@ public: /** Resets each filter in the chain */ void reset(); /** - * Processes each filter in the chain + * Processes each filter in the chain */ void process(); diff --git a/src/History.h b/src/History.h index b2c948fd1..eb89c5b5f 100644 --- a/src/History.h +++ b/src/History.h @@ -179,7 +179,7 @@ private: HistoryLine* _historyBuffer; QBitArray _wrappedLine; int _maxLineCount; - int _usedLines; + int _usedLines; int _head; //QVector m_histBuffer; @@ -388,7 +388,7 @@ public: /** * Returns true if the history is enabled ( can store lines of output ) - * or false otherwise. + * or false otherwise. */ virtual bool isEnabled() const = 0; /** diff --git a/src/HistorySizeDialog.h b/src/HistorySizeDialog.h index e077c6849..3be7ba366 100644 --- a/src/HistorySizeDialog.h +++ b/src/HistorySizeDialog.h @@ -31,7 +31,7 @@ namespace Konsole /** * A dialog which allows the user to select the number of lines of output - * which are remembered for a session. + * which are remembered for a session. */ class HistorySizeDialog : public KDialog { @@ -46,14 +46,14 @@ public: /** Specifies the type of history scroll */ enum HistoryMode { - /** + /** * No history. Lines of output are lost * as soon as they are scrolled off-screen. - */ + */ NoHistory, /** * A history which stores up to a fixed number of lines - * in memory. + * in memory. */ FixedSizeHistory, /** @@ -68,7 +68,7 @@ public: void setMode( HistoryMode mode ); /** Returns the history mode chosen by the user. */ HistoryMode mode() const; - /** + /** * Returns the number of lines of history to remember. * This is only valid when mode() == FixedSizeHistory, * and returns 0 otherwise. @@ -98,7 +98,7 @@ private: QAbstractButton* _noHistoryButton; QAbstractButton* _fixedHistoryButton; QAbstractButton* _unlimitedHistoryButton; - KIntSpinBox* _lineCountBox; + KIntSpinBox* _lineCountBox; // 1000 lines was the default in the KDE 3 series static const int defaultLineCount = 1000; diff --git a/src/IncrementalSearchBar.cpp b/src/IncrementalSearchBar.cpp index 82ce8ed1a..3ca060b7d 100644 --- a/src/IncrementalSearchBar.cpp +++ b/src/IncrementalSearchBar.cpp @@ -158,7 +158,7 @@ bool IncrementalSearchBar::eventFilter(QObject* watched , QEvent* event) emit closeClicked(); return true; } - } + } } return QWidget::eventFilter(watched,event); diff --git a/src/IncrementalSearchBar.h b/src/IncrementalSearchBar.h index 0b752d2be..c7a9c2789 100644 --- a/src/IncrementalSearchBar.h +++ b/src/IncrementalSearchBar.h @@ -32,8 +32,8 @@ class KLineEdit; namespace Konsole { -/** - * A widget which allows users to search incrementally through a document for a +/** + * A widget which allows users to search incrementally through a document for a * a text string or regular expression. * * The widget consists of a text box into which the user can enter their search text and @@ -43,13 +43,13 @@ namespace Konsole * the document for the new text should begin immediately and the active view of the document * should jump to display any matches if found. setFoundMatch() should be called whenever the * search text changes to indicate whether a match for the text was found in the document. - * - * findNextClicked() and findPreviousClicked() signals are emitted when the user presses buttons + * + * findNextClicked() and findPreviousClicked() signals are emitted when the user presses buttons * to find next and previous matches respectively. * - * The first indicates whether searches are case sensitive. + * The first indicates whether searches are case sensitive. * The matchCaseToggled() signal is emitted when this is changed. - * The second indicates whether the search text should be treated as a plain string or + * The second indicates whether the search text should be treated as a plain string or * as a regular expression. * The matchRegExpToggled() signal is emitted when this is changed. */ @@ -59,7 +59,7 @@ Q_OBJECT public: - /** + /** * This enum defines the options that can be checked. */ enum SearchOptions @@ -72,16 +72,16 @@ public: RegExp = 2 }; - /** - * Constructs a new incremental search bar with the given parent widget + /** + * Constructs a new incremental search bar with the given parent widget */ explicit IncrementalSearchBar(QWidget* parent = 0); /* Returns search options that are checked */ const QBitArray optionsChecked(); - /** - * Sets an indicator for the user as to whether or not a match for the + /** + * Sets an indicator for the user as to whether or not a match for the * current search text was found in the document. * * The indicator will not be shown if the search text is empty ( because @@ -105,7 +105,7 @@ signals: void findNextClicked(); /** Emitted when the user clicks the button to find the previous match */ void findPreviousClicked(); - /** + /** * Emitted when the user toggles the checkbox to indicate whether * matches for the search text should be highlighted */ @@ -117,7 +117,7 @@ signals: void matchCaseToggled(bool); /** * Emitted when the user toggles the checkbox to indicate whether - * the search text should be treated as a plain string or a regular expression + * the search text should be treated as a plain string or a regular expression */ void matchRegExpToggled(bool); /** Emitted when the close button is clicked */ diff --git a/src/KeyBindingEditor.h b/src/KeyBindingEditor.h index a97d6dd89..2fbebf3c1 100644 --- a/src/KeyBindingEditor.h +++ b/src/KeyBindingEditor.h @@ -36,16 +36,16 @@ namespace Konsole class KeyboardTranslator; /** - * A dialog which allows the user to edit a key bindings list - * which maps between key combinations input by the user and - * the character sequence sent to the terminal when those + * A dialog which allows the user to edit a key bindings list + * which maps between key combinations input by the user and + * the character sequence sent to the terminal when those * combinations are pressed. * * The dialog can be initialised with the settings of an * existing key bindings list using the setup() method. * * The dialog creates a copy of the supplied keyboard translator - * to which any changes are applied. The modified translator + * to which any changes are applied. The modified translator * can be retrieved using the translator() method. */ class KeyBindingEditor : public QWidget @@ -57,7 +57,7 @@ public: KeyBindingEditor(QWidget* parent = 0); virtual ~KeyBindingEditor(); - /** + /** * Intialises the dialog with the bindings and other settings * from the specified @p translator. */ @@ -78,7 +78,7 @@ public: virtual bool eventFilter( QObject* watched , QEvent* event ); public slots: - /** + /** * Sets the text of the editor's description field. */ void setDescription(const QString& description); diff --git a/src/KeyboardTranslator.h b/src/KeyboardTranslator.h index 84b714cb1..a34da1f1c 100644 --- a/src/KeyboardTranslator.h +++ b/src/KeyboardTranslator.h @@ -38,7 +38,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. @@ -54,7 +54,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. @@ -70,7 +70,7 @@ public: * TODO More documentation */ NewLineState = 1, - /** + /** * Indicates that the terminal is in 'Ansi' mode. * TODO: More documentation */ @@ -81,10 +81,10 @@ public: CursorKeysState = 4, /** * Indicates that the alternate screen ( typically used by interactive programs - * such as screen or vim ) is active + * 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, /** Indicates that the numpad is in application mode. */ ApplicationKeypadState = 32 @@ -127,14 +127,14 @@ 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. + * This is true for newly constructed entries which have no properties set. */ bool isNull() const; @@ -143,15 +143,15 @@ public: /** Sets the command associated with this entry. */ void setCommand(Command command); - /** - * Returns the character sequence associated with this entry, optionally replacing + /** + * Returns the character sequence associated with this entry, optionally replacing * wildcard '*' characters with numbers to indicate the keyboard modifiers being pressed. * * TODO: The numbers used to replace '*' characters are taken from the Konsole/KDE 3 code. - * Document them. + * Document them. * * @param expandWildCards Specifies whether wild cards (occurrences of the '*' character) in - * the entry should be replaced with a number to indicate the modifier keys being pressed. + * the entry should be replaced with a number to indicate the modifier keys being pressed. * * @param modifiers The keyboard modifiers being pressed. */ @@ -161,7 +161,7 @@ public: /** 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. * @@ -178,13 +178,13 @@ public: /** 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. + /** + * 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. * * If a modifier is not set in modifierMask() then the entry matches whether the modifier - * is pressed or not. + * is pressed or not. */ Qt::KeyboardModifiers modifiers() const; @@ -196,13 +196,13 @@ public: /** 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 + /** + * 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. * * If a state is not set in stateMask() then the entry matches whether the terminal - * is in that state or not. + * is in that state or not. */ States state() const; @@ -214,13 +214,13 @@ public: /** See stateMask() */ void setStateMask( States mask ); - /** - * Returns the key code and modifiers associated with this entry + /** + * 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. */ @@ -236,7 +236,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. */ @@ -281,7 +281,7 @@ public: /** * Looks for an entry in this keyboard translator which matches the given * key code, keyboard modifiers and state flags. - * + * * Returns the matching entry if found or a null Entry otherwise ( ie. * entry.isNull() will return true ) * @@ -293,7 +293,7 @@ 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() */ @@ -324,8 +324,8 @@ 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 +/** + * Parses the contents of a Keyboard Translator (.keytab) file and * returns the entries found in it. * * Usage example: @@ -345,7 +345,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardTranslator::Commands) * if ( !reader.parseError() ) * { * // parsing succeeded, do something with the translator - * } + * } * else * { * // parsing failed @@ -358,9 +358,9 @@ public: /** Constructs a new reader which parses the given @p source */ KeyboardTranslatorReader( QIODevice* source ); - /** - * Returns the description text. - * TODO: More documentation + /** + * Returns the description text. + * TODO: More documentation */ QString description() const; @@ -369,7 +369,7 @@ public: /** 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. */ @@ -379,7 +379,7 @@ public: * Parses a condition and result string for a translator entry * and produces a keyboard translator entry. * - * The condition and result strings are in the same format as in + * The condition and result strings are in the same format as in */ static KeyboardTranslator::Entry createEntry( const QString& condition , const QString& result ); @@ -422,16 +422,16 @@ private: 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. + /** + * Writes the header for the keyboard translator. + * @param description Description of the keyboard translator. */ void writeHeader( const QString& description ); /** Writes a translator entry. */ @@ -449,7 +449,7 @@ private: class KONSOLEPRIVATE_EXPORT KeyboardTranslatorManager { public: - /** + /** * Constructs a new KeyboardTranslatorManager and loads the list of * available keyboard translations. * @@ -460,7 +460,7 @@ public: ~KeyboardTranslatorManager(); /** - * Adds a new translator. If a translator with the same name + * Adds a new translator. If a translator with the same name * already exists, it will be replaced by the new translator. * * TODO: More documentation. @@ -477,18 +477,18 @@ public: /** 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. * * The first time that a translator with a particular name is requested, - * the on-disk .keyboard file is loaded and parsed. + * 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 + * The first time this is called, a search for available * translators is started. */ QList allTranslators(); @@ -500,7 +500,7 @@ private: static const QByteArray defaultTranslatorText; void findTranslators(); // locate the available translators - KeyboardTranslator* loadTranslator(const QString& name); // loads the translator + KeyboardTranslator* loadTranslator(const QString& name); // loads the translator // with the given name KeyboardTranslator* loadTranslator(QIODevice* device,const QString& name); diff --git a/src/MainWindow.h b/src/MainWindow.h index d99b3d592..cff468cb6 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -59,7 +59,7 @@ class MainWindow : public KXmlGuiWindow Q_OBJECT public: - /** + /** * Constructs a new main window. Do not create new main windows directly, use Application's * newMainWindow() method instead. */ @@ -90,7 +90,7 @@ class MainWindow : public KXmlGuiWindow /** * Sets the default profile for this window. * This is the default value for the profile argument - * when the newSessionRequest() and newWindow() signals + * when the newSessionRequest() and newWindow() signals * are emitted. */ void setDefaultProfile(Profile::Ptr profile); @@ -102,13 +102,13 @@ class MainWindow : public KXmlGuiWindow Profile::Ptr defaultProfile() const; signals: - /** + /** * Emitted by the main window to request the creation of a new session. * * @param profile The profile to use to create the new session. - * @param directory Initial working directory for the new session or empty + * @param directory Initial working directory for the new session or empty * if the default working directory associated with the profile should be used. - * @param view The view manager owned by this main window + * @param view The view manager owned by this main window */ void newSessionRequest(Profile::Ptr profile, const QString& directory, @@ -126,10 +126,10 @@ class MainWindow : public KXmlGuiWindow ViewManager* view); /** - * Emitted by the main window to request the creation of a + * Emitted by the main window to request the creation of a * new session in a new window. * - * @param profile The profile to use to create the + * @param profile The profile to use to create the * first session in the new window. * @param directory Initial working directory for the new window or empty * if the default working directory associated with the profile should diff --git a/src/ManageProfilesDialog.h b/src/ManageProfilesDialog.h index 95eb69255..d518d3e91 100644 --- a/src/ManageProfilesDialog.h +++ b/src/ManageProfilesDialog.h @@ -63,9 +63,9 @@ public: ManageProfilesDialog(QWidget* parent = 0); virtual ~ManageProfilesDialog(); - /** + /** * Specifies whether the shorcut editor should be show. - * The shortcut editor allows shortcuts to be associated with + * The shortcut editor allows shortcuts to be associated with * profiles. When a shortcut is changed, the dialog will call * SessionManager::instance()->setShortcut() to update the shortcut * associated with the profile. @@ -87,7 +87,7 @@ private slots: void itemDataChanged(QStandardItem* item); - // enables or disables Edit/Delete/Set as Default buttons when the + // enables or disables Edit/Delete/Set as Default buttons when the // selection changes void tableSelectionChanged(const QItemSelection&); @@ -108,7 +108,7 @@ private: // their default / non-default profile status void updateDefaultItem(); void updateItemsForProfile(const Profile::Ptr profile, QList& items) const; - // updates the profile table to be in sync with the + // updates the profile table to be in sync with the // session manager void populateTable(); int rowForProfile(const Profile::Ptr profile) const; diff --git a/src/ProcessInfo.h b/src/ProcessInfo.h index e427e3292..dab980e08 100644 --- a/src/ProcessInfo.h +++ b/src/ProcessInfo.h @@ -30,28 +30,28 @@ namespace Konsole { /** - * Takes a snapshot of the state of a process and provides access to + * Takes a snapshot of the state of a process and provides access to * information such as the process name, parent process, * the foreground process in the controlling terminal, - * the arguments with which the process was started and the + * the arguments with which the process was started and the * environment. * * To create a new snapshot, construct a new ProcessInfo instance, * using ProcessInfo::newInstance(), * passing the process identifier of the process you are interested in. * - * After creating a new instance, call the update() method to take a + * After creating a new instance, call the update() method to take a * snapshot of the current state of the process. * * Before calling any additional methods, check that the process state * was read successfully using the isValid() method. * - * Each accessor method which provides information about the process state ( such as pid(), + * Each accessor method which provides information about the process state ( such as pid(), * currentDir(), name() ) takes a pointer to a boolean as an argument. If the information * requested was read successfully then the boolean is set to true, otherwise it is set * to false, in which case the return value from the function should be ignored. * If this boolean is set to false, it may indicate an error reading the process information, - * or it may indicate that the information is not available on the current platform. + * or it may indicate that the information is not available on the current platform. * * eg. * @@ -76,7 +76,7 @@ class ProcessInfo { public: /** - * Constructs a new instance of a suitable ProcessInfo sub-class for + * Constructs a new instance of a suitable ProcessInfo sub-class for * the current platform which provides information about a given process. * * @param pid The pid of the process to examine @@ -84,35 +84,35 @@ public: * be read. If this is false, then environment() calls will * always fail. This is an optimization to avoid the overhead * of reading the (potentially large) environment data when it - * is not required. + * is not required. */ static ProcessInfo* newInstance(int pid,bool readEnvironment = false); virtual ~ProcessInfo() {} - /** + /** * Updates the information about the process. This must * be called before attempting to use any of the accessor methods. */ void update(); - /** Returns true if the process state was read successfully. */ + /** Returns true if the process state was read successfully. */ bool isValid() const; - /** - * Returns the process id. + /** + * Returns the process id. * - * @param ok Set to true if the process id was read successfully or false otherwise + * @param ok Set to true if the process id was read successfully or false otherwise */ int pid(bool* ok) const; - /** + /** * Returns the id of the parent process id was read successfully or false otherwise - * + * * @param ok Set to true if the parent process id */ int parentPid(bool* ok) const; - /** - * Returns the id of the current foreground process + /** + * Returns the id of the current foreground process * * NOTE: Using the foregroundProcessGroup() method of the Pty * instance associated with the terminal of interest is preferred @@ -134,7 +134,7 @@ public: /** Returns the name of the current process */ QString name(bool* ok) const; - /** + /** * Returns the command-line arguments which the process * was started with. * @@ -169,7 +169,7 @@ public: void setUserHomeDir(); /** - * Parses an input string, looking for markers beginning with a '%' + * Parses an input string, looking for markers beginning with a '%' * character and returns a string with the markers replaced * with information from this process description. *
@@ -177,9 +177,9 @@ public: *
    *
  • %u - Name of the user which owns the process.
  • *
  • %n - Replaced with the name of the process.
  • - *
  • %d - Replaced with the last part of the path name of the + *
  • %d - Replaced with the last part of the path name of the * process' current working directory. - * + * * (eg. if the current directory is '/home/bob' then * 'bob' would be returned) *
  • @@ -188,8 +188,8 @@ public: */ QString format(const QString& text) const; - /** - * This enum describes the errors which can occur when trying to read + /** + * This enum describes the errors which can occur when trying to read * a process's information. */ enum Error @@ -210,14 +210,14 @@ public: protected: /** * Constructs a new process instance. You should not call the constructor - * of ProcessInfo or its subclasses directly. Instead use the + * of ProcessInfo or its subclasses directly. Instead use the * static ProcessInfo::newInstance() method which will return * a suitable ProcessInfo instance for the current platform. - */ + */ explicit ProcessInfo(int pid , bool readEnvironment = false); - /** - * This is called on construction to read the process state + /** + * This is called on construction to read the process state * Subclasses should reimplement this function to provide * platform-specific process state reading functionality. * @@ -257,10 +257,10 @@ protected: /** Sets the error */ void setError( Error error ); - /** Convenience method. Sets the error based on a QFile error code. */ - void setFileError( QFile::FileError error ); + /** Convenience method. Sets the error based on a QFile error code. */ + void setFileError( QFile::FileError error ); - /** + /** * Adds a commandline argument for the process, as returned * by arguments() */ @@ -283,7 +283,7 @@ protected: private: // takes a full directory path and returns a - // shortened version suitable for display in + // shortened version suitable for display in // space-constrained UI elements (eg. tabs) QString formatShortDir(const QString& dirPath) const; @@ -307,7 +307,7 @@ private: ENVIRONMENT = 16, NAME = 32, CURRENT_DIR = 64, - UID =128 + UID =128 }; char _fields; // a bitmap indicating which fields are valid @@ -335,9 +335,9 @@ private: static QSet _commonDirNames; }; -/** +/** * Implementation of ProcessInfo which does nothing. - * Used on platforms where a suitable ProcessInfo subclass is not + * Used on platforms where a suitable ProcessInfo subclass is not * available. * * isValid() will always return false for instances of NullProcessInfo @@ -345,7 +345,7 @@ private: class NullProcessInfo : public ProcessInfo { public: - /** + /** * Constructs a new NullProcessInfo instance. * See ProcessInfo::newInstance() */ @@ -362,14 +362,14 @@ protected: class UnixProcessInfo : public ProcessInfo { public: - /** + /** * Constructs a new instance of UnixProcessInfo. * See ProcessInfo::newInstance() */ explicit UnixProcessInfo(int pid,bool readEnvironment = false); protected: - /** + /** * Implementation of ProcessInfo::readProcessInfo(); calls the * four private methods below in turn. */ @@ -407,13 +407,13 @@ private: virtual bool readCurrentDir(int pid)=0; }; -/** +/** * Lightweight class which provides additional information about SSH processes. */ class SSHProcessInfo { public: - /** + /** * Constructs a new SSHProcessInfo instance which provides additional * information about the specified SSH process. * @@ -421,7 +421,7 @@ public: */ SSHProcessInfo(const ProcessInfo& process); - /** + /** * Returns the user name which the user initially logged into on * the remote computer. */ @@ -437,8 +437,8 @@ public: */ QString port() const; - /** - * Returns the command which the user specified to execute on the + /** + * Returns the command which the user specified to execute on the * remote computer when starting the SSH process. */ QString command() const; diff --git a/src/Profile.h b/src/Profile.h index 445ec11ee..95a7290da 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -44,7 +44,7 @@ namespace Konsole class ProfileGroup; /** - * Represents a terminal set-up which can be used to + * Represents a terminal set-up which can be used to * set the initial state of new terminal sessions or applied * to existing sessions. Profiles consist of a number of named * properties, which can be retrieved using property() and @@ -54,9 +54,9 @@ class ProfileGroup; * Profiles support a simple form of inheritance. When a new Profile * is constructed, a pointer to a parent profile can be passed to * the constructor. When querying a particular property of a profile - * using property(), the profile will return its own value for that + * using property(), the profile will return its own value for that * property if one has been set or otherwise it will return the - * parent's value for that property. + * parent's value for that property. * * Profiles can be loaded from disk using ProfileReader instances * and saved to disk using ProfileWriter instances. @@ -87,8 +87,8 @@ public: Name, /** (QString) Title of this profile that will be displayed. */ Title, - /** (QString) The name of the icon associated with this profile. This - * is used in menus and tabs to represent the profile. + /** (QString) The name of the icon associated with this profile. This + * is used in menus and tabs to represent the profile. */ Icon, /** (QString) The command to execute ( excluding arguments ) when creating a new terminal @@ -97,19 +97,19 @@ public: Command, /** (QStringList) The arguments which are passed to the program specified by * the Command property when creating a new terminal session using this profile. - */ + */ Arguments, /** (QStringList) Additional environment variables ( in the form of NAME=VALUE pairs ) * which are passed to the program specified by the Command property - * when creating a new terminal session using this profile. - */ + * when creating a new terminal session using this profile. + */ Environment, - /** (QString) The initial working directory for sessions created using this profile. */ + /** (QString) The initial working directory for sessions created using this profile. */ Directory, /** (QString) The format used for tab titles when running normal commands. */ LocalTabTitleFormat, - /** (QString) The format used for tab titles when the session is running - * a remote command (eg. SSH) */ + /** (QString) The format used for tab titles when the session is running + * a remote command (eg. SSH) */ RemoteTabTitleFormat, /** (bool) Specifies whether the menu bar should be shown in the main application window. */ ShowMenuBar, @@ -118,17 +118,17 @@ public: /** (bool) Specifies whether the geometry information is saved when window is closed. */ SaveGeometryOnExit, /** (TabBarModeEnum) Specifies when the tab bar should be shown in - * the main application window. */ + * the main application window. */ TabBarMode, /** (QFont) The font to use in terminal displays using this profile. */ Font, - /** (QString) - * The name of the color scheme to use in terminal displays using this profile. - * Color schemes are managed by the ColorSchemeManager class. + /** (QString) + * The name of the color scheme to use in terminal displays using this profile. + * Color schemes are managed by the ColorSchemeManager class. */ ColorScheme, - /** (QString) The name of the key bindings. - * Key bindings are managed by the KeyboardTranslatorManager class. + /** (QString) The name of the key bindings. + * Key bindings are managed by the KeyboardTranslatorManager class. */ KeyBindings, /** (HistoryModeEnum) Specifies the storage type used for keeping the output produced @@ -140,7 +140,7 @@ public: * Only applicable if the HistoryMode property is FixedSizeHistory */ HistorySize, - /** (ScrollBarPositionEnum) Specifies the position of the scroll bar in + /** (ScrollBarPositionEnum) Specifies the position of the scroll bar in * terminal displays using this profile. */ ScrollBarPosition, @@ -150,13 +150,13 @@ public: BlinkingTextEnabled, /** (bool) Specifies whether the flow control keys ( typically Ctrl+S , Ctrl+Q ) * have any effect. Also known as Xon/Xoff - */ + */ FlowControlEnabled, - /** (bool) Specifies whether programs running in the terminal are allowed to - * resize the terminal display. + /** (bool) Specifies whether programs running in the terminal are allowed to + * resize the terminal display. */ AllowProgramsToResizeWindow, - /** (bool) Specifies whether the cursor blinks ( in a manner similar + /** (bool) Specifies whether the cursor blinks ( in a manner similar * to text editing applications ) */ BlinkingCursorEnabled, @@ -165,10 +165,10 @@ public: * color to match the character underneath it. */ UseCustomCursorColor, - /** (CursorShapeEnum) The shape used by terminal displays to represent the cursor. */ + /** (CursorShapeEnum) The shape used by terminal displays to represent the cursor. */ CursorShape, /** (QColor) The color used by terminal displays to draw the cursor. Only applicable - * if the UseCustomCursorColor property is true. */ + * if the UseCustomCursorColor property is true. */ CustomCursorColor, /** (QString) A string consisting of the characters used to delimit words when * selecting text in the terminal display. @@ -193,7 +193,7 @@ public: /** (bool) Whether character with intense colors should be rendered in bold font * or just in bright color. */ BoldIntense, - /** (bool) Whether new sessions should be started in the same directory as the + /** (bool) Whether new sessions should be started in the same directory as the * currently active session. */ StartInCurrentSessionDir, /** (bool) Whether a 'New Tab' and 'Close Tab' buttons should be shown on the tab bar */ @@ -206,8 +206,8 @@ public: MenuIndex }; - /** - * This enum describes the available modes for showing or hiding the tab bar. + /** + * This enum describes the available modes for showing or hiding the tab bar. */ enum TabBarModeEnum { @@ -219,8 +219,8 @@ public: AlwaysShowTabBar = 2 }; - /** - * This enum describes the available tab bar positions. + /** + * This enum describes the available tab bar positions. */ enum TabBarPositionEnum { @@ -230,8 +230,8 @@ public: TabBarTop = 1 }; - /** - * This enum describes where newly created tab should be placed. + /** + * This enum describes where newly created tab should be placed. */ enum NewTabBehaviorEnum { @@ -241,9 +241,9 @@ public: PutNewTabAfterCurrentTab = 1 }; - /** - * This enum describes the modes available to remember lines of output produced - * by the terminal. + /** + * This enum describes the modes available to remember lines of output produced + * by the terminal. */ enum HistoryModeEnum { @@ -252,7 +252,7 @@ public: /** A fixed number of lines of output are remembered. Once the limit is reached, the oldest * lines are lost. */ FixedSizeHistory = 1, - /** All output is remembered for the duration of the session. + /** All output is remembered for the duration of the session. * Typically this means that lines are recorded to * a file as they are scrolled off-screen. */ @@ -313,7 +313,7 @@ public: */ void clone(Ptr profile, bool differentOnly = true); - /** + /** * Changes the parent profile. When calling the property() method, * if the specified property has not been set for this profile, * the parent's value for the property will be returned instead. @@ -327,7 +327,7 @@ public: const GroupPtr asGroup() const; GroupPtr asGroup(); - /** + /** * Returns the current value of the specified @p property, cast to type T. * Internally properties are stored using the QVariant type and cast to T * using QVariant::value(); @@ -350,11 +350,11 @@ public: /** Returns true if no properties have been set in this Profile instance. */ bool isEmpty() const; - /** + /** * Returns true if this is a 'hidden' profile which should not be displayed * in menus or saved to disk. * - * This is used for the fallback profile, in case there are no profiles on + * This is used for the fallback profile, in case there are no profiles on * disk which can be loaded, or for overlay profiles created to handle * command-line arguments which change profile properties. */ @@ -400,13 +400,13 @@ public: int menuIndexAsInt() const; - /** Return a list of all properties names and their type + /** Return a list of all properties names and their type * (for use with -p option). */ const QStringList propertiesInfoList() const; - /** - * Returns the element from the Property enum associated with the + /** + * Returns the element from the Property enum associated with the * specified @p name. * * @param name The name of the property to look for, this is case insensitive. @@ -469,7 +469,7 @@ inline bool Profile::canInheritProperty(Property property) { return property != Name && property != Path; } -/** +/** * A profile which contains a number of default settings for various properties. * This can be used as a parent for other profiles or a fallback in case * a profile cannot be loaded from disk. @@ -480,7 +480,7 @@ public: FallbackProfile(); }; -/** +/** * A composite profile which allows a group of profiles to be treated as one. * When setting a property, the new value is applied to all profiles in the group. * When reading a property, if all profiles in the group have the same value @@ -502,7 +502,7 @@ public: ProfileGroup(Profile::Ptr parent = Profile::Ptr()); /** Add a profile to the group. Calling setProperty() will update this profile. - * When creating a group, add the profiles to the group then call updateValues() to + * When creating a group, add the profiles to the group then call updateValues() to * make the group's property values reflect the profiles currently in the group. */ void addProfile(Profile::Ptr profile) { _profiles.append(profile); } @@ -516,9 +516,9 @@ public: QList profiles() const { return _profiles; } - /** - * Updates the property values in this ProfileGroup to match those from - * the group's profiles() + /** + * Updates the property values in this ProfileGroup to match those from + * the group's profiles() * * For each available property, if each profile in the group has the same value then * the ProfileGroup will use that value for the property. Otherwise the value for the property @@ -558,8 +558,8 @@ public: virtual ~ProfileReader() {} /** Returns a list of paths to profiles which this reader can read. */ virtual QStringList findProfiles() { return QStringList(); } - /** - * Attempts to read a profile from @p path and + /** + * Attempts to read a profile from @p path and * save the property values described into @p profile. * * Returns true if the profile was successfully read or false otherwise. @@ -592,8 +592,8 @@ class ProfileWriter { public: virtual ~ProfileWriter() {} - /** - * Returns a suitable path-name for writing + /** + * Returns a suitable path-name for writing * @p profile to. The path-name should be accepted by * the corresponding ProfileReader class. */ @@ -616,7 +616,7 @@ private: const Profile::PropertyInfo* properties); }; -/** +/** * Parses an input string consisting of property names * and assigned values and returns a table of properties * and values. @@ -625,7 +625,7 @@ private: * * @code * PropertyName=Value;PropertyName=Value ... - * @endcode + * @endcode * * For example: * @@ -638,7 +638,7 @@ class KONSOLEPRIVATE_EXPORT ProfileCommandParser public: /** * Parses an input string consisting of property names - * and assigned values and returns a table of + * and assigned values and returns a table of * properties and values. */ QHash parse(const QString& input); diff --git a/src/ProfileList.h b/src/ProfileList.h index cbc9e8e25..4a6574c70 100644 --- a/src/ProfileList.h +++ b/src/ProfileList.h @@ -36,25 +36,25 @@ namespace Konsole class Profile; -/** - * ProfileList provides a list of actions which represent session profiles - * that a SessionManager can create a session from. +/** + * ProfileList provides a list of actions which represent session profiles + * that a SessionManager can create a session from. * * These actions can be plugged into a GUI. * - * Currently only profiles marked as favorites in the SessionManager are included. + * Currently only profiles marked as favorites in the SessionManager are included. * - * The user-data associated with each session can be passed to the createProfile() method of the - * SessionManager to create a new terminal session. + * The user-data associated with each session can be passed to the createProfile() method of the + * SessionManager to create a new terminal session. */ class KONSOLEPRIVATE_EXPORT ProfileList : public QObject { Q_OBJECT public: - /** - * Constructs a new session list which displays sessions - * that can be created by @p manager + /** + * Constructs a new session list which displays sessions + * that can be created by @p manager * * @param addShortcuts True if the shortcuts associated with profiles * in the session manager should be added to the actions @@ -62,20 +62,20 @@ public: */ ProfileList(bool addShortcuts , QObject* parent); - /** + /** * Returns a list of actions representing the types of sessions which can be created by - * manager(). + * manager(). * The user-data associated with each action is the string key that can be passed to - * the manager to request creation of a new session. + * the manager to request creation of a new session. */ QList actions(); - /** TODO: Document me */ + /** TODO: Document me */ void syncWidgetActions(QWidget* widget,bool sync); signals: - /** + /** * Emitted when the user selects an action from the list. - * + * * @param profile The profile to select */ void profileSelected(Profile::Ptr profile); diff --git a/src/Pty.h b/src/Pty.h index 51fdb9f9a..709fe0ae7 100644 --- a/src/Pty.h +++ b/src/Pty.h @@ -1,5 +1,5 @@ /* - This file is part of Konsole, KDE's terminal emulator. + This file is part of Konsole, KDE's terminal emulator. Copyright 2007-2008 by Robert Knight Copyright 1997,1998 by Lars Doelle @@ -39,8 +39,8 @@ namespace Konsole { /** - * The Pty class is used to start the terminal process, - * send data to it, receive data from it and manipulate + * 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 * used to communicate with the process. * @@ -49,7 +49,7 @@ namespace Konsole * send data to or receive data from the process. * * To start the terminal process, call the start() method - * with the program name and appropriate arguments. + * with the program name and appropriate arguments. */ class KONSOLEPRIVATE_EXPORT Pty: public KPtyProcess { @@ -57,18 +57,18 @@ Q_OBJECT public: - /** + /** * Constructs a new Pty. * * Connect to the sendData() slot and receivedData() signal to prepare * for sending and receiving data from the terminal process. * - * To start the terminal process, call the run() method with the + * To start the terminal process, call the run() method with the * name of the program to start and appropriate arguments. */ explicit Pty(QObject* parent = 0); - /** + /** * Construct a process using an open pty master. * See KPtyProcess::KPtyProcess() */ @@ -77,7 +77,7 @@ public: ~Pty(); /** - * Starts the terminal process. + * Starts the terminal process. * * Returns 0 if the process was started successfully or non-zero * otherwise. @@ -90,11 +90,11 @@ public: * @param winid Specifies the value of the WINDOWID environment variable * in the process's environment. * @param addToUtmp Specifies whether a utmp entry should be created for - * the pty used. See K3Process::setUsePty() - * @param dbusService Specifies the value of the KONSOLE_DBUS_SERVICE + * the pty used. See K3Process::setUsePty() + * @param dbusService Specifies the value of the KONSOLE_DBUS_SERVICE * environment variable in the process's environment. * @param dbusSession Specifies the value of the KONSOLE_DBUS_SESSION - * environment variable in the process's environment. + * environment variable in the process's environment. */ int start( const QString& program, const QStringList& arguments, @@ -108,7 +108,7 @@ public: /** Control whether the pty device is writeable by group members. */ void setWriteable(bool writeable); - /** + /** * Enables or disables Xon/Xoff flow control. The flow control setting * may be changed later by a terminal application, so flowControlEnabled() * may not equal the value of @p on in the previous call to setFlowControlEnabled() @@ -118,8 +118,8 @@ public: /** Queries the terminal state and returns true if Xon/Xoff flow control is enabled. */ bool flowControlEnabled() const; - /** - * Sets the size of the window (in lines and columns of characters) + /** + * Sets the size of the window (in lines and columns of characters) * used by this teletype. */ void setWindowSize(int lines, int cols); @@ -159,7 +159,7 @@ public slots: void setUtf8Mode(bool on); /** - * Suspend or resume processing of data from the standard + * Suspend or resume processing of data from the standard * output of the terminal process. * * See K3Process::suspend() and K3Process::resume() @@ -169,8 +169,8 @@ public slots: */ void lockPty(bool lock); - /** - * Sends data to the process currently controlling the + /** + * Sends data to the process currently controlling the * teletype ( whose id is returned by foregroundProcessGroup() ) * * @param buffer Pointer to the data to send. @@ -193,7 +193,7 @@ protected: void setupChildProcess(); private slots: - // called when data is received from the terminal process + // called when data is received from the terminal process void dataReceived(); private: diff --git a/src/Screen.h b/src/Screen.h index b8c40f3ee..7a0f35b77 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -57,21 +57,21 @@ class HistoryScroll; characters from the program currently running in the terminal. From this stream it creates an image of characters which is ultimately rendered by the display widget ( TerminalDisplay ). Some types of emulation - may have more than one screen image. + may have more than one screen image. getImage() is used to retrieve the currently visible image which is then used by the display widget to draw the output from the - terminal. + terminal. The number of lines of output history which are kept in addition to the current - screen image depends on the history scroll being used to store the output. + screen image depends on the history scroll being used to store the output. The scroll is specified using setScroll() The output history can be retrieved using writeToStream() - The screen image has a selection associated with it, specified using + The screen image has a selection associated with it, specified using setSelectionStart() and setSelectionEnd(). The selected text can be retrieved using selectedText(). When getImage() is used to retrieve the visible image, - characters which are part of the selection have their colours inverted. + characters which are part of the selection have their colours inverted. */ class Screen { @@ -80,25 +80,25 @@ public: Screen(int lines, int columns); ~Screen(); - // VT100/2 Operations + // VT100/2 Operations // Cursor Movement - /** - * Move the cursor up by @p n lines. The cursor will stop at the + /** + * Move the cursor up by @p n lines. The cursor will stop at the * top margin. */ void cursorUp(int n); - /** + /** * Move the cursor down by @p n lines. The cursor will stop at the * bottom margin. */ void cursorDown(int n); - /** + /** * Move the cursor to the left by @p n columns. * The cursor will stop at the first column. */ void cursorLeft(int n); - /** + /** * Move the cursor to the right by @p n columns. * The cursor will stop at the right-most column. */ @@ -112,28 +112,28 @@ public: /** * 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. + * @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. */ 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 + /** + * Moves the cursor down one line, if the MODE_NewLine mode * flag is enabled then the cursor is returned to the leftmost * column first. * * Equivalent to NextLine() if the MODE_NewLine flag is set - * or index() otherwise. + * or index() otherwise. */ void newLine(); /** @@ -142,7 +142,7 @@ public: */ 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. @@ -155,11 +155,11 @@ public: */ 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 + /** + * 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. @@ -167,12 +167,12 @@ public: * using setMargins() */ void scrollDown(int n); - /** - * Moves the cursor to the beginning of the current line. + /** + * Moves the cursor to the beginning of the current line. * Equivalent to setCursorX(0) */ void toStartOfLine(); - /** + /** * Moves the cursor one column to the left and erases the character * at the new cursor position. */ @@ -184,25 +184,25 @@ public: // Editing - /** - * Erase @p n characters beginning from the current cursor position. + /** + * 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. + * 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. + /** + * 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. + * 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. @@ -216,14 +216,14 @@ public: void insertLines(int n); /** 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. */ void resetMode(int 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() */ @@ -233,18 +233,18 @@ public: /** Returns whether the specified screen @p mode is enabled or not .*/ bool getMode(int mode) const; - /** - * Saves the current position and appearance (text color and style) of the cursor. - * It can be restored by calling restoreCursor() - */ + /** + * Saves the current position and appearance (text color and style) of the cursor. + * It can be restored by calling restoreCursor() + */ void saveCursor(); /** Restores the position and appearance 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 + /** + * Clear the area of the screen from the current cursor position to the end of * the screen. */ void clearToEndOfScreen(); @@ -263,12 +263,12 @@ public: /** Fills the entire screen with the letter 'E' */ void helpAlign(); - /** - * Enables the given @p rendition flag. Rendition flags control the appearance + /** + * Enables the given @p rendition flag. Rendition flags control the appearance * of characters on the screen. * * @see Character::rendition - */ + */ void setRendition(int rendition); /** * Disables the given @p rendition flag. Rendition flags control the appearance @@ -278,7 +278,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 @@ -296,8 +296,8 @@ public: * @see CharacterColor */ void setBackColor(int space, int color); - /** - * Resets the cursor's color back to the default and sets the + /** + * Resets the cursor's color back to the default and sets the * character's rendition flags back to the default settings. */ void setDefaultRendition(); @@ -311,9 +311,9 @@ public: * Equivalent to calling clearEntireScreen() followed by home(). */ void clear(); - /** + /** * Sets the position of the cursor to the 'home' position at the top-left - * corner of the screen (0,0) + * corner of the screen (0,0) */ void home(); /** @@ -330,38 +330,38 @@ public: *
  • New line mode is disabled. TODO Document me
  • *
* - * If @p clearScreen is true then the screen contents are erased entirely, + * If @p clearScreen is true then the screen contents are erased entirely, * otherwise they are unaltered. */ void reset(bool clearScreen = true); - /** - * Displays a new character at the current cursor position. - * + /** + * Displays a new character at the current cursor position. + * * If the cursor is currently positioned at the right-edge of the screen and - * line wrapping is enabled then the character is added at the start of a new + * line wrapping is enabled then the character is added at the start of a new * line below the current one. * - * If the MODE_Insert screen mode is currently enabled then the character - * is inserted at the current cursor position, otherwise it will replace the - * character already at the current cursor position. - */ + * If the MODE_Insert screen mode is currently enabled then the character + * is inserted at the current cursor position, otherwise it will replace the + * character already at the current cursor position. + */ void displayCharacter(unsigned short c); - /** - * Resizes the image to a new fixed size of @p new_lines by @p new_columns. + /** + * 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 * if the terminal display is resized smaller and then larger again. * - * The top and bottom margins are reset to the top and bottom of the new + * The top and bottom margins are reset to the top and bottom of the new * screen size. Tab stops are also reset and the current selection is * cleared. */ void resizeImage(int new_lines, int new_columns); /** - * Returns the current screen image. + * 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. * @@ -372,9 +372,9 @@ 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 + * The most important attribute is LINE_WRAPPED which specifies that the * line is wrapped, * other attributes control the size of characters in the line. */ @@ -389,21 +389,21 @@ public: { return columns; } /** Return the number of lines in the history buffer. */ int getHistLines() const; - /** - * Sets the type of storage used to keep lines in the history. - * If @p copyPreviousScroll is true then the contents of the previous + /** + * 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. */ const HistoryType& getScroll() const; - /** + /** * Returns true if this screen keeps lines that are scrolled off the screen * in a history buffer. */ bool hasScroll() const; - /** + /** * Sets the start of the selection. * * @param column The column index of the first character in the selection. @@ -416,8 +416,8 @@ public: * Sets the end of the current selection. * * @param column The column index of the last character in the selection. - * @param line The line index of the last character in the selection. - */ + * @param line The line index of the last character in the selection. + */ void setSelectionEnd(const int column, const int line); /** @@ -435,15 +435,15 @@ public: /** Clears the current selection */ void clearSelection(); - /** + /** * Returns true if the character at (@p column, @p line) is part of the - * current selection. - */ + * 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 + /** + * 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) const; @@ -461,11 +461,11 @@ public: * Copies the selected characters, set using @see setSelBeginXY and @see setSelExtentXY * into a stream. * - * @param decoder A decoder which converts terminal characters into text. - * PlainTextDecoder is the most commonly used decoder which converts characters + * @param decoder A decoder which converts terminal characters into text. + * PlainTextDecoder is the most commonly used decoder which converts characters * into plain text with no formatting. - * @param preserveLineBreaks Specifies whether new line characters should - * be inserted into the returned text at the end of each terminal line. + * @param preserveLineBreaks Specifies whether new line characters should + * be inserted into the returned text at the end of each terminal line. */ void writeSelectionToStream(TerminalCharacterDecoder* decoder , bool preserveLineBreaks = true) const; @@ -482,15 +482,15 @@ public: */ void checkSelection(int from, int to); - /** + /** * Sets or clears an attribute of the current line. - * + * * @param property The attribute to set or clear * Possible properties are: * LINE_WRAPPED: Specifies that the line is wrapped. * LINE_DOUBLEWIDTH: Specifies that the characters in the current line * should be double the normal width. - * LINE_DOUBLEHEIGHT:Specifies that the characters in the current line + * LINE_DOUBLEHEIGHT:Specifies that the characters in the current line * should be double the normal height. * Double-height lines are formed of two lines containing the same characters, * with both having the LINE_DOUBLEHEIGHT attribute. @@ -501,24 +501,24 @@ 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(). * * a positive return value indicates that the image has been scrolled up, - * a negative return value indicates that the image has been scrolled down. + * a negative return value indicates that the image has been scrolled down. */ 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 + * This is the area of the image from the top margin to the * bottom margin when the last scroll occurred. */ QRect lastScrolledRegion() const; - /** + /** * Resets the count of the number of lines that the image has been scrolled up or down by, * see scrolledLines() */ @@ -531,7 +531,7 @@ public: * * If the history is not unlimited then it will drop * the oldest lines of output if new lines are added when - * it is full. + * it is full. */ int droppedLines() const; @@ -541,7 +541,7 @@ public: */ void resetDroppedLines(); - /** + /** * Fills the buffer @p dest with @p count instances of the default (ie. blank) * Character style. */ @@ -576,14 +576,14 @@ public: static const Character defaultChar; -private: +private: - //copies a line of text from the screen or history into a stream using a + //copies a line of text from the screen or history into a stream using a //specified character decoder. Returns the number of lines actually copied, //which may be less than 'count' if (start+count) is more than the number of characters on - //the line + //the line // - //line - the line number to copy, from 0 (the earliest line in the history) up to + //line - the line number to copy, from 0 (the earliest line in the history) up to // history->getLines() + lines - 1 //start - the first column on the line to copy //count - the number of characters on the line to copy @@ -607,7 +607,7 @@ private: // //NOTE: moveImage() can only move whole lines void moveImage(int dest, int sourceBegin, int sourceEnd); - // scroll up 'i' lines in current region, clearing the bottom 'i' lines + // scroll up 'i' lines in current region, clearing the bottom 'i' lines void scrollUp(int from, int i); // scroll down 'i' lines in current region, clearing the top 'i' lines void scrollDown(int from, int i); diff --git a/src/ScreenWindow.h b/src/ScreenWindow.h index dd65e60b7..9031bc8c9 100644 --- a/src/ScreenWindow.h +++ b/src/ScreenWindow.h @@ -35,7 +35,7 @@ class Screen; /** * Provides a window onto a section of a terminal screen. A terminal widget can then render - * the contents of the window and use the window to change the terminal screen's selection + * the contents of the window and use the window to change the terminal screen's selection * in response to mouse or keyboard input. * * A new ScreenWindow for a terminal session can be created by calling Emulation::createWindow() @@ -55,7 +55,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(). * @@ -72,7 +72,7 @@ public: /** 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. * @@ -89,14 +89,14 @@ public: /** * 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 + * specified by scrollRegion() has been scrolled by since the last call + * to resetScrollCount(). scrollRegion() is in most cases the * whole window, but will be a smaller area in, for example, applications * which provide split-screen facilities. * * This is not guaranteed to be accurate, but allows views to optimize * rendering by reducing the amount of costly text rendering that - * needs to be done when the output is scrolled. + * needs to be done when the output is scrolled. */ int scrollCount() const; @@ -106,7 +106,7 @@ public: void resetScrollCount(); /** - * Returns the area of the window which was last scrolled, this is + * Returns the area of the window which was last scrolled, this is * usually the whole window area. * * Like scrollCount(), this is not guaranteed to be accurate, @@ -114,8 +114,8 @@ public: */ QRect scrollRegion() const; - /** - * Sets the start of the selection to the given @p line and @p column within + /** + * 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 ); @@ -148,7 +148,7 @@ public: * 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(); @@ -168,13 +168,13 @@ public: /** Returns the index of the line which is currently at the top of this window */ int currentLine() const; - /** - * Returns the position of the cursor + /** + * 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. */ @@ -188,33 +188,33 @@ public: { /** Scroll the window down by a given number of lines. */ ScrollLines, - /** + /** * Scroll the window down by a given number of pages, where * one page is windowLines() lines */ 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 - * of pages to scroll. + * of pages to scroll. * @param amount The number of lines or pages ( depending on @p mode ) to scroll by. If * this number is positive, the view is scrolled down. If this number is negative, the view * is scrolled up. */ void scrollBy( RelativeScrollMode mode , int amount ); - /** + /** * Specifies whether the window should automatically move to the bottom * of the screen when new output is added. * - * If this is set to true, the window will be moved to the bottom of the associated screen ( see + * If this is set to true, the window will be moved to the bottom of the associated screen ( see * 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() */ @@ -228,7 +228,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. @@ -237,13 +237,13 @@ public slots: signals: /** - * Emitted when the contents of the associated terminal screen (see screen()) changes. + * 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); diff --git a/src/Session.h b/src/Session.h index 08aceb05e..2b51ac8b7 100644 --- a/src/Session.h +++ b/src/Session.h @@ -89,9 +89,9 @@ public: explicit Session(QObject* parent = 0); ~Session(); - /** - * Connect to an existing terminal. When a new Session() is constructed it - * automatically searches for and opens a new teletype. If you want to + /** + * Connect to an existing terminal. When a new Session() is constructed it + * automatically searches for and opens a new teletype. If you want to * use an existing teletype (given its file descriptor) call this after * constructing the session. * @@ -157,7 +157,7 @@ public: }; /** - * Returns true if the session currently contains a connection to a + * Returns true if the session currently contains a connection to a * remote computer. It currently supports ssh. */ bool isRemote(); @@ -275,7 +275,7 @@ public: /** Returns the session's title for the specified @p role. */ QString title(TitleRole role) const; - /** + /** * Specifies whether a utmp entry should be created for the pty used by this session. * If true, KPty::login() is called when the session is started. */ @@ -329,9 +329,9 @@ public: void cancelZModem(); bool isZModemBusy() { return _zmodemBusy; } - /** + /** * Possible values of the @p what parameter for setUserTitle() - * See "Operating System Controls" section on http://rtfm.etla.org/xterm/ctlseq.html + * See "Operating System Controls" section on http://rtfm.etla.org/xterm/ctlseq.html */ enum UserTitleChange { @@ -559,7 +559,7 @@ signals: * should be changed. */ void changeBackgroundColorRequest(const QColor&); - /** + /** * Requests that the text color of views on this session should * be changed to @p color. */ @@ -651,7 +651,7 @@ private: WId windowId() const; bool kill(int signal); // print a warning message in the terminal. This is used - // if the program fails to start, or if the shell exits in + // if the program fails to start, or if the shell exits in // an unsuccessful manner void terminalWarning(const QString& message); // checks that the binary 'program' is available and can be executed diff --git a/src/SessionController.h b/src/SessionController.h index 730c85aa6..5b08e9829 100644 --- a/src/SessionController.h +++ b/src/SessionController.h @@ -77,7 +77,7 @@ typedef QPointer SessionPtr; * The actions provided by this class are defined in the sessionui.rc XML file. * * SessionController monitors the session and provides access to basic information - * about the session such as title(), icon() and currentDir(). SessionController + * about the session such as title(), icon() and currentDir(). SessionController * provides notifications of activity in the session via the activity() signal. * * When the controlled view receives the focus, the focused() signal is emitted @@ -101,7 +101,7 @@ public: /** Returns the view associated with this controller */ QPointer view() { return _view; } - /** + /** * Returns true if the controller is valid. * A valid controller is one which has a non-null session() and view(). * @@ -109,22 +109,22 @@ public: */ bool isValid() const; - /** + /** * Sets the widget used for searches through the session's output. * - * When the user clicks on the "Search Output" menu action the @p searchBar 's - * show() method will be called. The SessionController will then connect to the search + * When the user clicks on the "Search Output" menu action the @p searchBar 's + * show() method will be called. The SessionController will then connect to the search * bar's signals to update the search when the widget's controls are pressed. */ void setSearchBar( IncrementalSearchBar* searchBar ); - /** + /** * see setSearchBar() */ IncrementalSearchBar* searchBar() const; /** * Sets the action displayed in the session's context menu to hide or - * show the menu bar. + * show the menu bar. */ void setShowMenuAction(QAction* action); @@ -144,17 +144,17 @@ public: signals: /** - * Emitted when the view associated with the controller is focused. + * Emitted when the view associated with the controller is focused. * This can be used by other classes to plug the controller's actions into a window's - * menus. + * menus. */ void focused( SessionController* controller ); public slots: /** * Issues a command to the session to navigate to the specified URL. - * This may not succeed if the foreground program does not understand - * the command sent to it ( 'cd path' for local URLs ) or is not + * This may not succeed if the foreground program does not understand + * the command sent to it ( 'cd path' for local URLs ) or is not * responding to input. * * openUrl() currently supports urls for local paths and those @@ -298,7 +298,7 @@ inline bool SessionController::isValid() const return !_session.isNull() && !_view.isNull(); } -/** +/** * Abstract class representing a task which can be performed on a group of sessions. * * Create a new instance of the appropriate sub-class for the task you want to perform and @@ -314,7 +314,7 @@ Q_OBJECT public: SessionTask(QObject* parent = 0); - /** + /** * Sets whether the task automatically deletes itself when the task has been finished. * Depending on whether the task operates synchronously or asynchronously, the deletion * may be scheduled immediately after execute() returns or it may happen some time later. @@ -326,7 +326,7 @@ public: /** Adds a new session to the group */ void addSession(Session* session); - /** + /** * Executes the task on each of the sessions in the group. * The completed() signal is emitted when the task is finished, depending on the specific sub-class * execute() may be synchronous or asynchronous @@ -334,8 +334,8 @@ public: virtual void execute() = 0; signals: - /** - * Emitted when the task has completed. + /** + * Emitted when the task has completed. * Depending on the task this may occur just before execute() returns, or it * may occur later * @@ -416,8 +416,8 @@ class SearchHistoryTask : public SessionTask Q_OBJECT public: - /** - * This enum describes the strategies available for searching through the + /** + * This enum describes the strategies available for searching through the * session's output. */ enum SearchDirection @@ -428,8 +428,8 @@ public: BackwardsSearch }; - /** - * Constructs a new search task. + /** + * Constructs a new search task. */ explicit SearchHistoryTask(QObject* parent = 0); @@ -441,17 +441,17 @@ public: /** Returns the regular expression which is searched for when execute() is called */ QRegExp regExp() const; - /** Specifies the direction to search in when execute() is called. */ + /** Specifies the direction to search in when execute() is called. */ void setSearchDirection( SearchDirection direction ); /** Returns the current search direction. See setSearchDirection(). */ SearchDirection searchDirection() const; - /** + /** * Performs a search through the session's history, starting at the position * of the current selection, in the direction specified by setSearchDirection(). * - * If it finds a match, the ScreenWindow specified in the constructor is - * scrolled to the position where the match occurred and the selection + * If it finds a match, the ScreenWindow specified in the constructor is + * scrolled to the position where the match occurred and the selection * is set to the matching text. execute() then returns immediately. * * To continue the search looking for further matches, call execute() again. diff --git a/src/SessionManager.h b/src/SessionManager.h index f3cb5d05c..5996dafa1 100644 --- a/src/SessionManager.h +++ b/src/SessionManager.h @@ -54,15 +54,15 @@ class Session; * Profiles in the manager have a concept of favorite status, which can be used * by widgets and dialogs in the application decide which sessions to list and * how to display them. The favorite status of a profile can be altered using - * setFavorite() and retrieved using isFavorite() + * setFavorite() and retrieved using isFavorite() */ class KONSOLEPRIVATE_EXPORT SessionManager : public QObject { Q_OBJECT public: - /** - * Constructs a new session manager and loads information about the available + /** + * Constructs a new session manager and loads information about the available * profiles. */ SessionManager(); @@ -107,13 +107,13 @@ public: /** - * Loads a profile from the specified path and registers + * Loads a profile from the specified path and registers * it with the SessionManager. * - * @p path may be relative or absolute. The path may just be the + * @p path may be relative or absolute. The path may just be the * base name of the profile to load (eg. if the profile's full path * is "/My Profile.profile" then both - * "konsole/My Profile.profile" , "My Profile.profile" and + * "konsole/My Profile.profile" , "My Profile.profile" and * "My Profile" will be accepted) * * @return Pointer to a profile which can be passed to createSession() @@ -157,7 +157,7 @@ public: * must be created in order to display the output from the terminal session and * send keyboard or mouse input to it. * - * @param profile A profile containing the settings for the new session. If @p profile + * @param profile A profile containing the settings for the new session. If @p profile * is null the default profile (see defaultProfile()) will be used. */ Session* createSession(Profile::Ptr profile = Profile::Ptr()); @@ -203,14 +203,14 @@ public: * can be used to create new sessions based on * existing profiles * - * When one of the shortcuts is activated, + * When one of the shortcuts is activated, * use findByShortcut() to load the profile associated - * with the shortcut. + * with the shortcut. */ QList shortcuts(); /** - * Finds and loads the profile associated with + * Finds and loads the profile associated with * the specified @p shortcut key sequence and returns a pointer to it. */ Profile::Ptr findByShortcut(const QKeySequence& shortcut); @@ -223,8 +223,8 @@ public: /** Returns the shortcut associated with a particular profile. */ QKeySequence shortcut(Profile::Ptr profile) const; - /** - * Registers a new type of session. + /** + * Registers a new type of session. * The favorite status of the session ( as returned by isFavorite() ) is set to false by default. */ void addProfile(Profile::Ptr type); @@ -235,9 +235,9 @@ public: */ void setFavorite(Profile::Ptr profile , bool favorite); - /** + /** * Loads all available profiles. This involves reading each - * profile configuration file from disk and parsing it. + * profile configuration file from disk and parsing it. * Therefore it should only be done when necessary. */ void loadAllProfiles(); @@ -265,22 +265,22 @@ signals: /** Emitted when a profile's properties are modified. */ void profileChanged(Profile::Ptr ptr); - /** - * Emitted when a session's settings are updated to match - * its current profile. + /** + * Emitted when a session's settings are updated to match + * its current profile. */ void sessionUpdated(Session* session); - /** - * Emitted when the favorite status of a profile changes. - * - * @param profile The profile to change - * @param favorite Specifies whether the session is a favorite or not + /** + * Emitted when the favorite status of a profile changes. + * + * @param profile The profile to change + * @param favorite Specifies whether the session is a favorite or not */ void favoriteStatusChanged(Profile::Ptr profile , bool favorite); - /** - * Emitted when the shortcut for a profile is changed. + /** + * Emitted when the shortcut for a profile is changed. * * @param profile The profile whoose status was changed * @param newShortcut The new shortcut key sequence for the profile @@ -307,7 +307,7 @@ private slots: private: - // loads the mappings between shortcut key sequences and + // loads the mappings between shortcut key sequences and // profile paths void loadShortcuts(); // saves the mappings between shortcut key sequences and @@ -331,7 +331,7 @@ private: void applyProfile(Profile::Ptr profile , bool modifiedPropertiesOnly); // apples updates to the profile @p profile to the session @p session // if modifiedPropertiesOnly is true, only properties which - // are set in @p profile are update ( ie. properties for which profile->isPropertySet() + // are set in @p profile are update ( ie. properties for which profile->isPropertySet() // returns true ) void applyProfile(Session* session , const Profile::Ptr profile , bool modifiedPropertiesOnly); @@ -396,7 +396,7 @@ private: QStack& _stack; int _count; }; -/** +/** * Item-view model which contains a flat list of sessions. * After constructing the model, call setSessions() to set the sessions displayed * in the list. When a session ends (after emitting the finished() signal) it is @@ -412,8 +412,8 @@ Q_OBJECT public: SessionListModel(QObject* parent = 0); - /** - * Sets the list of sessions displayed in the model. + /** + * Sets the list of sessions displayed in the model. * To display all sessions that are currently running in the list, * call setSessions(SessionManager::instance()->sessions()) */ diff --git a/src/ShellCommand.cpp b/src/ShellCommand.cpp index 4d8eaae9e..ac4bad718 100644 --- a/src/ShellCommand.cpp +++ b/src/ShellCommand.cpp @@ -75,7 +75,7 @@ bool ShellCommand::isRootCommand() const bool ShellCommand::isAvailable() const { Q_ASSERT(0); // not implemented yet - return false; + return false; } QStringList ShellCommand::expand(const QStringList& items) { diff --git a/src/ShellCommand.h b/src/ShellCommand.h index 5a5089d24..55e5462f4 100644 --- a/src/ShellCommand.h +++ b/src/ShellCommand.h @@ -26,8 +26,8 @@ namespace Konsole { -/** - * A class to parse and extract information about shell commands. +/** + * A class to parse and extract information about shell commands. * * ShellCommand can be used to: * @@ -36,7 +36,7 @@ namespace Konsole * into its component parts (eg. the command "/bin/sh" and the arguments * "-c","/path/to/my/script") * - *
  • Take a command and a list of arguments and combine them to + *
  • Take a command and a list of arguments and combine them to * form a complete command line. *
  • *
  • Determine whether the binary specified by a command exists in the @@ -45,7 +45,7 @@ namespace Konsole *
  • Determine whether a command-line specifies the execution of * another command as the root user using su/sudo etc. *
  • - * + * */ class ShellCommand { @@ -53,7 +53,7 @@ public: /** * Constructs a ShellCommand from a command line. * - * @param fullCommand The command line to parse. + * @param fullCommand The command line to parse. */ ShellCommand(const QString& fullCommand); /** @@ -66,8 +66,8 @@ public: /** Returns the arguments. */ QStringList arguments() const; - /** - * Returns the full command line. + /** + * Returns the full command line. */ QString fullCommand() const; @@ -83,7 +83,7 @@ public: static QStringList expand(const QStringList& items); private: - QStringList _arguments; + QStringList _arguments; }; } diff --git a/src/TerminalCharacterDecoder.h b/src/TerminalCharacterDecoder.h index a0cbfbeec..3e0b52a9b 100644 --- a/src/TerminalCharacterDecoder.h +++ b/src/TerminalCharacterDecoder.h @@ -40,7 +40,7 @@ namespace Konsole * and background colours and other appearance-related properties into text strings. * * Derived classes may produce either plain text with no other colour or appearance information, or - * they may produce text which incorporates these additional properties. + * they may produce text which incorporates these additional properties. */ class TerminalCharacterDecoder { @@ -74,8 +74,8 @@ class PlainTextDecoder : public TerminalCharacterDecoder public: PlainTextDecoder(); - /** - * Set whether trailing whitespace at the end of lines should be included + /** + * Set whether trailing whitespace at the end of lines should be included * in the output. * Defaults to true. */ @@ -85,9 +85,9 @@ public: * in the output. */ bool trailingWhitespace() const; - /** + /** * Returns of character positions in the output stream - * at which new lines where added. Returns an empty if setTrackLinePositions() is false or if + * at which new lines where added. Returns an empty if setTrackLinePositions() is false or if * the output device is not a string. */ QList linePositions() const; @@ -116,7 +116,7 @@ private: class HTMLDecoder : public TerminalCharacterDecoder { public: - /** + /** * Constructs an HTML decoder using a default black-on-white color scheme. */ HTMLDecoder(); diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h index 010488bd9..149c40383 100644 --- a/src/TerminalDisplay.h +++ b/src/TerminalDisplay.h @@ -59,7 +59,7 @@ class SessionController; * A widget which displays output from a terminal emulation and sends input keypresses and mouse activity * to the terminal. * - * When the terminal emulation receives new output from the program running in the terminal, + * When the terminal emulation receives new output from the program running in the terminal, * it will update the display by calling updateImage(). * * TODO More documentation @@ -94,11 +94,11 @@ public: /** Sets the background picture */ void setWallpaper(ColorSchemeWallpaper::Ptr p); - /** + /** * This enum describes the location where the scroll bar is positioned in the display widget. */ - enum ScrollBarPosition - { + enum ScrollBarPosition + { /** Show the scroll bar on the left side of the display. */ ScrollBarLeft = 0, /** Show the scroll bar on the right side of the display. */ @@ -106,13 +106,13 @@ public: /** Do not show the scroll bar. */ ScrollBarHidden = 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. @@ -133,11 +133,11 @@ 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. * - * WARNING: This function can be expensive depending on the + * WARNING: This function can be expensive depending on the * image size and number of filters in the filterChain() * * TODO - This API does not really allow efficient usage. Revise it so @@ -146,10 +146,10 @@ public: * eg: * - Area of interest may be known ( eg. mouse cursor hovering * over an area ) - */ + */ void processFilters(); - /** + /** * Returns a list of menu actions created by the filters for the content * at the given @p position. */ @@ -166,9 +166,9 @@ public: void setCtrlDrag(bool enable) { _ctrlDrag=enable; } bool ctrlDrag() const { return _ctrlDrag; } - /** + /** * This enum describes the methods for selecting text when - * the user triple-clicks within the display. + * the user triple-clicks within the display. */ enum TripleClickMode { @@ -177,18 +177,18 @@ public: /** 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() */ TripleClickMode tripleClickMode() const { return _tripleClickMode; } /** - * Specifies whether links and email addresses should be underlined when + * Specifies whether links and email addresses should be underlined when * hovered by the mouse. Defaults to true. */ void setUnderlineLinks(bool value) { _underlineLinks = value; } /** - * Returns true if links and email addresses should be underlined when + * Returns true if links and email addresses should be underlined when * hovered by the mouse. */ bool getUnderlineLinks() const { return _underlineLinks; } @@ -206,22 +206,22 @@ public: { /** 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 + /** + * 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 + /** + * Sets the shape of the keyboard cursor. This is the cursor drawn * at the position in the terminal where keyboard input will appear. * - * In addition the terminal display widget also has a cursor for + * In addition the terminal display widget also has a cursor for * the mouse pointer, which can be set using the QWidget::setCursor() * method. * @@ -234,7 +234,7 @@ public: KeyboardCursorShape keyboardCursorShape() const; /** - * Sets the color used to draw the keyboard cursor. + * Sets the color used to draw the keyboard cursor. * * The keyboard cursor defaults to using the foreground color of the character * underneath it. @@ -248,10 +248,10 @@ 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. + * underneath it. */ QColor keyboardCursorColor() const; @@ -276,7 +276,7 @@ public: */ int fontHeight() const { return _fontHeight; } /** - * Returns the width of the characters in the display. + * Returns the width of the characters in the display. * This assumes the use of a fixed-width font. */ int fontWidth() const { return _fontWidth; } @@ -288,7 +288,7 @@ public: QSize sizeHint() const; /** - * Sets which characters, in addition to letters and numbers, + * 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. * @@ -299,23 +299,23 @@ 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 + /** + * Returns the characters which are considered part of a word for the * purpose of selecting words in the display with the mouse. * * @see setWordCharacters() */ QString wordCharacters() const { return _wordCharacters; } - /** - * Sets the type of effect used to alert the user when a 'bell' occurs in the + /** + * Sets the type of effect used to alert the user when a 'bell' occurs in the * terminal session. * * The terminal session can trigger the bell effect by calling bell() with * 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. * @@ -329,24 +329,24 @@ public: * session. */ enum BellMode - { + { /** A system beep. */ - SystemBeepBell=0, - /** + 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, + NotifyBell=1, /** A silent, visual bell (eg. inverting the display's colors briefly) */ - VisualBell=2, + VisualBell=2, /** No bell effects */ - NoBell=3 + NoBell=3 }; /** Play a visual bell for prompt or warning. */ void visualBell(); - /** + /** * Reimplemented. Has no effect. Use setVTFont() to change the font * used to draw characters in the display. */ @@ -355,9 +355,9 @@ public: /** 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. + * is larger than the size of the display itself. */ void setVTFont(const QFont& font); @@ -366,7 +366,7 @@ public: * is enabled or not. Defaults to enabled. */ void setAntialias( bool antialias ) { _antialiasText = antialias; } - /** + /** * Returns true if anti-aliasing of text in the terminal is enabled. */ bool antialias() const { return _antialiasText; } @@ -382,12 +382,12 @@ public: bool getBoldIntense() const { return _boldIntense; } /** - * Sets whether or not the current height and width of the + * 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 setShowTerminalSizeHint(bool on) { _showTerminalSizeHint=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. @@ -428,21 +428,21 @@ public slots: */ void scrollScreenWindow( enum ScreenWindow::RelativeScrollMode mode , int amount ); - /** + /** * 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() ). - */ + * 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. */ void copyToClipboard(); - /** - * Pastes the content of the clipboard into the + /** + * Pastes the content of the clipboard into the * display. */ void pasteFromClipboard(); @@ -452,26 +452,26 @@ public slots: */ void pasteFromXSelection(); - /** + /** * Changes whether the flow control warning box should be shown when the flow control * stop key (Ctrl+S) are pressed. */ void setFlowControlWarningEnabled(bool enabled); - /** - * Returns true if the flow control warning box is enabled. + /** + * Returns true if the flow control warning box is enabled. * See outputSuspended() and setFlowControlWarningEnabled() */ bool flowControlWarningEnabled() const { return _flowControlWarningEnabled; } - /** + /** * 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) * * @param suspended True if terminal output has been suspended and the warning message should * be shown or false to indicate that terminal output has been resumed and that * the warning message should disappear. - */ + */ void outputSuspended(bool suspended); /** @@ -481,7 +481,7 @@ public slots: * If this is set to true, mouse signals will be emitted by the view when the user clicks, drags * or otherwise moves the mouse inside the view. * The user interaction needed to create selections will also change, and the user will be required - * to hold down the shift key to create a selection or perform other mouse activities inside the + * to hold down the shift key to create a selection or perform other mouse activities inside the * view area - since the program running in the terminal is being allowed to handle normal mouse * events itself. * @@ -493,20 +493,20 @@ public slots: /** See setUsesMouse() */ bool usesMouse() const; - /** + /** * Shows a notification that a bell event has occurred in the terminal. * TODO: More documentation here */ void bell(const QString& message); - /** - * Sets the background of the display to the specified color. - * @see setColorTable(), setForegroundColor() + /** + * Sets the background of the display to the specified color. + * @see setColorTable(), setForegroundColor() */ void setBackgroundColor(const QColor& color); - /** - * Sets the text of the display to the specified color. + /** + * Sets the text of the display to the specified color. * @see setColorTable(), setBackgroundColor() */ void setForegroundColor(const QColor& color); @@ -523,7 +523,7 @@ signals: */ void keyPressedSignal(QKeyEvent* event); - /** + /** * 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 @@ -534,7 +534,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. * @@ -543,9 +543,9 @@ signals: void configureRequest(const QPoint& position); /** - * When a shortcut which is also a valid terminal key sequence is pressed while - * the terminal widget has focus, this signal is emitted to allow the host to decide - * whether the shortcut should be overridden. + * When a shortcut which is also a valid terminal key sequence is pressed while + * the terminal widget has focus, this signal is emitted to allow the host to decide + * whether the shortcut should be overridden. * When the shortcut is overridden, the key sequence will be sent to the terminal emulation instead * and the action associated with the shortcut will not be triggered. * @@ -592,7 +592,7 @@ protected: // classifies the 'ch' into one of three categories // and returns a character to indicate which category it is in // - // - A space (returns ' ') + // - A space (returns ' ') // - Part of a word (returns 'a') // - Other characters (returns the input character) QChar charClass(const Character &ch) const; @@ -626,7 +626,7 @@ private: // divides the part of the display specified by 'rect' into // fragments according to their colors and styles and calls - // drawTextFragment() to draw the fragments + // drawTextFragment() to draw the fragments void drawContents(QPainter& painter, const QRect& rect); // draws a section of text, all the text in this section // has a common color and style @@ -653,10 +653,10 @@ private: // -- - // maps an area in the character image to an area on the widget + // maps an area in the character image to an area on the widget QRect imageToWidget(const QRect& imageArea) const; - // maps a point on the widget to the position ( ie. line and column ) + // maps a point on the widget to the position ( ie. line and column ) // of the character at that point. void getCharacterPosition(const QPoint& widgetPoint,int& line,int& column) const; @@ -667,8 +667,8 @@ private: // current size in columns and lines void showResizeNotification(); - // scrolls the image by a number of lines. - // 'lines' may be positive ( to scroll the image down ) + // scrolls the image by a number of lines. + // 'lines' may be positive ( to scroll the image down ) // or negative ( to scroll the image up ) // 'region' is the part of the image to scroll - currently only // the top, bottom and height of 'region' are taken into account, @@ -697,7 +697,7 @@ private: void doPaste(bool useXselection,bool appendReturn); // the window onto the terminal screen which this display - // is currently showing. + // is currently showing. QPointer _screenWindow; bool _allowBell; diff --git a/src/ViewContainer.h b/src/ViewContainer.h index 8252ac5b4..d06edb12e 100644 --- a/src/ViewContainer.h +++ b/src/ViewContainer.h @@ -55,7 +55,7 @@ namespace Konsole * An interface for container widgets which can hold one or more views. * * The container widget typically displays a list of the views which - * it has and provides a means of switching between them. + * it has and provides a means of switching between them. * * Subclasses should reimplement the addViewWidget() and removeViewWidget() functions * to actually add or remove view widgets from the container widget, as well @@ -68,7 +68,7 @@ Q_OBJECT public: /** - * This enum describes the options for positioning the + * This enum describes the options for positioning the * container's navigation widget. */ enum NavigationPosition @@ -83,16 +83,16 @@ public: NavigationPositionRight }; - /** - * Constructs a new view container with the specified parent. - * + /** + * Constructs a new view container with the specified parent. + * * @param position The initial position of the navigation widget - * @param parent The parent object of the container + * @param parent The parent object of the container */ ViewContainer(NavigationPosition position , QObject* parent); - /** - * Called when the ViewContainer is destroyed. When reimplementing this in + /** + * Called when the ViewContainer is destroyed. When reimplementing this in * subclasses, use object->deleteLater() to delete any widgets or other objects * instead of 'delete object'. */ @@ -101,7 +101,7 @@ public: /** Returns the widget which contains the view widgets */ virtual QWidget* containerWidget() const = 0; - /** + /** * This enum describes the options for showing or hiding the * container's navigation widget. */ @@ -118,17 +118,17 @@ public: * Sets the visibility of the view container's navigation widget. * * The ViewContainer sub-class is responsible for ensuring that this - * setting is respected as views are added or removed from the + * setting is respected as views are added or removed from the * container. * - * ViewContainer sub-classes should reimplement the - * navigationDisplayModeChanged() method to respond to changes + * ViewContainer sub-classes should reimplement the + * navigationDisplayModeChanged() method to respond to changes * of this property. */ void setNavigationDisplayMode(NavigationDisplayMode mode); - /** - * Returns the current mode for controlling the visibility of the - * the view container's navigation widget. + /** + * Returns the current mode for controlling the visibility of the + * the view container's navigation widget. */ NavigationDisplayMode navigationDisplayMode() const; @@ -138,10 +138,10 @@ public: * * Depending on the ViewContainer subclass, not all * positions from the NavigationPosition enum may be - * supported. A list of supported positions can be + * supported. A list of supported positions can be * obtained by calling supportedNavigationPositions() * - * ViewContainer sub-classes should re-implement the + * ViewContainer sub-classes should re-implement the * navigationPositionChanged() method to respond * to changes of this property. */ @@ -155,10 +155,10 @@ public: /** * Returns the list of supported navigation positions. - * The supported positions will depend upon the type of the + * The supported positions will depend upon the type of the * navigation widget used by the ViewContainer subclass. * - * The base implementation returns one item, NavigationPositionTop + * The base implementation returns one item, NavigationPositionTop */ virtual QList supportedNavigationPositions() const; @@ -180,10 +180,10 @@ public: /** Returns a list of the contained views */ const QList views(); - /** + /** * Returns the view which currently has the focus or 0 if none * of the child views have the focus. - */ + */ virtual QWidget* activeView() const = 0; /** @@ -206,8 +206,8 @@ public: /** Changes the active view to the last view */ void activateLastView(); - /** - * This enum describes the directions + /** + * This enum describes the directions * in which views can be re-arranged within the container * using the moveActiveView() method. */ @@ -219,8 +219,8 @@ public: MoveViewRight }; - /** - * Moves the active view within the container and + /** + * Moves the active view within the container and * updates the order in which the views are shown * in the container's navigation widget. * @@ -228,7 +228,7 @@ public: */ void moveActiveView( MoveDirection direction ); - /** Enum describing extra UI features which can be + /** Enum describing extra UI features which can be * provided by the container. */ enum Feature { @@ -239,8 +239,8 @@ public: QuickCloseView = 2 }; Q_DECLARE_FLAGS(Features,Feature) - /** - * Sets which additional features are enabled in this container. + /** + * Sets which additional features are enabled in this container. * The default implementation does thing. Sub-classes should re-implement this * to hide or show the relevant parts of their UI */ @@ -251,7 +251,7 @@ public: * implementation returns 0 (no extra features) */ virtual Features supportedFeatures() const { return 0; } - /** Sets the menu to be shown when the new view button is clicked. + /** Sets the menu to be shown when the new view button is clicked. * Only valid if the QuickNewView feature is enabled. * The default implementation does nothing. */ virtual void setNewViewMenu(QMenu* menu) { Q_UNUSED(menu); } @@ -269,7 +269,7 @@ signals: /** Emitted when the user requests to open a new view */ void newViewRequest(); - /** + /** * Emitted when the user requests to move a view from another container * into this container. If 'success' is set to true by a connected slot * then the original view will be removed. @@ -278,8 +278,8 @@ signals: * to append it. This index should be passed to addView() when the new view * has been created. * @param id The identifier of the view. - * @param success The slot handling this signal should set this to true if the - * new view was successfully created. + * @param success The slot handling this signal should set this to true if the + * new view was successfully created. */ void moveViewRequest(int index,int id,bool& success); @@ -293,7 +293,7 @@ signals: void viewRemoved(QWidget* view); protected: - /** + /** * Performs the task of adding the view widget * to the container widget. */ @@ -304,15 +304,15 @@ protected: */ virtual void removeViewWidget(QWidget* view) = 0; - /** + /** * Called when the navigation display mode changes. * See setNavigationDisplayMode */ virtual void navigationDisplayModeChanged(NavigationDisplayMode) {} /** - * Called when the navigation position changes to re-layout - * the container and place the navigation widget in the + * Called when the navigation position changes to re-layout + * the container and place the navigation widget in the * specified position. */ virtual void navigationPositionChanged(NavigationPosition) {} @@ -322,7 +322,7 @@ protected: /** Returns the widgets which are associated with a particular navigation item */ QList widgetsForItem( ViewProperties* item ) const; - /** + /** * Rearranges the order of widgets in the container. * * @param fromIndex Current index of the widget to move @@ -355,7 +355,7 @@ Q_OBJECT public: ViewContainerTabBar(QWidget* parent,TabbedViewContainer* container); - // returns a pixmap image of a tab for use with QDrag + // returns a pixmap image of a tab for use with QDrag QPixmap dragDropPixmap(int tab); protected: @@ -383,11 +383,11 @@ private: // internal // this class provides a work-around for a problem in Qt 4.x -// where the insertItem() method only has protected access - +// where the insertItem() method only has protected access - // and the TabbedViewContainer class needs to call it. // // and presumably for binary compatibility reasons will -// not be fixed until Qt 5. +// not be fixed until Qt 5. class TabbedViewContainerLayout : public QVBoxLayout { public: @@ -397,7 +397,7 @@ public: } }; -/** +/** * An alternative tabbed view container which uses a QTabBar and QStackedWidget * combination for navigation instead of QTabWidget */ diff --git a/src/ViewManager.h b/src/ViewManager.h index 7cc6ecc94..9cc59ab7c 100644 --- a/src/ViewManager.h +++ b/src/ViewManager.h @@ -46,10 +46,10 @@ class ViewProperties; class ViewContainer; class ViewSplitter; -/** +/** * Manages the terminal display widgets in a Konsole window or part. * - * When a view manager is created, it constructs a splitter widget ( accessed via + * When a view manager is created, it constructs a splitter widget ( accessed via * widget() ) to hold one or more view containers. Each view container holds * one or more terminal displays and a navigation widget ( eg. tabs or a list ) * to allow the user to navigate between the displays in that container. @@ -57,7 +57,7 @@ class ViewSplitter; * The view manager provides menu actions ( defined in the 'konsoleui.rc' XML file ) * to manipulate the views and view containers - for example, actions to split the view * left/right or top/bottom, detach a view from the current window and navigate between - * views and containers. These actions are added to the collection specified in the + * views and containers. These actions are added to the collection specified in the * ViewManager's constructor. * * The view manager provides facilities to construct display widgets for a terminal @@ -71,10 +71,10 @@ Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.konsole.Konsole") public: - /** - * Constructs a new view manager with the specified @p parent. + /** + * Constructs a new view manager with the specified @p parent. * View-related actions defined in 'konsoleui.rc' are created - * and added to the specified @p collection. + * and added to the specified @p collection. */ ViewManager(QObject* parent , KActionCollection* collection); ~ViewManager(); @@ -97,7 +97,7 @@ public: */ void applyProfileToContainer(ViewContainer* container , const Profile::Ptr profile); - /** + /** * Return the main widget for the view manager which * holds all of the views managed by this ViewManager instance. */ @@ -112,19 +112,19 @@ public: * Returns the list of view properties for views in the active container. * Each view widget is associated with a ViewProperties instance which * provides access to basic information about the session being - * displayed in the view, such as title, current directory and - * associated icon. + * displayed in the view, such as title, current directory and + * associated icon. */ QList viewProperties() const; - /** - * This enum describes the available types of navigation widget + /** + * This enum describes the available types of navigation widget * which newly created containers can provide to allow navigation * between open sessions. */ enum NavigationMethod { - /** + /** * Each container has a row of tabs (one per session) which the user * can click on to navigate between open sessions. */ @@ -133,23 +133,23 @@ public: NoNavigation }; - /** - * Sets the type of widget provided to navigate between open sessions + /** + * Sets the type of widget provided to navigate between open sessions * in a container. The changes will only apply to newly created containers. * * The default method is TabbedNavigation. To disable navigation widgets, call - * setNavigationMethod(ViewManager::NoNavigation) before creating any sessions. + * setNavigationMethod(ViewManager::NoNavigation) before creating any sessions. */ void setNavigationMethod(NavigationMethod method); - /** - * Returns the type of navigation widget created in new containers. - * See setNavigationMethod() + /** + * Returns the type of navigation widget created in new containers. + * See setNavigationMethod() */ NavigationMethod navigationMethod() const; - /** - * Returns the controller for the active view. activeViewChanged() is + /** + * Returns the controller for the active view. activeViewChanged() is * emitted when this changes. */ SessionController* activeViewController() const; @@ -172,31 +172,31 @@ signals: /** Emitted when a session is detached from a view owned by this ViewManager */ void viewDetached(Session* session); - /** - * Emitted when the active view changes. - * @param controller The controller associated with the active view + /** + * Emitted when the active view changes. + * @param controller The controller associated with the active view */ void activeViewChanged(SessionController* controller); - /** + /** * Emitted when the current session needs unplugged from factory(). - * @param controller The controller associated with the active view + * @param controller The controller associated with the active view */ void unplugController(SessionController* controller); /** * Emitted when the list of view properties ( as returned by viewProperties() ) changes. - * This occurs when views are added to or removed from the active container, or + * This occurs when views are added to or removed from the active container, or * if the active container is changed. */ void viewPropertiesChanged(const QList& propertiesList); - /** + /** * Emitted when the number of views containers changes. This is used to disable or * enable menu items which can only be used when there are one or multiple containers * visible. * - * @param multipleViews True if there are multiple view containers open or false if there is + * @param multipleViews True if there are multiple view containers open or false if there is * just a single view. */ void splitViewToggle(bool multipleViews); @@ -310,15 +310,15 @@ private slots: void moveActiveViewLeft(); // moves active view to the right void moveActiveViewRight(); - // switches to the view at visual position 'index' + // switches to the view at visual position 'index' // in the current container void switchToView(int index); // called when a SessionController gains focus void controllerChanged(SessionController* controller); - // called when a ViewContainer requests a view be - // moved + // called when a ViewContainer requests a view be + // moved void containerMoveViewRequest(int index, int id, bool& success); void detachView(ViewContainer* container, QWidget* view); @@ -334,7 +334,7 @@ private: void registerView(TerminalDisplay* view); void unregisterView(TerminalDisplay* view); - // takes a view from a view container owned by a different manager and places it in + // takes a view from a view container owned by a different manager and places it in // newContainer owned by this manager void takeView(ViewManager* otherManager , ViewContainer* otherContainer, ViewContainer* newContainer, TerminalDisplay* view); void splitView(Qt::Orientation orientation); diff --git a/src/ViewProperties.h b/src/ViewProperties.h index 270f7a7cc..2d893de58 100644 --- a/src/ViewProperties.h +++ b/src/ViewProperties.h @@ -35,19 +35,19 @@ namespace Konsole { -/** +/** * Encapsulates user-visible information about the terminal session currently being displayed in a view, * such as the associated title and icon. * * This can be used by navigation widgets in a ViewContainer sub-class to provide a tab, label or other * item for switching between views. */ -class KONSOLEPRIVATE_EXPORT ViewProperties : public QObject +class KONSOLEPRIVATE_EXPORT ViewProperties : public QObject { Q_OBJECT public: - ViewProperties(QObject* parent); + ViewProperties(QObject* parent); virtual ~ViewProperties(); /** Returns the icon associated with a view */ @@ -55,9 +55,9 @@ public: /** Returns the title associated with a view */ QString title() const; - /** + /** * Returns the URL current associated with a view. - * The default implementation returns an empty URL. + * The default implementation returns an empty URL. */ virtual KUrl url() const; @@ -68,14 +68,14 @@ public: */ virtual QString currentDir() const; - /** + /** * A unique identifier associated with this * ViewProperties instance. */ int identifier() const; /** - * Sub-classes may re-implement this method to display a message to the user + * Sub-classes may re-implement this method to display a message to the user * to allow them to confirm whether to close a view. * The default implementation always returns true */ @@ -87,7 +87,7 @@ public: /** Name of mime format to use in drag-and-drop operations. */ static QString mimeType() { return _mimeType; } - /** Returns a new QMimeData instance which represents the view with the given @p id + /** Returns a new QMimeData instance which represents the view with the given @p id * (See identifier()). The QMimeData instance returned must be deleted by the caller. */ static QMimeData* createMimeData(int id) @@ -97,9 +97,9 @@ public: mimeData->setData(mimeType(),data); return mimeData; } - /** Decodes a QMimeData instance created with createMimeData() and returns the identifier + /** Decodes a QMimeData instance created with createMimeData() and returns the identifier * of the associated view. The associated ViewProperties instance can then be retrieved by - * calling propertiesById() + * calling propertiesById() * * The QMimeData instance must support the mime format returned by mimeType() */ @@ -128,9 +128,9 @@ protected slots: void fireActivity(); protected: - /** + /** * Subclasses may call this method to change the title. This causes - * a titleChanged() signal to be emitted + * a titleChanged() signal to be emitted */ void setTitle(const QString& title); /** diff --git a/src/ViewSplitter.h b/src/ViewSplitter.h index c4aea2bfd..ecf5a880d 100644 --- a/src/ViewSplitter.h +++ b/src/ViewSplitter.h @@ -40,7 +40,7 @@ class ViewContainer; * Each splitter can also contain child ViewSplitter widgets, allowing * for a hierarchy of view splitters and containers. * - * The addContainer() method is used to split the existing view and + * The addContainer() method is used to split the existing view and * insert a new view container. * Containers can only be removed from the hierarchy by deleting them. */ @@ -53,8 +53,8 @@ public: /** * Locates the child ViewSplitter widget which currently has the focus - * and inserts the container into it. - * + * and inserts the container into it. + * * @param container The container to insert * @param orientation Specifies whether the view should be split * horizontally or vertically. If the orientation @@ -64,7 +64,7 @@ public: * will be added to that splitter. If the orientation * is different, then a new child splitter * will be created, into which the container will - * be inserted. + * be inserted. */ void addContainer( ViewContainer* container , Qt::Orientation orientation ); @@ -74,9 +74,9 @@ public: /** Returns the child ViewSplitter widget which currently has the focus */ ViewSplitter* activeSplitter() ; - /** + /** * Returns the container which currently has the focus or 0 if none - * of the immediate child containers have the focus. This does not + * of the immediate child containers have the focus. This does not * search through child splitters. activeSplitter() can be used * to search recursively through child splitters for the splitter * which currently has the focus. @@ -88,7 +88,7 @@ public: ViewContainer* activeContainer() const; /** - * Gives the focus to the active view in the specified container + * Gives the focus to the active view in the specified container */ void setActiveContainer(ViewContainer* container); @@ -104,9 +104,9 @@ public: /** * Changes the size of the specified @p container by a given @p percentage. - * @p percentage may be positive ( in which case the size of the container - * is increased ) or negative ( in which case the size of the container - * is decreased ). + * @p percentage may be positive ( in which case the size of the container + * is increased ) or negative ( in which case the size of the container + * is decreased ). * * The sizes of the remaining containers are increased or decreased * uniformly to maintain the width of the splitter. @@ -120,24 +120,24 @@ public: /** * Specifies whether the view may be split recursively. - * + * * If this is false, all containers will be placed into the same * top-level splitter. Adding a container with an orientation * which is different to that specified when adding the previous - * containers will change the orientation for all dividers + * containers will change the orientation for all dividers * between containers. * * If this is true, adding a container to the view splitter with * an orientation different to the orientation of the previous * area will result in the previously active container being * replaced with a new splitter containing the active container - * and the newly added container. + * and the newly added container. */ void setRecursiveSplitting(bool recursive); - /** + /** * Returns whether the view may be split recursively. - * See setRecursiveSplitting() + * See setRecursiveSplitting() */ bool recursiveSplitting() const; @@ -145,12 +145,12 @@ signals: /** Signal emitted when the last child widget is removed from the splitter */ void empty(ViewSplitter* splitter); - /** + /** * Signal emitted when the containers held by this splitter become empty, this * differs from the empty() signal which is only emitted when all of the containers * are deleted. This signal is emitted even if there are still container widgets. * - * TODO: This does not yet work recursively (ie. when splitters inside splitters have empty containers) + * TODO: This does not yet work recursively (ie. when splitters inside splitters have empty containers) */ void allContainersEmpty(); diff --git a/src/Vt102Emulation.h b/src/Vt102Emulation.h index 28e3aca1e..f1d70b7d8 100644 --- a/src/Vt102Emulation.h +++ b/src/Vt102Emulation.h @@ -26,7 +26,7 @@ // Standard Library #include -// Qt +// Qt #include #include #include @@ -66,15 +66,15 @@ struct CharCodes /** * 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/ - * - * In addition, various additional xterm escape sequences are supported to provide + * + * In addition, various additional xterm escape sequences are supported to provide * features such as mouse input handling. * See http://rtfm.etla.org/xterm/ctlseq.html for a description of xterm's escape - * sequences. + * sequences. * */ class Vt102Emulation : public Emulation -{ +{ Q_OBJECT public: @@ -88,7 +88,7 @@ public: virtual char eraseChar() const; public slots: - // reimplemented from Emulation + // reimplemented from Emulation virtual void sendString(const char*,int length = -1); virtual void sendText(const QString& text); virtual void sendKeyEvent(QKeyEvent*); @@ -122,7 +122,7 @@ private: bool getMode (int mode); // saves the current boolean value of 'mode' void saveMode (int mode); - // restores the boolean value of 'mode' + // restores the boolean value of 'mode' void restoreMode(int mode); // resets all modes // (except MODE_Allow132Columns) @@ -179,10 +179,10 @@ private: TerminalState _currentModes; TerminalState _savedModes; - //hash table and timer for buffering calls to the session instance + //hash table and timer for buffering calls to the session instance //to update the name of the session //or window title. - //these calls occur when certain escape sequences are seen in the + //these calls occur when certain escape sequences are seen in the //output from the terminal QHash _pendingTitleUpdates; QTimer* _titleUpdateTimer; diff --git a/src/WarningBox.cpp b/src/WarningBox.cpp index 8d8e5b09a..8c7bfb439 100644 --- a/src/WarningBox.cpp +++ b/src/WarningBox.cpp @@ -36,7 +36,7 @@ WarningBox::WarningBox(QWidget* parent) { KColorScheme colorScheme(QPalette::Active); QColor warningColor = colorScheme.background(KColorScheme::NeutralBackground).color(); - QColor warningColorLight = KColorScheme::shade(warningColor,KColorScheme::LightShade,0.1); + QColor warningColorLight = KColorScheme::shade(warningColor,KColorScheme::LightShade,0.1); QColor borderColor = KColorScheme::shade(warningColor,KColorScheme::DarkShade,0.15); QString gradient = "qlineargradient(x1:0, y1:0, x2:0, y2:1," "stop: 0 %1, stop: 0.6 %1 ,stop: 1.0 %2)"; diff --git a/src/WarningBox.h b/src/WarningBox.h index b88f9622d..aeecf9aff 100644 --- a/src/WarningBox.h +++ b/src/WarningBox.h @@ -28,8 +28,8 @@ class QLabel; namespace Konsole { -/** - * A label which displays a warning message, +/** + * A label which displays a warning message, * using the appropriate icon from the current icon theme * and background color from KColorScheme */ diff --git a/src/ZModemDialog.cpp b/src/ZModemDialog.cpp index c6761323c..beabf420e 100644 --- a/src/ZModemDialog.cpp +++ b/src/ZModemDialog.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -// Own +// Own #include "ZModemDialog.h" // KDE diff --git a/src/main.cpp b/src/main.cpp index cde3533b7..31b609090 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,7 +51,7 @@ bool shouldUseNewProcess(); void restoreSession(Application& app); // *** -// Entry point into the Konsole terminal application. +// Entry point into the Konsole terminal application. // *** extern "C" int KDE_EXPORT kdemain(int argc,char** argv) { @@ -90,7 +90,7 @@ extern "C" int KDE_EXPORT kdemain(int argc,char** argv) } bool shouldUseNewProcess() { - // when starting Konsole from a terminal, a new process must be used + // when starting Konsole from a terminal, a new process must be used // so that the current environment is propagated into the shells of the new // Konsole and any debug output or warnings from Konsole are written to // the current terminal