libkleo
Go to the documentation of this file.
33 #ifndef __KLEO_KEYLISTVIEW_H__
34 #define __KLEO_KEYLISTVIEW_H__
38 #include <gpgme++/key.h>
40 #include <QtCore/QByteArray>
41 #include <QTreeWidget>
42 #include <QHeaderView>
53 #define TEMPLATE_TYPENAME(T) template <typename T>
56 return item && (item->type() == T::RTTI)
57 ? static_cast<T*>( item ) : 0 ;
62 return item && (item->type() == T::RTTI)
63 ? static_cast<const T*>( item ) : 0 ;
65 #undef TEMPLATE_TYPENAME
77 void setKey(
const GpgME::Key & key );
78 const GpgME::Key &
key()
const {
return mKey; }
80 enum { RTTI = QTreeWidgetItem::UserType + 1 };
85 virtual QString toolTip(
int column )
const;
109 virtual QString title(
int column )
const = 0;
110 virtual int width(
int column,
const QFontMetrics & fm )
const;
111 virtual QHeaderView::ResizeMode
resizeMode(
int )
const {
return QHeaderView::Interactive; }
113 virtual QString text(
const GpgME::Key & key,
int column )
const = 0;
114 virtual QString toolTip(
const GpgME::Key & key,
int column )
const;
115 virtual KIcon
icon(
const GpgME::Key &,
int )
const {
return KIcon(); }
116 virtual int compare(
const GpgME::Key & key1,
const GpgME::Key & key2,
const int column )
const;
123 virtual QFont keyFont(
const GpgME::Key &,
const QFont & )
const;
125 virtual QColor keyForeground(
const GpgME::Key & ,
const QColor & )
const;
127 virtual QColor keyBackground(
const GpgME::Key &,
const QColor & )
const;
132 QWidget * parent=0, Qt::WindowFlags f=0 );
140 virtual void setHierarchical(
bool hier );
144 bool isMultiSelection()
const;
148 using QTreeWidget::selectionChanged;
156 void keyPressEvent(QKeyEvent* event);
159 virtual void slotAddKey(
const GpgME::Key & key );
160 virtual void slotRefreshKey(
const GpgME::Key & key );
168 void slotEmitSelectionChanged();
169 void slotEmitContextMenu(
const QPoint& pos );
170 void slotUpdateTimeout();
176 QList<KeyListViewItem*> selectedItems()
const;
185 void doHierarchicalInsert(
const GpgME::Key & );
186 void gatherScattered();
192 const ColumnStrategy * mColumnStrategy;
193 const DisplayStrategy * mDisplayStrategy;
201 #endif // __KLEO_KEYLISTVIEW_H__
bool hierarchical() const
const ColumnStrategy * columnStrategy() const
#define TEMPLATE_TYPENAME(T)
const DisplayStrategy * displayStrategy() const
const GpgME::Key & key() const
virtual QHeaderView::ResizeMode resizeMode(int) const
virtual KIcon icon(const GpgME::Key &, int) const
T * lvi_cast(QTreeWidgetItem *item)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:48 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.