SnippetWidget Class Reference
This is the widget which gets added to the right TreeToolView. More...
#include <snippet_widget.h>
Inheritance diagram for SnippetWidget:


Detailed Description
This is the widget which gets added to the right TreeToolView.It inherits KListView and QToolTip which is needed for showing the tooltips which contains the text of the snippet
- Author:
- Robert Gruber
Definition at line 40 of file snippet_widget.h.
Constructor & Destructor Documentation
|
Definition at line 49 of file snippet_widget.cpp. References _cfg, _list, KListView::addColumn(), KListView::dropped(), initConfig(), m_dialog, KListView::setAcceptDrops(), KListView::setDragEnabled(), KListView::setDropVisualizer(), KListView::setFullWidth(), KListView::setSorting(), showPopupMenu(), slotDropped(), and slotListDblClicked(). |
|
Definition at line 80 of file snippet_widget.cpp. References _list, and writeConfig(). |
Member Function Documentation
|
Reimplementation from KListView. Check here if the data the user is about to drop fits our restrictions. We only accept dropps of plaintext, because from the dropped text we will create a snippet. Reimplemented from KListView. Definition at line 659 of file snippet_widget.cpp. References kdDebug(). |
|
Definition at line 48 of file snippet_widget.h. |
|
Definition at line 51 of file snippet_widget.h. Referenced by SnippetSettings::SnippetSettings(). |
|
Initial read the cofig file Definition at line 251 of file snippet_widget.cpp. References _cfg, _list, _mapSaved, _SnippetConfig, KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KConfigBase::readNumEntry(), KConfigBase::readRectEntry(), SnippetConfig::setDelimiter(), KConfigBase::setGroup(), SnippetConfig::setInputMethod(), SnippetConfig::setMultiRect(), SnippetConfig::setSingleRect(), and SnippetConfig::setToolTips(). Referenced by SnippetWidget(). |
|
Inserts the parameter text into the activ view Definition at line 173 of file snippet_widget.cpp. References KParts::PartManager::activePart(), KParts::PartManager::activeWidget(), KTextEditor::ViewCursorInterface::cursorPositionReal(), KTextEditor::EditInterface::insertText(), m_part, KDevPlugin::partController(), and text(). Referenced by slotListDblClicked(). |
|
Shows the Snippet-Text as ToolTip Definition at line 310 of file snippet_widget.cpp. References _SnippetConfig, SnippetItem::getText(), and SnippetConfig::useToolTips(). |
|
This function is used to parse the given QString for variables. If found the user will be prompted for a replacement value. It returns the string text with all replacements made Definition at line 356 of file snippet_widget.cpp. References _mapSaved, _SnippetConfig, SnippetConfig::getInputMethod(), SnippetConfig::getMultiRect(), SnippetConfig::getSingleRect(), SnippetConfig::setMultiRect(), SnippetConfig::setSingleRect(), showMultiVarDialog(), showSingleVarDialog(), and text(). Referenced by slotListDblClicked(). |
|
This function constructs a dialog which contains a label and a linedit for every variable that is stored in the given map except the double-delimiter entry It return true if everything was ok and false if the user hit cancel Definition at line 429 of file snippet_widget.cpp. References _SnippetConfig, SnippetConfig::getDelimiter(), KTextEdit, and KPushButton::setText(). Referenced by parseText(). |
|
Shows the Popup-Menu depending item is a valid pointer Definition at line 328 of file snippet_widget.cpp. References SnippetItem::getName(), KPopupMenu::insertTitle(), slotAdd(), slotEdit(), and slotRemove(). Referenced by SnippetWidget(). |
|
This function constructs a dialog which contains a label and a linedit for the given variable It return either the entered value or an empty string if the user hit cancel Definition at line 566 of file snippet_widget.cpp. References KTextEdit, and KPushButton::setText(). Referenced by parseText(). |
|
Opens the didalog to add a snippet Definition at line 92 of file snippet_widget.cpp. References _list, KLineEdit::clear(), kdDebug(), m_dialog, SnippetDlg::snippetName, and SnippetDlg::snippetText. Referenced by showPopupMenu(). |
|
This slot is connected to the dropped signal. If it is emitted, we need to construct a new snippet entry with the data given Definition at line 676 of file snippet_widget.cpp. References _list, KLineEdit::clear(), kdDebug(), m_dialog, SnippetDlg::snippetName, and SnippetDlg::snippetText. Referenced by SnippetWidget(). |
|
Opens the dialog of editing the selected snippet Definition at line 126 of file snippet_widget.cpp. References SnippetDlg::btnAdd, SnippetItem::getName(), SnippetItem::getText(), m_dialog, SnippetItem::setName(), SnippetItem::setText(), KPushButton::setText(), KLineEdit::setText(), SnippetDlg::snippetName, and SnippetDlg::snippetText. Referenced by showPopupMenu(). |
|
On a DoubleClick the clicked snippet gets inserted at the current cursor position of the active view Definition at line 158 of file snippet_widget.cpp. References _SnippetConfig, SnippetConfig::getDelimiter(), SnippetItem::getText(), insertIntoActiveView(), and parseText(). Referenced by SnippetWidget(). |
|
Removes the selected snippet Definition at line 108 of file snippet_widget.cpp. References _list. Referenced by showPopupMenu(). |
|
Write the cofig file Definition at line 199 of file snippet_widget.cpp. References _cfg, _list, _mapSaved, _SnippetConfig, KConfigBase::deleteGroup(), SnippetConfig::getDelimiter(), SnippetConfig::getInputMethod(), SnippetConfig::getMultiRect(), SnippetItem::getName(), SnippetConfig::getSingleRect(), SnippetItem::getText(), KConfigBase::setGroup(), KConfigBase::sync(), SnippetConfig::useToolTips(), and KConfigBase::writeEntry(). Referenced by ~SnippetWidget(). |
Member Data Documentation
|
Definition at line 69 of file snippet_widget.h. Referenced by initConfig(), SnippetWidget(), and writeConfig(). |
|
Definition at line 67 of file snippet_widget.h. Referenced by initConfig(), slotAdd(), slotDropped(), slotRemove(), SnippetWidget(), writeConfig(), and ~SnippetWidget(). |
|
Definition at line 68 of file snippet_widget.h. Referenced by initConfig(), parseText(), and writeConfig(). |
|
Definition at line 70 of file snippet_widget.h. Referenced by initConfig(), maybeTip(), parseText(), showMultiVarDialog(), slotListDblClicked(), and writeConfig(). |
|
Definition at line 56 of file snippet_widget.h. Referenced by slotAdd(), slotDropped(), slotEdit(), and SnippetWidget(). |
|
Definition at line 55 of file snippet_widget.h. Referenced by insertIntoActiveView(). |
The documentation for this class was generated from the following files:
- parts/snippet/snippet_widget.h
- parts/snippet/snippet_widget.cpp