ktimetracker
treeviewheadercontextmenu.cpp
Go to the documentation of this file.
33 TreeViewHeaderContextMenu::TreeViewHeaderContextMenu( QObject *parent, QTreeView *widget, int style, QVector<int> excludedColumns )
44 connect( mWidget->header(), SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotCustomContextMenuRequested(QPoint)) );
141 action->setText( (mWidget->isColumnHidden(column) ? i18n("Show") : i18n("Hide")) + ' ' + text );
void setText(const QString &text)
QVector< int > mExcludedColumns
Definition: treeviewheadercontextmenu.h:76
void slotAboutToShow()
Definition: treeviewheadercontextmenu.cpp:112
void updateActions()
Definition: treeviewheadercontextmenu.cpp:70
void columnToggled(int)
void append(const T &value)
void setChecked(bool)
QPoint mapToGlobal(const QPoint &pos) const
TreeViewHeaderContextMenu(QObject *parent, QTreeView *widget, int style=AlwaysCheckBox, QVector< int > excludedColumns=QVector< int >())
Definition: treeviewheadercontextmenu.cpp:33
KMenu * mContextMenu
Definition: treeviewheadercontextmenu.h:73
QVector< QAction * > mActions
Definition: treeviewheadercontextmenu.h:72
bool isColumnHidden(int column) const
void clear()
bool contains(const T &value) const
~TreeViewHeaderContextMenu()
Definition: treeviewheadercontextmenu.cpp:55
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
void clear()
void setColumnHidden(int column, bool hide)
void setContextMenuPolicy(Qt::ContextMenuPolicy policy)
void setCheckable(bool)
QHash< QAction *, int > mActionColumnMapping
Definition: treeviewheadercontextmenu.h:75
virtual int columnCount(const QModelIndex &parent) const =0
void slotTriggered(QAction *)
Definition: treeviewheadercontextmenu.cpp:99
QHeaderView * header() const
QAbstractItemModel * model() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString toString() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.