KVIrc  4.9.2
DeveloperAPIs
Public Slots | Public Member Functions | Public Attributes | Protected Member Functions | Private Slots | Friends | List of all members
KviInput Class Reference

Input handling class. More...

#include <KviInput.h>

+ Inheritance diagram for KviInput:

Public Slots

void historyButtonClicked ()
 Shows the history popup. More...
 
void iconButtonClicked ()
 Shows the icon popup. More...
 
void inputEditorEnterPressed ()
 Parses the text written and clears the input line. More...
 
void multiLineEditorButtonToggled (bool bOn)
 Toggles the multiline editor. More...
 
void toggleToolButtons ()
 Toggles the buttons. More...
 

Public Member Functions

void applyOptions ()
 Saves and applies the options. More...
 
KviInputEditoreditor ()
 Return the instance of the input editor. More...
 
int heightHint () const
 Returns the height of the input line. More...
 
KviInputHistoryhistory ()
 Return the instance of the input history. More...
 
void insertChar (char c)
 Inserts the given character. More...
 
void insertText (const QString &szText)
 Inserts the given text. More...
 
bool isButtonsHidden ()
 Returns true if the buttons on the right are hidden. More...
 
bool isUserFriendly ()
 Returns true if the input line is in user-friendly mode. More...
 
 KviInput (KviWindow *pPar, KviUserListView *pView=0)
 Constructs the input object. More...
 
void multiLinePaste (const QString &szText)
 Opens the multiline editor and pastes the given text. More...
 
void setButtonsHidden (bool bHidden)
 Sets the hidden status of the button on the right. More...
 
virtual void setFocus ()
 Sets the focus to the input line. More...
 
void setText (const QString &szText)
 Sets the given text. More...
 
void setUserFriendly (bool bSet)
 Sets the user-friendly mode to the input line. More...
 
QString text ()
 Returns the text written in the input line. More...
 
 ~KviInput ()
 Destroys the input object. More...
 

Public Attributes

KviTalHBoxm_pButtonContainer
 
QToolButton * m_pCommandlineModeButton
 
QLabel * m_pHelpLabel
 
QToolButton * m_pHideToolsButton
 
QToolButton * m_pHistoryButton
 
QToolButton * m_pIconButton
 
KviInputEditorm_pInputEditor
 
QGridLayout * m_pLayout
 
QToolButton * m_pMultiEditorButton
 
KviScriptEditorm_pMultiLineEditor
 
KviWindowm_pWindow
 

Protected Member Functions

virtual void focusInEvent (QFocusEvent *e)
 
void installShortcuts ()
 
virtual void keyPressEvent (QKeyEvent *e)
 
virtual void setFocusProxy (QWidget *w)
 

Private Slots

void toggleMultiLine ()
 Toggles multiline. More...
 

Friends

class KviTextIconWindow
 

Detailed Description

Input handling class.

Constructor & Destructor Documentation

KviInput::KviInput ( KviWindow pPar,
KviUserListView pView = 0 
)
KviInput::~KviInput ( )

Destroys the input object.

References KviScriptEditor::destroyInstance(), and m_pMultiLineEditor.

Member Function Documentation

void KviInput::applyOptions ( )
KviInputEditor* KviInput::editor ( )
inline

Return the instance of the input editor.

Returns
KviInputEditor *
void KviInput::focusInEvent ( QFocusEvent *  e)
protectedvirtual
int KviInput::heightHint ( ) const
KviInputHistory* KviInput::history ( )
inline

Return the instance of the input history.

Returns
KviInputHistory *

References KviInputHistory::instance().

void KviInput::historyButtonClicked ( )
slot

Shows the history popup.

Returns
void

References KVI_HISTORY_WIN_HEIGHT, and KviHistoryWindowWidget::popup().

Referenced by applyOptions(), and KviInput().

void KviInput::iconButtonClicked ( )
slot

Shows the icon popup.

Returns
void

References KviTextIconWindow, m_pIconButton, and KviTextIconWindow::popup().

Referenced by KviInput().

void KviInput::inputEditorEnterPressed ( )
slot

Parses the text written and clears the input line.

Returns
void

References KviInputEditor::clearUndoStack(), m_pCommandlineModeButton, m_pInputEditor, m_pWindow, KviUserInput::parse(), KviInputEditor::setText(), and KviInputEditor::text().

Referenced by KviInput().

void KviInput::insertChar ( char  c)

Inserts the given character.

Parameters
cThe character to insert
Returns
void

References KviInputEditor::insertChar(), and m_pInputEditor.

void KviInput::insertText ( const QString &  szText)

Inserts the given text.

Parameters
szTextThe text to insert
Returns
void

References KviInputEditor::insertText(), and m_pInputEditor.

Referenced by window_kvs_cmd_insertInInputText().

void KviInput::installShortcuts ( )
protected
bool KviInput::isButtonsHidden ( )

Returns true if the buttons on the right are hidden.

Returns
bool

References m_pButtonContainer.

Referenced by KviWindow::saveProperties(), and toggleToolButtons().

bool KviInput::isUserFriendly ( )
inline

Returns true if the input line is in user-friendly mode.

Returns
bool

Referenced by KviWindow::saveProperties().

void KviInput::keyPressEvent ( QKeyEvent *  e)
protectedvirtual
void KviInput::multiLineEditorButtonToggled ( bool  bOn)
slot
void KviInput::multiLinePaste ( const QString &  szText)

Opens the multiline editor and pastes the given text.

Parameters
szTextThe text to paste
Returns
void

References m_pInputEditor, m_pMultiLineEditor, multiLineEditorButtonToggled(), KviScriptEditor::setText(), and KviInputEditor::text().

void KviInput::setButtonsHidden ( bool  bHidden)

Sets the hidden status of the button on the right.

Parameters
bHiddenWhether to hide the buttons
Returns
void

References g_pIconManager, KviIconManager::getBigIcon(), m_pButtonContainer, and m_pHideToolsButton.

Referenced by KviWindow::loadProperties(), and toggleToolButtons().

void KviInput::setFocus ( )
virtual
void KviInput::setFocusProxy ( QWidget *  w)
protectedvirtual
void KviInput::setText ( const QString &  szText)

Sets the given text.

Parameters
szTextThe text to set in the input line
Returns
void

References m_pInputEditor, m_pMultiLineEditor, KviScriptEditor::setText(), and KviInputEditor::setText().

Referenced by KviHistoryWindow::itemSelected(), and window_kvs_cmd_setInputText().

void KviInput::setUserFriendly ( bool  bSet)
inline

Sets the user-friendly mode to the input line.

Parameters
bSetWhether to set the user-friendly mode
Returns
void

Referenced by KviWindow::loadProperties().

QString KviInput::text ( )

Returns the text written in the input line.

Returns
QString

References KviScriptEditor::getText(), m_pInputEditor, m_pMultiLineEditor, and KviInputEditor::text().

void KviInput::toggleMultiLine ( )
privateslot

Toggles multiline.

Returns
void

References m_pMultiLineEditor, and multiLineEditorButtonToggled().

Referenced by installShortcuts().

void KviInput::toggleToolButtons ( )
slot

Toggles the buttons.

Returns
void

References isButtonsHidden(), and setButtonsHidden().

Referenced by KviInput().

Friends And Related Function Documentation

friend class KviTextIconWindow
friend

Referenced by iconButtonClicked().

Member Data Documentation

KviTalHBox* KviInput::m_pButtonContainer
QToolButton* KviInput::m_pCommandlineModeButton
QLabel* KviInput::m_pHelpLabel
QToolButton* KviInput::m_pHideToolsButton

Referenced by KviInput(), and setButtonsHidden().

QToolButton* KviInput::m_pHistoryButton

Referenced by applyOptions(), and KviInput().

QToolButton* KviInput::m_pIconButton

Referenced by iconButtonClicked(), and KviInput().

KviInputEditor* KviInput::m_pInputEditor
QGridLayout* KviInput::m_pLayout
QToolButton* KviInput::m_pMultiEditorButton
KviScriptEditor* KviInput::m_pMultiLineEditor
KviWindow* KviInput::m_pWindow

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