popListView Class Reference
A list view with a right-mouse-button popup menu. More...
#include <poplistview.h>
Inherits QListView.
Inheritance diagram for popListView:
Detailed Description
A list view with a right-mouse-button popup menu.This class combines a normal QListView with a popup menu which appears when the right mouse button is clicked.This allows the manipulation of list view items via the menu items in the popup menu.
There are two modes for the appearance of the popup menu. Use popListView::OverItem
in order to allow the popup menu to appear only when a list view item has been clicked, or popListView::ShowAnywhere
if the context menu is allowed to pop up anywhere.
Definition at line 123 of file poplistview.h.
Member Enumeration Documentation
|
Two different popup styles.
Definition at line 248 of file poplistview.h. Referenced by popupStyle(). |
Constructor & Destructor Documentation
|
The constructor.
Definition at line 97 of file poplistview.cpp. References QObject::connect(), lastChildItem, lastRootItem, QListView::mouseButtonClicked(), popup, QListView::setAllColumnsShowFocus(), QFrame::setFrameStyle(), QFrame::setLineWidth(), QFrame::setMidLineWidth(), slotMouseButtonClicked(), slotShowContextMenu(), and QListView::triggerUpdate(). |
|
The destructor.
Definition at line 126 of file poplistview.cpp. |
Member Function Documentation
|
Adds a list view item at root level. Optionally, an icon can be displayed.
Definition at line 138 of file poplistview.cpp. References lastRootItem, QListViewItem::setPixmap(), and QListViewItem::setText(). Referenced by CompletedWUList::fillTreeList(). |
|
Adds a child list view item. The list view item will be the child of parent. Optionally, an icon can be displayed.
Definition at line 165 of file poplistview.cpp. References lastChildItem, lastRootItem, QListViewItem::setPixmap(), and QListViewItem::setText(). Referenced by CompletedWUList::updateList(). |
|
Clears all items in the list view.
Reimplemented from QListView. Definition at line 191 of file poplistview.cpp. References QListView::clear(), lastChildItem, and lastRootItem. Referenced by LoggedSigs::slotFillSpikeTable(). |
|
Adds a menu item to the right-click popup menu. The menu item will show the text name.
Definition at line 199 of file poplistview.cpp. References popup. Referenced by Analysis::Analysis(), and CompletedWUList::CompletedWUList(). |
|
Adds a menu item to the right-click popup menu. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The menu item will show the text name, and the icon icon.
Definition at line 205 of file poplistview.cpp. References popup. |
|
Adds a menu item to the right-click popup menu. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The menu item has a sub-menu pop, and displays the text name.
Definition at line 212 of file poplistview.cpp. References popup. |
|
Adds a menu item to the right-click popup menu. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The menu item has a sub-menu pop, and displays the text name and the icon icon.
Definition at line 219 of file poplistview.cpp. References popup. |
|
Defines an accelerator key. Defines an accelerator key for the menu item with the identifier id.
Definition at line 234 of file poplistview.h. References popup. Referenced by Analysis::Analysis(). |
|
Adds a separator to the popup menu. The separator becomes the last item in the popup menu. Definition at line 239 of file poplistview.h. References popup. Referenced by Analysis::Analysis(). |
|
Sets the title of the popup menu.
Definition at line 244 of file poplistview.h. References popup, and KPopupMenu::setTitle(). Referenced by Analysis::Analysis(). |
|
Returns a pointer to the KPopupMenu object.
Definition at line 251 of file poplistview.cpp. Referenced by Analysis::Analysis(), Analysis::checkPopupStatus(), CompletedWUList::CompletedWUList(), and CompletedWUList::prepareTreeListPopupMenu(). |
|
Sets the behaviour of the popup menu.
Definition at line 257 of file poplistview.cpp. References pstyle. Referenced by Analysis::Analysis(), CompletedWUList::CompletedWUList(), DataInfo::DataInfo(), and UserInfo::UserInfo(). |
|
Returns the current popup style.
Definition at line 263 of file poplistview.cpp. References PopupStyle, and pstyle. |
|
Enables or disables grid lines in the list view.
Definition at line 131 of file poplistview.cpp. References drawGrid, and QWidget::update(). Referenced by UserInfo::paintEvent(), LoggedSigs::paintEvent(), DataInfo::paintEvent(), CompletedWUList::paintEvent(), and Analysis::paintEvent(). |
|
Returns whether list view items are drawn with grid lines.
Definition at line 265 of file poplistview.h. |
|
Handles mouse button clicks correctly. This slot is called whenever the user clicked with either mouse button onto the list view.
Definition at line 227 of file poplistview.cpp. References QListView::currentItem(), popup, QCursor::pos(), pstyle, QListView::selectionChanged(), and QListView::setSelected(). Referenced by popListView(), and slotShowContextMenu(). |
|
Implemented as a workaround for Qt 3.0.5 (mouse button signals aren't emitted).
Definition at line 244 of file poplistview.cpp. References slotMouseButtonClicked(). Referenced by popListView(). |
Member Data Documentation
|
The last child item added to the tree.
Definition at line 269 of file poplistview.h. Referenced by clear(), insertChildItem(), and popListView(). |
|
The last root-item added to the tree.
Definition at line 271 of file poplistview.h. Referenced by clear(), insertChildItem(), insertRootItem(), and popListView(). |
|
Stores the display style of the popup menu.
Definition at line 273 of file poplistview.h. Referenced by popupStyle(), setPopupStyle(), and slotMouseButtonClicked(). |
|
The user-defined popup menu.
Definition at line 275 of file poplistview.h. Referenced by insertPopupItem(), insertSeparator(), popListView(), popupSetTitle(), setAccel(), and slotMouseButtonClicked(). |
|
Specifies whether to draw a grid inside the list view.
Definition at line 277 of file poplistview.h. Referenced by setGridEnabled(). |
The documentation for this class was generated from the following files: