Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

CmdSelector Class Reference

Provides a popup window that contains a listvew, in which the user may select a command item from. More...

#include <cmdselector.h>

List of all members.

Signals

void closed ()
void cmdSelected (CmdTreeNode *)

Public Member Functions

 CmdSelector (QWidget *parent=0, const char *name=0, int width=-1, int height=-1)
void popup (QWidget *parent=0)
void setCmdTree (QPtrList< CmdTreeNode > *tree)
void selectItem (QListViewItem *item)
void selectItem (CmdTreeNode *cmd)

Private Slots

void listItemClicked (QListViewItem *item)

Private Member Functions

template<class ParentT> void insertSubtree (ParentT *parent, QPtrList< CmdTreeNode > *)

Private Attributes

QWidget * popupParent
QListView * cmdList
CmdTreeNodecurrentCmd
QMap< QListViewItem *, CmdTreeNode * > listItemToCmd
QMap< CmdTreeNode *, QListViewItem * > cmdToListItem


Detailed Description

Provides a popup window that contains a listvew, in which the user may select a command item from.


Constructor & Destructor Documentation

CmdSelector::CmdSelector QWidget *  parent = 0,
const char *  name = 0,
int  width = -1,
int  height = -1
 

Default constructor.


Member Function Documentation

void CmdSelector::closed  )  [signal]
 

void CmdSelector::cmdSelected CmdTreeNode  )  [signal]
 

template<class ParentT>
void CmdSelector::insertSubtree ParentT *  parent,
QPtrList< CmdTreeNode > *  tree
[private]
 

Recursively inserts items into the treeview Templated as the parent could be of type QListView OR QListViewItem.

void CmdSelector::listItemClicked QListViewItem *  item  )  [private, slot]
 

Change which item is currently selected, then close the pop-up window.

void CmdSelector::popup QWidget *  parent = 0  ) 
 

Pop-up the command selector widget, enabling the user to select a command.

Note:This will try to position the pop-up window in a suitable location on the screen.

void CmdSelector::selectItem CmdTreeNode cmd  ) 
 

Select a given command if it is in the list. Reference: CmdTreeNode*

void CmdSelector::selectItem QListViewItem *  item  ) 
 

Select a given item if it is in the list. Reference: QListViewItem*

void CmdSelector::setCmdTree QPtrList< CmdTreeNode > *  tree  ) 
 

Set the tree of commands that will be shown in the listview. Existing list view items and mappings will be cleared first.


Member Data Documentation

QListView* CmdSelector::cmdList [private]
 

QMap<CmdTreeNode*, QListViewItem*> CmdSelector::cmdToListItem [private]
 

CmdTreeNode* CmdSelector::currentCmd [private]
 

QMap<QListViewItem*, CmdTreeNode*> CmdSelector::listItemToCmd [private]
 

QWidget* CmdSelector::popupParent [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Feb 27 12:01:40 2004 for Glitch by doxygen 1.3.2