KVIrc
4.9.2
DeveloperAPIs
|
Input handling class. More...
#include <KviInput.h>
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... | |
KviInputEditor * | editor () |
Return the instance of the input editor. More... | |
int | heightHint () const |
Returns the height of the input line. More... | |
KviInputHistory * | history () |
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 | |
KviTalHBox * | m_pButtonContainer |
QToolButton * | m_pCommandlineModeButton |
QLabel * | m_pHelpLabel |
QToolButton * | m_pHideToolsButton |
QToolButton * | m_pHistoryButton |
QToolButton * | m_pIconButton |
KviInputEditor * | m_pInputEditor |
QGridLayout * | m_pLayout |
QToolButton * | m_pMultiEditorButton |
KviScriptEditor * | m_pMultiLineEditor |
KviWindow * | m_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 |
Input handling class.
KviInput::KviInput | ( | KviWindow * | pPar, |
KviUserListView * | pView = 0 |
||
) |
Constructs the input object.
pPar | The parent window |
pView | The userlist |
References __tr2qs, KviTalToolTip::add(), KviIconManager::BigGrin, connect(), g_pIconManager, KviIconManager::getBigIcon(), KviIconManager::getSmallIcon(), KviIconManager::History, historyButtonClicked(), KviIconManager::HistoryOff, iconButtonClicked(), inputEditorEnterPressed(), installShortcuts(), KviIconManager::IrcView, KVI_OPTION_BOOL, KviOption_boolCommandlineInUserFriendlyModeByDefault, KviOption_boolEnableInputHistory, m_pButtonContainer, m_pCommandlineModeButton, m_pHideToolsButton, m_pHistoryButton, m_pIconButton, m_pInputEditor, m_pLayout, m_pMultiEditorButton, m_pMultiLineEditor, m_pWindow, multiLineEditorButtonToggled(), Normal, KviIconManager::SayKvs, KviIconManager::SaySmile, KviTalHBox::setMargin(), KviTalHBox::setSpacing(), KviIconManager::Terminal, and toggleToolButtons().
KviInput::~KviInput | ( | ) |
Destroys the input object.
References KviScriptEditor::destroyInstance(), and m_pMultiLineEditor.
void KviInput::applyOptions | ( | ) |
Saves and applies the options.
References __tr2qs, KviTalToolTip::add(), KviInputEditor::applyOptions(), connect(), g_pIconManager, KviIconManager::getSmallIcon(), KviIconManager::History, historyButtonClicked(), KviIconManager::HistoryOff, KVI_OPTION_BOOL, KviOption_boolEnableInputHistory, m_pHistoryButton, and m_pInputEditor.
Referenced by KviConsoleWindow::applyOptions(), and KviWindow::applyOptions().
|
inline |
Return the instance of the input editor.
|
protectedvirtual |
References m_pInputEditor, and m_pMultiLineEditor.
int KviInput::heightHint | ( | ) | const |
Returns the height of the input line.
References KviInputEditor::heightHint(), m_pInputEditor, and m_pMultiLineEditor.
Referenced by UserWindow::resizeEvent(), KviDebugWindow::resizeEvent(), DccChatWindow::resizeEvent(), KviConsoleWindow::resizeEvent(), DccVideoWindow::resizeEvent(), KviQueryWindow::resizeEvent(), KviChannelWindow::resizeEvent(), KviDebugWindow::sizeHint(), DccChatWindow::sizeHint(), KviConsoleWindow::sizeHint(), KviQueryWindow::sizeHint(), and KviChannelWindow::sizeHint().
|
inline |
Return the instance of the input history.
References KviInputHistory::instance().
|
slot |
Shows the history popup.
References KVI_HISTORY_WIN_HEIGHT, and KviHistoryWindowWidget::popup().
Referenced by applyOptions(), and KviInput().
|
slot |
Shows the icon popup.
References KviTextIconWindow, m_pIconButton, and KviTextIconWindow::popup().
Referenced by KviInput().
|
slot |
Parses the text written and clears the input line.
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.
c | The character to insert |
References KviInputEditor::insertChar(), and m_pInputEditor.
void KviInput::insertText | ( | const QString & | szText | ) |
Inserts the given text.
szText | The text to insert |
References KviInputEditor::insertText(), and m_pInputEditor.
Referenced by window_kvs_cmd_insertInInputText().
|
protected |
References KviShortcut::create(), KVI_SHORTCUTS_INPUT_MULTILINE, KVI_SHORTCUTS_INPUT_MULTILINE_2, and toggleMultiLine().
Referenced by KviInput().
bool KviInput::isButtonsHidden | ( | ) |
Returns true if the buttons on the right are hidden.
References m_pButtonContainer.
Referenced by KviWindow::saveProperties(), and toggleToolButtons().
|
inline |
Returns true if the input line is in user-friendly mode.
Referenced by KviWindow::saveProperties().
|
protectedvirtual |
|
slot |
Toggles the multiline editor.
bOn | Whether to activate the multiline editor |
References __tr2qs, KviWindow::childrenTreeChanged(), KviScriptEditor::createInstance(), KviScriptEditor::destroyInstance(), KviScriptEditor::getText(), KVI_OPTION_UINT, KviOption_uintSpacesToExpandTabulationInput, m_pHelpLabel, m_pInputEditor, m_pLayout, m_pMultiEditorButton, m_pMultiLineEditor, m_pWindow, KviScriptEditor::setText(), KviInputEditor::setText(), and KviInputEditor::text().
Referenced by KviInput(), multiLinePaste(), and toggleMultiLine().
void KviInput::multiLinePaste | ( | const QString & | szText | ) |
Opens the multiline editor and pastes the given text.
szText | The text to paste |
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.
bHidden | Whether to hide the buttons |
References g_pIconManager, KviIconManager::getBigIcon(), m_pButtonContainer, and m_pHideToolsButton.
Referenced by KviWindow::loadProperties(), and toggleToolButtons().
|
virtual |
Sets the focus to the input line.
References m_pInputEditor, and m_pMultiLineEditor.
Referenced by KviHistoryWindow::doHide(), KviConsoleWindow::ircUriChanged(), KviIrcView::mousePressEvent(), KviIrcView::toggleToolWidget(), and KviIrcViewToolWidget::~KviIrcViewToolWidget().
|
protectedvirtual |
void KviInput::setText | ( | const QString & | szText | ) |
Sets the given text.
szText | The text to set in the input line |
References m_pInputEditor, m_pMultiLineEditor, KviScriptEditor::setText(), and KviInputEditor::setText().
Referenced by KviHistoryWindow::itemSelected(), and window_kvs_cmd_setInputText().
|
inline |
Sets the user-friendly mode to the input line.
bSet | Whether to set the user-friendly mode |
Referenced by KviWindow::loadProperties().
QString KviInput::text | ( | ) |
Returns the text written in the input line.
References KviScriptEditor::getText(), m_pInputEditor, m_pMultiLineEditor, and KviInputEditor::text().
|
privateslot |
Toggles multiline.
References m_pMultiLineEditor, and multiLineEditorButtonToggled().
Referenced by installShortcuts().
|
slot |
Toggles the buttons.
References isButtonsHidden(), and setButtonsHidden().
Referenced by KviInput().
|
friend |
Referenced by iconButtonClicked().
KviTalHBox* KviInput::m_pButtonContainer |
Referenced by isButtonsHidden(), KviInput(), and setButtonsHidden().
QToolButton* KviInput::m_pCommandlineModeButton |
Referenced by inputEditorEnterPressed(), keyPressEvent(), and KviInput().
QLabel* KviInput::m_pHelpLabel |
Referenced by multiLineEditorButtonToggled().
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 |
Referenced by KviInput(), and multiLineEditorButtonToggled().
QToolButton* KviInput::m_pMultiEditorButton |
Referenced by KviInput(), and multiLineEditorButtonToggled().
KviScriptEditor* KviInput::m_pMultiLineEditor |
Referenced by focusInEvent(), heightHint(), keyPressEvent(), KviInput(), multiLineEditorButtonToggled(), multiLinePaste(), setFocus(), setText(), text(), toggleMultiLine(), and ~KviInput().
KviWindow* KviInput::m_pWindow |
Referenced by inputEditorEnterPressed(), keyPressEvent(), KviInput(), and multiLineEditorButtonToggled().