kmail
SnippetWidget Class Reference
This is the widget which gets added to the right TreeToolView. More...
#include <snippetwidget.h>
Public Slots | |
void | slotAdd () |
void | slotAddGroup () |
void | slotEdit (QListViewItem *item_=0) |
void | slotEditGroup () |
void | slotExecute () |
void | slotRemove () |
Public Member Functions | |
QPtrList< SnippetItem > * | getList () |
SnippetConfig * | getSnippetConfig () |
SnippetWidget (KMEdit *editor, KActionCollection *actionCollection, QWidget *parent=0) | |
void | writeConfig () |
~SnippetWidget () | |
Protected Slots | |
void | showPopupMenu (QListViewItem *item, const QPoint &p, int) |
void | slotDropped (QDropEvent *e, QListViewItem *after) |
void | slotExecuted (QListViewItem *item=0) |
void | startDrag () |
Protected Member Functions | |
bool | acceptDrag (QDropEvent *event) const |
void | maybeTip (const QPoint &) |
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
Definition at line 45 of file snippetwidget.h.
Constructor & Destructor Documentation
SnippetWidget::SnippetWidget | ( | KMEdit * | editor, | |
KActionCollection * | actionCollection, | |||
QWidget * | parent = 0 | |||
) |
Definition at line 47 of file snippetwidget.cpp.
SnippetWidget::~SnippetWidget | ( | ) |
Definition at line 83 of file snippetwidget.cpp.
Member Function Documentation
bool SnippetWidget::acceptDrag | ( | QDropEvent * | event | ) | const [protected] |
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.
kdDebug(5006) << "returning TRUE " << endl;
Definition at line 876 of file snippetwidget.cpp.
QPtrList<SnippetItem>* SnippetWidget::getList | ( | ) | [inline] |
Definition at line 52 of file snippetwidget.h.
SnippetConfig* SnippetWidget::getSnippetConfig | ( | ) | [inline] |
Definition at line 54 of file snippetwidget.h.
void SnippetWidget::maybeTip | ( | const QPoint & | p | ) | [protected] |
Shows the Snippet-Text as ToolTip
Reimplemented from QToolTip.
Definition at line 518 of file snippetwidget.cpp.
void SnippetWidget::showPopupMenu | ( | QListViewItem * | item, | |
const QPoint & | p, | |||
int | ||||
) | [protected, slot] |
Shows the Popup-Menu depending item is a valid pointer
Definition at line 537 of file snippetwidget.cpp.
void SnippetWidget::slotAdd | ( | ) | [slot] |
Opens the dialog to add a snippet
Definition at line 104 of file snippetwidget.cpp.
void SnippetWidget::slotAddGroup | ( | ) | [slot] |
Opens the didalog to add a snippet
Definition at line 165 of file snippetwidget.cpp.
void SnippetWidget::slotDropped | ( | QDropEvent * | e, | |
QListViewItem * | after | |||
) | [protected, slot] |
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 906 of file snippetwidget.cpp.
void SnippetWidget::slotEdit | ( | QListViewItem * | item_ = 0 |
) | [slot] |
Definition at line 224 of file snippetwidget.cpp.
void SnippetWidget::slotEditGroup | ( | ) | [slot] |
Opens the dialog of editing the selected snippet-group
Definition at line 274 of file snippetwidget.cpp.
void SnippetWidget::slotExecute | ( | ) | [slot] |
Definition at line 950 of file snippetwidget.cpp.
void SnippetWidget::slotExecuted | ( | QListViewItem * | item = 0 |
) | [protected, slot] |
Definition at line 302 of file snippetwidget.cpp.
void SnippetWidget::slotRemove | ( | ) | [slot] |
Removes the selected snippet
Definition at line 186 of file snippetwidget.cpp.
void SnippetWidget::startDrag | ( | ) | [protected, slot] |
Definition at line 942 of file snippetwidget.cpp.
void SnippetWidget::writeConfig | ( | void | ) |
Write the cofig file
Definition at line 332 of file snippetwidget.cpp.
The documentation for this class was generated from the following files: