gSAFE  1.3.8
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
HConsolePanel Class Reference

#include <dconsole.h>

Inherits QFrame.

Public Slots

void addNormalText (QString text)
 
void biggerFontSize (void)
 
void clearSelection (void)
 
void clearText (void)
 
void copySelection (void)
 
void deleteCmdLineSelection (void)
 
void normalFontSize (void)
 
void pasteToCommandLine (void)
 
void scrollReset (void)
 
void scrollTop (void)
 
void selectAll (void)
 
void smallerFontSize (void)
 

Signals

void commandEntered (QString commandText)
 
void tabPressed (QString commandText)
 

Public Member Functions

 HConsolePanel (QWidget *parent)
 
void addText (QString t, char type=0)
 
void addTextToCursor (QString text)
 
QString commandLineText (void)
 
void cursorLeft (int charCount=1, bool inSelection=false)
 
int cursorPosition (void)
 
void cursorRight (int charCount=1, bool inSelection=false)
 
void deleteFromCursor (bool forwardDel=false)
 
int fontSize (void)
 
QString lineBySerial (int serial, bool withWraps=false, bool onDisplay=true)
 
int maxSerial (void)
 
QString promptString (void)
 
void resetCommandLine (void)
 
void scrollDown (int lineCount=1)
 
void scrollToSerial (int serial)
 
void scrollUp (int lineCount=1)
 
QString selectedText (void)
 
void setColor (QString section, QColor color)
 
void setCommandLineCharacterEcho (bool disable=false)
 
void setCommandLineText (QString t, bool disableupdate=false)
 
void setCursorPosition (int c)
 
void setFontSize (int point)
 
void setMarginText (QString margin)
 
void setPromptString (QString prm)
 
void setTabStop (int count)
 
void setTextTypeColor (char type, QColor color)
 
int topSerial (void)
 

Protected Member Functions

bool event (QEvent *e)
 
void keyPressEvent (QKeyEvent *e)
 
void mouseDoubleClickEvent (QMouseEvent *e)
 
void mouseMoveEvent (QMouseEvent *e)
 
void mousePressEvent (QMouseEvent *e)
 
void mouseReleaseEvent (QMouseEvent *e)
 
void paintEvent (QPaintEvent *e)
 
void resizeEvent (QResizeEvent *e)
 
void wheelEvent (QWheelEvent *e)
 

Detailed Description

HConsolePanel is an universal console panel which has a readonly textual history part, and an editable command line part.

hdebugconsole.png

It designed to handle a large amount of text fastly. It supports text selections, clipboard functions, basic editing functionality on command line and command history. Available key commands:

Definition at line 260 of file dconsole.h.

Constructor & Destructor Documentation

HConsolePanel::HConsolePanel ( QWidget *  parent)

Creates an empty HConsolePanel

Definition at line 1088 of file dconsole.cpp.

Member Function Documentation

void HConsolePanel::addNormalText ( QString  text)
slot

Adds a text to the readonly/view part. Means: addText(text,0);

Definition at line 1518 of file dconsole.cpp.

void HConsolePanel::addText ( QString  t,
char  type = 0 
)

Adds a text to the readonly/view part.

Parameters
ttext to add
typeA numerical type feature of the text, which can be used to show this text different color.
See Also
setTextTypeColor

Definition at line 1528 of file dconsole.cpp.

void HConsolePanel::addTextToCursor ( QString  text)

Adds the parameter text to the command line by the cursor position. If the command line has active selection the text will replace that.

Definition at line 2293 of file dconsole.cpp.

void HConsolePanel::clearSelection ( void  )
slot

Clears selection in the readonly/view part.

Definition at line 1733 of file dconsole.cpp.

void HConsolePanel::clearText ( void  )
slot

Clears all text form the readonly/view part.

Definition at line 1588 of file dconsole.cpp.

void HConsolePanel::commandEntered ( QString  commandText)
signal

Emitted when the user type a text to the command line and hit Enter/Return on it. The command line text will be reseted before this signal emitted

QString HConsolePanel::commandLineText ( void  )

Returns the current active command line text

Definition at line 2245 of file dconsole.cpp.

void HConsolePanel::copySelection ( void  )
slot

Copy the current selection to the clipboard

Definition at line 1800 of file dconsole.cpp.

void HConsolePanel::cursorLeft ( int  charCount = 1,
bool  inSelection = false 
)

Moves the cursor in the command line text to left with charCount position

Definition at line 2398 of file dconsole.cpp.

int HConsolePanel::cursorPosition ( void  )

Returns the cursor position in command line text. It's an absolute character number from the beginning of command line.

Definition at line 2257 of file dconsole.cpp.

void HConsolePanel::cursorRight ( int  charCount = 1,
bool  inSelection = false 
)

Moves the cursor in the command line text to right with charCount position

Definition at line 2453 of file dconsole.cpp.

void HConsolePanel::deleteCmdLineSelection ( void  )
slot

Deletes the current selected text from the command line

Definition at line 2383 of file dconsole.cpp.

void HConsolePanel::deleteFromCursor ( bool  forwardDel = false)

Delete character from the command line by the cursor position. If the command line has active selection the function will delete that instead of the character.

Parameters
forwardDelIf true the function deletes the character after the cursor (Delete). If false the function deletes the character before the cursor and steps the cursor back (Backspace).

Definition at line 2331 of file dconsole.cpp.

int HConsolePanel::fontSize ( void  )

Returns the font point size used by HConsolePanel

Definition at line 2889 of file dconsole.cpp.

QString HConsolePanel::lineBySerial ( int  serial,
bool  withWraps = false,
bool  onDisplay = true 
)

Returns the line which has the parameter passed serial number

Parameters
serialthe requested line's serial
withWrapsif this parameter true, the next autowrapped lines are concatenated to the returned line
onDisplayIf this parameter true the searching is started on the current display (much faster)

Definition at line 1692 of file dconsole.cpp.

int HConsolePanel::maxSerial ( void  )

Returns the serial number of the last line

Definition at line 1678 of file dconsole.cpp.

void HConsolePanel::pasteToCommandLine ( void  )
slot

Paste the current cliboard text to the command line

Definition at line 2578 of file dconsole.cpp.

QString HConsolePanel::promptString ( void  )

Returns the current active command line prompt

Definition at line 2873 of file dconsole.cpp.

void HConsolePanel::resetCommandLine ( void  )

Reset the command line part. Set empty command line, clears all selection, scrolling, etc..

Definition at line 2170 of file dconsole.cpp.

void HConsolePanel::scrollDown ( int  lineCount = 1)

Scrolls down the readonly/view textual part by the lineCount number line

Definition at line 1629 of file dconsole.cpp.

void HConsolePanel::scrollReset ( void  )
slot

Reset scrolling of the console. Shows the last line.

Definition at line 1654 of file dconsole.cpp.

void HConsolePanel::scrollTop ( void  )
slot

Scrolls the absolute to of the console

Definition at line 1647 of file dconsole.cpp.

void HConsolePanel::scrollToSerial ( int  serial)

Scrolls the readonly/view textual part to the specified serial numbered line

Definition at line 1661 of file dconsole.cpp.

void HConsolePanel::scrollUp ( int  lineCount = 1)

Scrolls up the readonly/view textual part by the lineCount number line

Definition at line 1608 of file dconsole.cpp.

void HConsolePanel::selectAll ( void  )
slot

Selects all text in the readonly/view part.

Definition at line 1720 of file dconsole.cpp.

QString HConsolePanel::selectedText ( void  )

Returns the currently selected text.

Definition at line 1739 of file dconsole.cpp.

void HConsolePanel::setColor ( QString  section,
QColor  color 
)

Sets the color of a specified console area

Parameters
sectionOne of "background","selection","standardtext","cmdtext","cursor","margin","marginbg"
colorthe color to set

Definition at line 1495 of file dconsole.cpp.

void HConsolePanel::setCommandLineCharacterEcho ( bool  disable = false)

If this function called with disable:true the user entered charaters won't write back to the console. You can reenable character echoing by calling this function with disable:false. (This is the default case)

Definition at line 1350 of file dconsole.cpp.

void HConsolePanel::setCommandLineText ( QString  t,
bool  disableupdate = false 
)

Sets the command line text to t (It clears the current active)

Definition at line 2189 of file dconsole.cpp.

void HConsolePanel::setCursorPosition ( int  c)

Sets the cursor position in command line text. It's an absolute character number from the beginning of command line.

Definition at line 2272 of file dconsole.cpp.

void HConsolePanel::setFontSize ( int  point)

Sets the font size used by HConsolePanel

Definition at line 2878 of file dconsole.cpp.

void HConsolePanel::setMarginText ( QString  margin)

Sets a margin text, which is displayed on the left margin of all readonly line (every line except command lines)

Definition at line 1185 of file dconsole.cpp.

void HConsolePanel::setPromptString ( QString  prm)

Sets the command line prompt

Definition at line 2867 of file dconsole.cpp.

void HConsolePanel::setTabStop ( int  count)

Sets the tab stop count when addText replaces the tabs to spaces. The default value is 8.

Definition at line 1523 of file dconsole.cpp.

void HConsolePanel::setTextTypeColor ( char  type,
QColor  color 
)

Sets the color of the type coded text.

Parameters
typethe text type to set. This type match with that type passed with addText function
colorthe color to set
See Also
addText

Definition at line 1513 of file dconsole.cpp.

void HConsolePanel::tabPressed ( QString  commandText)
signal

Emitted when the user type a text to the command line and hit TAB it. The command line text stay untouched.

int HConsolePanel::topSerial ( void  )

Returns the serial number of the display top line

Definition at line 1685 of file dconsole.cpp.


The documentation for this class was generated from the following files: