kleopatra
keytreeview.cpp
Go to the documentation of this file.
105 KeyTreeView::KeyTreeView( const QString & text, const shared_ptr<KeyFilter> & kf, AbstractKeyListSortFilterProxyModel * proxy, QWidget * parent )
124 assert( qobject_cast<HeaderView*>( m_view->header() ) == static_cast<HeaderView*>( m_view->header() ) );
149 assert( qobject_cast<HeaderView*>( m_view->header() ) == static_cast<HeaderView*>( m_view->header() ) );
200 while ( QAbstractProxyModel * const sm = qobject_cast<QAbstractProxyModel*>( pm->sourceModel() ) )
223 m_view->header()->resizeSection( column, qMax( m_view->header()->sectionSize( column ), m_view->header()->sectionSizeHint( column ) ) );
244 static QItemSelection itemSelectionFromKeys( const std::vector<Key> & keys, const KeyListSortFilterProxyModel & proxy ) {
255 m_view->selectionModel()->select( itemSelectionFromKeys( keys, *m_proxy ), QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows );
273 const std::vector<Key> selectedKeys = m_proxy->keys( m_view->selectionModel()->selectedRows() );
284 m_view->selectionModel()->setCurrentIndex( m_proxy->index( currentKey ), QItemSelectionModel::NoUpdate );
354 kdtools::for_each( sorted, boost::bind( &AbstractKeyListModel::removeKey, m_hierarchicalModel, _1 ) );
QLayout * layout() const
bool connectSearchBar(const QObject *bar)
Definition: keytreeview.cpp:376
GpgME::Key key(const QModelIndex &idx) const
Definition: keylistsortfilterproxymodel.cpp:77
void addKeysUnselected(const std::vector< GpgME::Key > &keys)
Definition: keytreeview.cpp:333
int width() const
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QModelIndex index(const GpgME::Key &key) const
Definition: keylistsortfilterproxymodel.cpp:97
Definition: keytreeview.h:56
void stringFilterChanged(const QString &filter)
QItemSelectionModel * selectionModel() const
void disconnectSearchBar(const QObject *bar)
Definition: keytreeview.cpp:369
virtual void setSourceModel(QAbstractItemModel *sourceModel)
int sectionSizeHint(int logicalIndex) const
int sortIndicatorSection() const
void selectKeys(const std::vector< GpgME::Key > &keys)
Definition: keytreeview.cpp:254
void sortByColumn(int column, Qt::SortOrder order)
void setFrameStyle(int style)
static const struct @10 connections[]
Definition: headerview.h:44
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual QModelIndex parent(const QModelIndex &child) const
void setSortColumn(int sortColumn, Qt::SortOrder sortOrder)
Definition: keytreeview.cpp:129
void addKeysSelected(const std::vector< GpgME::Key > &keys)
Definition: keytreeview.cpp:329
void resizeSection(int logicalIndex, int size)
bool isValid() const
void setFlatModel(AbstractKeyListModel *model)
Definition: keytreeview.cpp:205
void setColumnSizes(const std::vector< int > &sizes)
Definition: keytreeview.cpp:119
objectName
virtual void select(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
QModelIndexList selectedRows(int column) const
virtual void setSourceModel(QAbstractItemModel *sourceModel)
void setAllColumnsShowFocus(bool enable)
void setMargin(int margin)
void remove_duplicates_by_fpr(T &t)
Definition: predicates.h:115
void addWidget(QWidget *w)
QList< QModelIndex > addKeys(const std::vector< GpgME::Key > &keys)
Definition: keylistmodel.cpp:223
void setHierarchicalModel(AbstractKeyListModel *model)
Definition: keytreeview.cpp:214
std::vector< GpgME::Key > keys(const QList< QModelIndex > &indexes) const
Definition: keylistsortfilterproxymodel.cpp:86
int sectionSize(int logicalIndex) const
Definition: keylistmodel.h:49
void setParent(QObject *parent)
std::vector< GpgME::Key > selectedKeys() const
Definition: keytreeview.cpp:258
virtual void scrollTo(const QModelIndex &index, ScrollHint hint)
void expandAll()
void setKeyFilter(const boost::shared_ptr< const KeyFilter > &kf)
Definition: keylistsortfilterproxymodel.cpp:152
static QAbstractProxyModel * find_last_proxy(QAbstractProxyModel *pm)
Definition: keytreeview.cpp:198
void setHeader(QHeaderView *header)
AbstractKeyListModel * hierarchicalModel() const
Definition: keytreeview.h:69
void setSortingEnabled(bool enable)
QAbstractItemModel * sourceModel() const
void merge(const QItemSelection &other, QFlags< QItemSelectionModel::SelectionFlag > command)
std::vector< int > columnSizes() const
Definition: keytreeview.cpp:146
Qt::SortOrder sortIndicatorOrder() const
virtual void setModel(QAbstractItemModel *model)
void removeKey(const GpgME::Key &key)
Definition: keylistmodel.cpp:216
virtual void setHierarchicalView(bool on)
Definition: keytreeview.cpp:262
int height() const
static QItemSelection itemSelectionFromKeys(const std::vector< Key > &keys, const KeyListSortFilterProxyModel &proxy)
Definition: keytreeview.cpp:244
void setFilterFixedString(const QString &pattern)
void removeKeys(const std::vector< GpgME::Key > &keys)
Definition: keytreeview.cpp:337
virtual void setKeyFilter(const boost::shared_ptr< Kleo::KeyFilter > &filter)
Definition: keytreeview.cpp:236
void setCurrentIndex(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
QHeaderView * header() const
void keyFilterChanged(const boost::shared_ptr< Kleo::KeyFilter > &filter)
virtual QSize minimumSizeHint() const
void setKeys(const std::vector< GpgME::Key > &keys)
Definition: keylistmodel.cpp:205
void setKeys(const std::vector< GpgME::Key > &keys)
Definition: keytreeview.cpp:291
QModelIndex currentIndex() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int count() const
void hierarchicalChanged(bool on)
virtual void setStringFilter(const QString &text)
Definition: keytreeview.cpp:228
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 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:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.