Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8f1bbd43 authored by Jekyll Wu's avatar Jekyll Wu

Remove trailing white spaces

parent cf92cece
......@@ -20,7 +20,7 @@
#ifndef APPLICATION_H
#define APPLICATION_H
// KDE
// KDE
#include <KUniqueApplication>
// 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();
......
/* This file was part of the KDE libraries
Copyright 2002 Carsten Pfeiffer <pfeiffer@kde.org>
Copyright 2007-2008 Robert Knight <robertknight@gmail.com>
Copyright 2007-2008 Robert Knight <robertknight@gmail.com>
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<QPair<QString,QString> > BookmarkHandler::currentBookmarkList() const
return list;
}
void BookmarkHandler::setViews(const QList<ViewProperties*>& views)
void BookmarkHandler::setViews(const QList<ViewProperties*>& views)
{
_views = views;
}
......
......@@ -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<QPair<QString,QString> > 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
......
......@@ -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
......
......@@ -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;
......
......@@ -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<const ColorScheme*> allColorSchemes();
......
......@@ -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.
*/
......
......@@ -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<Session*>& sessions)
if (_masterSession)
checked.insert(_masterSession);
_model->setCheckedSessions(checked);
_model->setCheckedSessions(checked);
}
QSet<Session*> 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<rows;i++)
setRowChecked(i,checked);
......@@ -147,9 +147,11 @@ QVariant CheckableSessionModel::data(const QModelIndex& index, int role) const
return QVariant::fromValue((int)Qt::Checked);
else
return QVariant::fromValue((int)Qt::Unchecked);
}
}
else
{
return SessionListModel::data(index,role);
}
}
bool CheckableSessionModel::setData(const QModelIndex& index, const QVariant& value, int role)
{
......@@ -169,7 +171,9 @@ bool CheckableSessionModel::setData(const QModelIndex& index, const QVariant& va
return true;
}
else
{
return SessionListModel::setData(index,value,role);
}
}
void CheckableSessionModel::setCheckedSessions(const QSet<Session*> sessions)
{
......
......@@ -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<Session> _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<Session*> _fixedSessions;
int _checkColumn;
};
inline int CheckableSessionModel::checkColumn() const
{ return _checkColumn; }
......
......@@ -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<bool> _pageNeedsUpdate;
QHash<int,QVariant> _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 );
......
This diff is collapsed.
......@@ -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<QAction*> 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();
......