• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

ktimetracker

TreeViewHeaderContextMenu Class Reference

#include <treeviewheadercontextmenu.h>

Inheritance diagram for TreeViewHeaderContextMenu:

Inheritance graph
[legend]

List of all members.


Detailed Description

ContextMenu for QTreeView::header() to toggle the visible state of the columns.

It is possible to exclude columns from inserting in the menu either by the excludedColumns parameter in the constructor, by addExcludedColumn or addExcludedColumns.

You can also change the display style of the items in the menu.

Author:
Mathias Soeken <msoeken@tzi.de>

Definition at line 48 of file treeviewheadercontextmenu.h.


Public Types

enum  { AlwaysCheckBox, CheckBoxOnChecked, ShowHideText }

Signals

void columnToggled (int)

Public Member Functions

void addExcludedColumn (int column)
void addExcludedColumns (QVector< int > columns)
KMenu * menu () const
int style () const
 TreeViewHeaderContextMenu (QObject *parent, QTreeView *widget, int style=AlwaysCheckBox, QVector< int > excludedColumns=QVector< int >())
 ~TreeViewHeaderContextMenu ()

Protected Slots

void slotAboutToShow ()
void slotTriggered (QAction *)
void updateActions ()

Protected Attributes

QHash< QAction *, int > mActionColumnMapping
QVector< QAction * > mActions
KMenu * mContextMenu
QVector< int > mExcludedColumns
int mStyle
QTreeView * mWidget

Properties

KMenu menu
int style

Member Enumeration Documentation

anonymous enum

Enumerator:
AlwaysCheckBox 
CheckBoxOnChecked 
ShowHideText 

Definition at line 54 of file treeviewheadercontextmenu.h.


Constructor & Destructor Documentation

TreeViewHeaderContextMenu::TreeViewHeaderContextMenu ( QObject *  parent,
QTreeView *  widget,
int  style = AlwaysCheckBox,
QVector< int >  excludedColumns = QVector<int>() 
) [explicit]

Definition at line 34 of file treeviewheadercontextmenu.cpp.

TreeViewHeaderContextMenu::~TreeViewHeaderContextMenu (  ) 

Definition at line 53 of file treeviewheadercontextmenu.cpp.


Member Function Documentation

void TreeViewHeaderContextMenu::addExcludedColumn ( int  column  )  [inline]

Definition at line 81 of file treeviewheadercontextmenu.h.

void TreeViewHeaderContextMenu::addExcludedColumns ( QVector< int >  columns  )  [inline]

Definition at line 82 of file treeviewheadercontextmenu.h.

void TreeViewHeaderContextMenu::columnToggled ( int   )  [signal]

KMenu* TreeViewHeaderContextMenu::menu (  )  const [inline]

Definition at line 83 of file treeviewheadercontextmenu.h.

void TreeViewHeaderContextMenu::slotAboutToShow (  )  [protected, slot]

Definition at line 101 of file treeviewheadercontextmenu.cpp.

void TreeViewHeaderContextMenu::slotTriggered ( QAction *  action  )  [protected, slot]

Definition at line 90 of file treeviewheadercontextmenu.cpp.

int TreeViewHeaderContextMenu::style (  )  const [inline]

Definition at line 80 of file treeviewheadercontextmenu.h.

void TreeViewHeaderContextMenu::updateActions (  )  [protected, slot]

Definition at line 65 of file treeviewheadercontextmenu.cpp.


Member Data Documentation

QHash<QAction*, int> TreeViewHeaderContextMenu::mActionColumnMapping [protected]

Definition at line 76 of file treeviewheadercontextmenu.h.

QVector<QAction*> TreeViewHeaderContextMenu::mActions [protected]

Definition at line 73 of file treeviewheadercontextmenu.h.

KMenu* TreeViewHeaderContextMenu::mContextMenu [protected]

Definition at line 74 of file treeviewheadercontextmenu.h.

QVector<int> TreeViewHeaderContextMenu::mExcludedColumns [protected]

Definition at line 77 of file treeviewheadercontextmenu.h.

int TreeViewHeaderContextMenu::mStyle [protected]

Definition at line 75 of file treeviewheadercontextmenu.h.

QTreeView* TreeViewHeaderContextMenu::mWidget [protected]

Definition at line 72 of file treeviewheadercontextmenu.h.


Property Documentation

KMenu TreeViewHeaderContextMenu::menu [read]

Definition at line 51 of file treeviewheadercontextmenu.h.

int TreeViewHeaderContextMenu::style [read]

Definition at line 50 of file treeviewheadercontextmenu.h.


The documentation for this class was generated from the following files:
  • treeviewheadercontextmenu.h
  • treeviewheadercontextmenu.cpp

ktimetracker

Skip menu "ktimetracker"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal