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

libkleo

  • sources
  • kde-4.12
  • kdepim
  • libkleo
  • ui
keylistview.cpp
Go to the documentation of this file.
1 /*
2  keylistview.cpp
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  Copyright (c) 2004 Klarälvdalens Datakonsult AB
6 
7  Libkleopatra is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of the
10  License, or (at your option) any later version.
11 
12  Libkleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 
34 #include "keylistview.h"
35 
36 #include <kdebug.h>
37 
38 #include <QFontMetrics>
39 #include <QToolTip>
40 #include <QRect>
41 #include <QPoint>
42 #include <QPainter>
43 #include <QFont>
44 #include <QColor>
45 #include <QTimer>
46 #include <gpgme++/key.h>
47 
48 #include <vector>
49 #include <map>
50 
51 #include <assert.h>
52 #include <QKeyEvent>
53 
54 static const int updateDelayMilliSecs = 500;
55 
56 
57 class Kleo::KeyListView::Private {
58 public:
59  Private() : updateTimer( 0 ) {}
60 
61  std::vector<GpgME::Key> keyBuffer;
62  QTimer * updateTimer;
63  std::map<QByteArray,KeyListViewItem*> itemMap;
64 };
65 
66 // a list of signals where we want to replace QListViewItem with
67 // Kleo:KeyListViewItem:
68 static const struct {
69  const char * source;
70  const char * target;
71 } signalReplacements[] = {
72  { SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
73  SLOT(slotEmitDoubleClicked(QTreeWidgetItem*,int)) },
74  { SIGNAL(itemSelectionChanged()),
75  SLOT(slotEmitSelectionChanged()) },
76  { SIGNAL(customContextMenuRequested(QPoint)),
77  SLOT(slotEmitContextMenu(QPoint)) },
78 };
79 static const int numSignalReplacements = sizeof signalReplacements / sizeof *signalReplacements;
80 
81 
82 Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const DisplayStrategy * displayStrategy, QWidget * parent, Qt::WindowFlags f )
83  : QTreeWidget( parent ),
84  mColumnStrategy( columnStrategy ),
85  mDisplayStrategy ( displayStrategy ),
86  mHierarchical( false ),d(new Private())
87 {
88  setWindowFlags( f );
89  setContextMenuPolicy( Qt::CustomContextMenu );
90 
91  d->updateTimer = new QTimer( this );
92  d->updateTimer->setSingleShot( true );
93  connect( d->updateTimer, SIGNAL(timeout()), SLOT(slotUpdateTimeout()) );
94  if ( !columnStrategy ) {
95  kWarning(5150) <<"Kleo::KeyListView: need a column strategy to work with!";
96  return;
97  }
98 
99  const QFontMetrics fm = fontMetrics();
100 
101  for ( int col = 0 ; !columnStrategy->title( col ).isEmpty() ; ++col ) {
102  headerItem()->setText( col, columnStrategy->title( col ) );
103  header()->resizeSection( col, columnStrategy->width( col, fm ) );
104  header()->setResizeMode( col, columnStrategy->resizeMode( col ) );
105  }
106 
107  setAllColumnsShowFocus( true );
108 
109  for ( int i = 0 ; i < numSignalReplacements ; ++i )
110  connect( this, signalReplacements[i].source, signalReplacements[i].target );
111 
112  this->setToolTip(QString());
113  viewport()->setToolTip(QString()); // make double sure :)
114 }
115 
116 Kleo::KeyListView::~KeyListView() {
117  d->updateTimer->stop();
118  // need to clear here, since in ~QListView, our children won't have
119  // a valid listView() pointing to us anymore, and their dtors try to
120  // unregister from us.
121  clear();
122  assert( d->itemMap.size() == 0 );
123  // need to delete the tooltip ourselves, as ~QToolTip isn't virtual :o
124  delete d;
125  delete mColumnStrategy; mColumnStrategy = 0;
126  delete mDisplayStrategy; mDisplayStrategy = 0;
127 }
128 
129 
130 void Kleo::KeyListView::takeItem( QTreeWidgetItem * qlvi ) {
131  //kDebug(5150) <<"Kleo::KeyListView::takeItem(" << qlvi <<" )";
132  if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
133  deregisterItem( item );
134  takeTopLevelItem( indexOfTopLevelItem( qlvi ) );
135 }
136 
137 
138 void Kleo::KeyListView::setHierarchical( bool hier ) {
139  if ( hier == mHierarchical )
140  return;
141  mHierarchical = hier;
142  if ( hier )
143  gatherScattered();
144  else
145  scatterGathered( firstChild() );
146 }
147 
148 void Kleo::KeyListView::slotAddKey( const GpgME::Key & key ) {
149  if ( key.isNull() )
150  return;
151 
152  d->keyBuffer.push_back( key );
153  if ( !d->updateTimer->isActive() )
154  d->updateTimer->start( updateDelayMilliSecs );
155 }
156 
157 void Kleo::KeyListView::slotUpdateTimeout() {
158  if ( d->keyBuffer.empty() )
159  return;
160 
161  const bool wasUpdatesEnabled = viewport()->updatesEnabled();
162  if ( wasUpdatesEnabled )
163  viewport()->setUpdatesEnabled( false );
164  kDebug( 5150 ) <<"Kleo::KeyListView::slotUpdateTimeout(): processing"
165  << d->keyBuffer.size() << "items en block";
166  if ( hierarchical() ) {
167  for ( std::vector<GpgME::Key>::const_iterator it = d->keyBuffer.begin() ; it != d->keyBuffer.end() ; ++it )
168  doHierarchicalInsert( *it );
169  gatherScattered();
170  } else {
171  for ( std::vector<GpgME::Key>::const_iterator it = d->keyBuffer.begin() ; it != d->keyBuffer.end() ; ++it )
172  (void)new KeyListViewItem( this, *it );
173  }
174  if ( wasUpdatesEnabled )
175  viewport()->setUpdatesEnabled( true );
176  d->keyBuffer.clear();
177 }
178 
179 void Kleo::KeyListView::clear() {
180  d->updateTimer->stop();
181  d->keyBuffer.clear();
182  while ( QTreeWidgetItem *item = topLevelItem( 0 ) )
183  delete item;
184  QTreeWidget::clear();
185 }
186 
187 void Kleo::KeyListView::registerItem( KeyListViewItem * item ) {
188  //kDebug(5150) <<"registerItem(" << item <<" )";
189  if ( !item )
190  return;
191  const QByteArray fpr = item->key().primaryFingerprint();
192  if ( !fpr.isEmpty() )
193  d->itemMap.insert( std::make_pair( fpr, item ) );
194 }
195 
196 void Kleo::KeyListView::deregisterItem( const KeyListViewItem * item ) {
197  //kDebug(5150) <<"deregisterItem( KeyLVI:" << item <<" )";
198  if ( !item )
199  return;
200  std::map<QByteArray,KeyListViewItem*>::iterator it
201  = d->itemMap.find( item->key().primaryFingerprint() );
202  if ( it == d->itemMap.end() )
203  return;
204  // This assert triggers, though it shouldn't. Print some more
205  // information when it happens.
206  //Q_ASSERT( it->second == item );
207  if ( it->second != item ) {
208  kWarning(5150) << "deregisterItem:"
209  << "item " << item->key().primaryFingerprint()
210  << "it->second" << (it->second ? it->second->key().primaryFingerprint() : "is null" );
211  return;
212  }
213  d->itemMap.erase( it );
214 }
215 
216 void Kleo::KeyListView::doHierarchicalInsert( const GpgME::Key & key ) {
217  const QByteArray fpr = key.primaryFingerprint();
218  if ( fpr.isEmpty() )
219  return;
220  KeyListViewItem * item = 0;
221  if ( !key.isRoot() )
222  if ( KeyListViewItem * parent = itemByFingerprint( key.chainID() ) ) {
223  item = new KeyListViewItem( parent, key );
224  parent->setExpanded( true );
225  }
226  if ( !item )
227  item = new KeyListViewItem( this, key ); // top-level (for now)
228 
229  d->itemMap.insert( std::make_pair( fpr, item ) );
230 }
231 
232 void Kleo::KeyListView::gatherScattered() {
233  KeyListViewItem * item = firstChild();
234  while ( item ) {
235  KeyListViewItem * cur = item;
236  item = item->nextSibling();
237  if ( cur->key().isRoot() )
238  continue;
239  if ( KeyListViewItem * parent = itemByFingerprint( cur->key().chainID() ) ) {
240  // found a new parent...
241  // ### todo: optimize by suppressing removing/adding the item to the itemMap...
242  takeTopLevelItem( indexOfTopLevelItem( cur ) );
243  parent->addChild( cur );
244  parent->setExpanded( true );
245  }
246  }
247 }
248 
249 void Kleo::KeyListView::scatterGathered( KeyListViewItem * start ) {
250  KeyListViewItem* item = start;
251  while ( item ) {
252  KeyListViewItem * cur = item;
253  item = item->nextSibling();
254 
255  scatterGathered( Kleo::lvi_cast<Kleo::KeyListViewItem>( cur->child( 0 ) ) );
256  assert( cur->childCount() == 0 );
257 
258  // ### todo: optimize by suppressing removing/adding the item to the itemMap...
259  if ( cur->parent() )
260  static_cast<Kleo::KeyListViewItem*>( cur->parent() )->takeItem( cur );
261  else
262  takeItem( cur );
263  addTopLevelItem( cur );
264  }
265 }
266 
267 Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const QByteArray & s ) const {
268  if ( s.isEmpty() )
269  return 0;
270  const std::map<QByteArray,KeyListViewItem*>::const_iterator it = d->itemMap.find( s );
271  if ( it == d->itemMap.end() )
272  return 0;
273  return it->second;
274 }
275 
276 
277 void Kleo::KeyListView::slotRefreshKey( const GpgME::Key & key ) {
278  const char * fpr = key.primaryFingerprint();
279  if ( !fpr )
280  return;
281  if ( KeyListViewItem * item = itemByFingerprint( fpr ) )
282  item->setKey ( key );
283  else
284  // none found -> add it
285  slotAddKey( key );
286 }
287 
288 // slots for the emission of covariant signals:
289 
290 void Kleo::KeyListView::slotEmitDoubleClicked( QTreeWidgetItem * item, int col ) {
291  if ( !item || lvi_cast<KeyListViewItem>( item ) )
292  emit doubleClicked( static_cast<KeyListViewItem*>( item ), col );
293 }
294 
295 void Kleo::KeyListView::slotEmitReturnPressed( QTreeWidgetItem * item ) {
296  if ( !item || lvi_cast<KeyListViewItem>( item ) )
297  emit returnPressed( static_cast<KeyListViewItem*>( item ) );
298 }
299 
300 void Kleo::KeyListView::slotEmitSelectionChanged( ) {
301  emit selectionChanged( selectedItem() );
302 }
303 
304 void Kleo::KeyListView::slotEmitContextMenu( const QPoint& pos )
305 {
306  QTreeWidgetItem *item = itemAt( pos );
307  if ( !item || lvi_cast<KeyListViewItem>( item ) )
308  emit contextMenu( static_cast<KeyListViewItem*>( item ), viewport()->mapToGlobal( pos ) );
309 }
310 
311 //
312 //
313 // KeyListViewItem
314 //
315 //
316 
317 Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, const GpgME::Key & key )
318  : QTreeWidgetItem( parent, RTTI )
319 {
320  Q_ASSERT( parent );
321  setKey( key );
322 }
323 
324 Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, KeyListViewItem * after, const GpgME::Key & key )
325  : QTreeWidgetItem( parent, after, RTTI )
326 {
327  Q_ASSERT( parent );
328  setKey( key );
329 }
330 
331 Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, const GpgME::Key & key )
332  : QTreeWidgetItem( parent, RTTI )
333 {
334  Q_ASSERT( parent && parent->listView() );
335  setKey( key );
336 }
337 
338 Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, KeyListViewItem * after, const GpgME::Key & key )
339  : QTreeWidgetItem( parent, after, RTTI )
340 {
341  Q_ASSERT( parent && parent->listView() );
342  setKey( key );
343 }
344 
345 Kleo::KeyListViewItem::~KeyListViewItem() {
346  // delete the children first... When children are deleted in the
347  // QLVI dtor, they don't have listView() anymore, thus they don't
348  // call deregister( this ), leading to stale entries in the
349  // itemMap...
350  while ( QTreeWidgetItem * item = child( 0 ) )
351  delete item;
352  // better do this here, too, since deletion is top-down and thus
353  // we're deleted when our parent item is no longer a
354  // KeyListViewItem, but a mere QListViewItem, so our takeItem()
355  // overload is gone by that time...
356  if ( KeyListView * lv = listView() )
357  lv->deregisterItem( this );
358 }
359 
360 void Kleo::KeyListViewItem::setKey( const GpgME::Key & key ) {
361  KeyListView * lv = listView();
362  if ( lv )
363  lv->deregisterItem( this );
364  mKey = key;
365  if ( lv )
366  lv->registerItem( this );
367 
368  // the ColumnStrategy operations might be very slow, so cache their
369  // result here, where we're non-const :)
370  const Kleo::KeyListView::ColumnStrategy * cs = lv ? lv->columnStrategy() : 0 ;
371  if ( !cs )
372  return;
373  const KeyListView::DisplayStrategy * ds = lv ? lv->displayStrategy() : 0 ;
374  const int numCols = lv ? lv->columnCount() : 0 ;
375  for ( int i = 0 ; i < numCols ; ++i ) {
376  setText( i, cs->text( key, i ) );
377  setToolTip( i, cs->toolTip( key, i ) );
378  const KIcon icon = cs->icon( key, i );
379  if ( !icon.isNull() )
380  setIcon( i, icon );
381  if ( ds ) {
382  setForeground( i, QBrush( ds->keyForeground( key, foreground( i ).color() ) ) );
383  setBackgroundColor( i, ds->keyBackground( key, backgroundColor( i ) ) );
384  setFont( i, ds->keyFont( key, font( i ) ) );
385  }
386  }
387 }
388 
389 QString Kleo::KeyListViewItem::toolTip( int col ) const {
390  return listView() && listView()->columnStrategy()
391  ? listView()->columnStrategy()->toolTip( key(), col )
392  : QString() ;
393 }
394 
395 bool Kleo::KeyListViewItem::operator<(const QTreeWidgetItem& other) const
396 {
397  if ( other.type() != RTTI || !listView() || !listView()->columnStrategy() )
398  return QTreeWidgetItem::operator<(other);
399  const KeyListViewItem * that = static_cast<const KeyListViewItem*>( &other );
400  return listView()->columnStrategy()->compare( this->key(), that->key(), treeWidget()->sortColumn() ) < 0;
401 }
402 
403 
404 void Kleo::KeyListViewItem::takeItem( QTreeWidgetItem * qlvi ) {
405  //kDebug(5150) <<"Kleo::KeyListViewItem::takeItem(" << qlvi <<" )";
406  if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
407  listView()->deregisterItem( item );
408  takeChild( indexOfChild( qlvi ) );
409 }
410 
411 
412 //
413 //
414 // ColumnStrategy
415 //
416 //
417 
418 Kleo::KeyListView::ColumnStrategy::~ColumnStrategy() {}
419 
420 int Kleo::KeyListView::ColumnStrategy::compare( const GpgME::Key & key1, const GpgME::Key & key2, const int col ) const {
421  return QString::localeAwareCompare( text( key1, col ), text( key2, col ) );
422 }
423 
424 int Kleo::KeyListView::ColumnStrategy::width( int col, const QFontMetrics & fm ) const {
425  return fm.width( title( col ) ) * 2;
426 }
427 
428 QString Kleo::KeyListView::ColumnStrategy::toolTip( const GpgME::Key & key, int col ) const {
429  return text( key, col );
430 }
431 
432 
433 //
434 //
435 // DisplayStrategy
436 //
437 //
438 
439 Kleo::KeyListView::DisplayStrategy::~DisplayStrategy() {}
440 
441 
442 //font
443 QFont Kleo::KeyListView::DisplayStrategy::keyFont( const GpgME::Key &, const QFont & font ) const {
444  return font;
445 }
446 
447 //foreground
448 QColor Kleo::KeyListView::DisplayStrategy::keyForeground( const GpgME::Key &, const QColor & fg )const {
449  return fg;
450 }
451 
452 //background
453 QColor Kleo::KeyListView::DisplayStrategy::keyBackground( const GpgME::Key &, const QColor & bg )const {
454  return bg;
455 }
456 
457 
458 //
459 //
460 // Collection of covariant return reimplementations of QListView(Item)
461 // members:
462 //
463 //
464 
465 Kleo::KeyListView * Kleo::KeyListViewItem::listView() const {
466  return static_cast<Kleo::KeyListView*>( QTreeWidgetItem::treeWidget() );
467 }
468 
469 Kleo::KeyListViewItem * Kleo::KeyListViewItem::nextSibling() const
470 {
471  if ( parent() ) {
472  const int myIndex = parent()->indexOfChild( const_cast<KeyListViewItem*>( this ) );
473  return static_cast<Kleo::KeyListViewItem*>( parent()->child( myIndex + 1 ) );
474  }
475  const int myIndex = treeWidget()->indexOfTopLevelItem( const_cast<KeyListViewItem*>( this ) );
476  return static_cast<Kleo::KeyListViewItem*>( treeWidget()->topLevelItem( myIndex + 1 ) );
477 }
478 
479 Kleo::KeyListViewItem * Kleo::KeyListView::firstChild() const {
480  return static_cast<Kleo::KeyListViewItem*>( topLevelItem( 0 ) );
481 }
482 
483 Kleo::KeyListViewItem * Kleo::KeyListView::selectedItem() const
484 {
485  QList<KeyListViewItem*> selection = selectedItems();
486  if ( selection.size() == 0 )
487  return 0;
488  return selection.first();
489 }
490 
491 QList<Kleo::KeyListViewItem*> Kleo::KeyListView::selectedItems() const
492 {
493  QList<KeyListViewItem*> result;
494  foreach ( QTreeWidgetItem* selectedItem, QTreeWidget::selectedItems() ) {
495  if ( Kleo::KeyListViewItem * i = Kleo::lvi_cast<Kleo::KeyListViewItem>( selectedItem ) )
496  result.append( i );
497  }
498  return result;
499 }
500 
501 bool Kleo::KeyListView::isMultiSelection() const
502 {
503  return selectionMode() == ExtendedSelection || selectionMode() == MultiSelection;
504 }
505 
506 void Kleo::KeyListView::keyPressEvent(QKeyEvent* event)
507 {
508  if ( event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter ) {
509  if ( selectedItem() )
510  slotEmitReturnPressed( selectedItem() );
511  }
512  QTreeView::keyPressEvent(event);
513 }
514 
515 
516 #include "keylistview.moc"
Kleo::KeyListViewItem::takeItem
void takeItem(QTreeWidgetItem *item)
Definition: keylistview.cpp:404
source
const char * source
Definition: keylistview.cpp:69
Kleo::KeyListViewItem::setKey
void setKey(const GpgME::Key &key)
Definition: keylistview.cpp:360
Kleo::KeyListView::ColumnStrategy::width
virtual int width(int column, const QFontMetrics &fm) const
Definition: keylistview.cpp:424
keylistview.h
Kleo::KeyListView::setHierarchical
virtual void setHierarchical(bool hier)
Definition: keylistview.cpp:138
QTreeWidget
Kleo::KeyListView::selectedItems
QList< KeyListViewItem * > selectedItems() const
Definition: keylistview.cpp:491
Kleo::KeyListView::slotRefreshKey
virtual void slotRefreshKey(const GpgME::Key &key)
Definition: keylistview.cpp:277
target
const char * target
Definition: keylistview.cpp:70
QWidget
QString
Kleo::KeyListView::DisplayStrategy::keyForeground
virtual QColor keyForeground(const GpgME::Key &, const QColor &) const
Definition: keylistview.cpp:448
Kleo::KeyListViewItem::~KeyListViewItem
~KeyListViewItem()
Definition: keylistview.cpp:345
Kleo::KeyListViewItem::nextSibling
KeyListViewItem * nextSibling() const
Definition: keylistview.cpp:469
Kleo::KeyListViewItem::toolTip
virtual QString toolTip(int column) const
Definition: keylistview.cpp:389
Kleo::KeyListView::ColumnStrategy::toolTip
virtual QString toolTip(const GpgME::Key &key, int column) const
Definition: keylistview.cpp:428
Kleo::KeyListView::firstChild
KeyListViewItem * firstChild() const
Definition: keylistview.cpp:479
signalReplacements
static const struct @9 signalReplacements[]
Kleo::KeyListView::selectedItem
KeyListViewItem * selectedItem() const
Definition: keylistview.cpp:483
Kleo::KeyListView::columnStrategy
const ColumnStrategy * columnStrategy() const
Definition: keylistview.h:136
Kleo::KeyListView::~KeyListView
~KeyListView()
Definition: keylistview.cpp:116
Kleo::KeyListView::itemByFingerprint
KeyListViewItem * itemByFingerprint(const QByteArray &) const
Definition: keylistview.cpp:267
Kleo::KeyListView::takeItem
void takeItem(QTreeWidgetItem *)
Definition: keylistview.cpp:130
QTreeWidgetItem
Kleo::KeyListView::displayStrategy
const DisplayStrategy * displayStrategy() const
Definition: keylistview.h:137
Kleo::KeyListView::clear
void clear()
Definition: keylistview.cpp:179
Kleo::KeyListViewItem::key
const GpgME::Key & key() const
Definition: keylistview.h:78
Kleo::KeyListView::ColumnStrategy::~ColumnStrategy
virtual ~ColumnStrategy()
Definition: keylistview.cpp:418
Kleo::KeyListView::DisplayStrategy
Definition: keylistview.h:119
Kleo::KeyListView
Definition: keylistview.h:101
Kleo::KeyListView::ColumnStrategy::resizeMode
virtual QHeaderView::ResizeMode resizeMode(int) const
Definition: keylistview.h:111
Kleo::KeyListViewItem::KeyListViewItem
KeyListViewItem(KeyListView *parent, const GpgME::Key &key)
Definition: keylistview.cpp:317
Kleo::KeyListView::slotAddKey
virtual void slotAddKey(const GpgME::Key &key)
Definition: keylistview.cpp:148
Kleo::KeyListView::ColumnStrategy::icon
virtual KIcon icon(const GpgME::Key &, int) const
Definition: keylistview.h:115
Kleo::KeyListView::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition: keylistview.cpp:506
updateDelayMilliSecs
static const int updateDelayMilliSecs
Definition: keylistview.cpp:54
Kleo::KeyListView::ColumnStrategy::title
virtual QString title(int column) const =0
Kleo::KeyListViewItem
Definition: keylistview.h:69
Kleo::KeyListView::DisplayStrategy::keyBackground
virtual QColor keyBackground(const GpgME::Key &, const QColor &) const
Definition: keylistview.cpp:453
Kleo::KeyListView::isMultiSelection
bool isMultiSelection() const
Definition: keylistview.cpp:501
Kleo::KeyListViewItem::listView
KeyListView * listView() const
Definition: keylistview.cpp:465
Kleo::KeyListView::ColumnStrategy::compare
virtual int compare(const GpgME::Key &key1, const GpgME::Key &key2, const int column) const
Definition: keylistview.cpp:420
Kleo::KeyListView::KeyListView
KeyListView(const ColumnStrategy *strategy, const DisplayStrategy *display=0, QWidget *parent=0, Qt::WindowFlags f=0)
Definition: keylistview.cpp:82
Kleo::KeyListView::DisplayStrategy::keyFont
virtual QFont keyFont(const GpgME::Key &, const QFont &) const
Definition: keylistview.cpp:443
Kleo::KeyListView::ColumnStrategy
Definition: keylistview.h:106
Kleo::KeyListViewItem::operator<
bool operator<(const QTreeWidgetItem &other) const
Definition: keylistview.cpp:395
Kleo::KeyListView::DisplayStrategy::~DisplayStrategy
virtual ~DisplayStrategy()
Definition: keylistview.cpp:439
Kleo::KeyListView::ColumnStrategy::text
virtual QString text(const GpgME::Key &key, int column) const =0
numSignalReplacements
static const int numSignalReplacements
Definition: keylistview.cpp:79
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.

libkleo

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal