~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to korganizer/views/todoview/kotododelegates.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "kotodomodel.h"
28
28
#include "kotodoviewview.h"
29
29
 
30
 
#include "incidenceeditor-ng/categoryhierarchyreader.h"
31
 
 
32
 
#include "libkdepim/kcheckcombobox.h"
33
 
 
 
30
#include <calendarsupport/calendar.h>
34
31
#include <calendarsupport/categoryconfig.h>
35
 
#include <calendarsupport/calendar.h>
 
32
 
 
33
#include <incidenceeditor-ng/categoryhierarchyreader.h>
 
34
 
 
35
#include <libkdepim/kcheckcombobox.h>
36
36
 
37
37
#include <KCalCore/CalFilter>
38
38
 
40
40
#include <KDateComboBox>
41
41
 
42
42
#include <QApplication>
43
 
#include <QSlider>
44
43
#include <QPainter>
45
 
#include <QPen>
46
 
#include <QBrush>
47
 
#include <QColor>
48
 
#include <QStyle>
49
 
#include <QStyleOptionViewItem>
50
 
#include <QStyleOptionProgressBar>
51
 
#include <QSize>
52
 
#include <QPoint>
53
 
#include <QEvent>
54
 
#include <QPaintEvent>
55
44
#include <QTextDocument>
56
 
#include <QFont>
57
 
#include <QFontMetrics>
58
45
#include <QToolTip>
59
46
 
60
 
using namespace KCalCore;
61
 
using namespace KPIM;
62
 
 
63
47
// ---------------- COMPLETION DELEGATE --------------------------
64
48
// ---------------------------------------------------------------
65
49
 
327
311
  Q_UNUSED( option );
328
312
  Q_UNUSED( index );
329
313
 
330
 
  KCheckComboBox *combo = new KCheckComboBox( parent );
 
314
  KPIM::KCheckComboBox *combo = new KPIM::KCheckComboBox( parent );
331
315
  QStringList categories;
332
316
 
333
317
  if ( mCalendar ) {
334
 
    CalFilter *filter = mCalendar->filter();
335
 
    if ( filter->criteria() & CalFilter::ShowCategories ) {
 
318
    KCalCore::CalFilter *filter = mCalendar->filter();
 
319
    if ( filter->criteria() & KCalCore::CalFilter::ShowCategories ) {
336
320
      categories = filter->categoryList();
337
321
      categories.sort();
338
322
    } else {
367
351
void KOTodoCategoriesDelegate::setEditorData( QWidget *editor,
368
352
                                              const QModelIndex &index ) const
369
353
{
370
 
  KCheckComboBox *combo = static_cast<KCheckComboBox *>( editor );
 
354
  KPIM::KCheckComboBox *combo = static_cast<KPIM::KCheckComboBox *>( editor );
371
355
 
372
356
  combo->setCheckedItems( index.data( Qt::EditRole ).toStringList(), Qt::UserRole );
373
357
}
376
360
                                             QAbstractItemModel *model,
377
361
                                             const QModelIndex &index ) const
378
362
{
379
 
  KCheckComboBox *combo = static_cast<KCheckComboBox *>( editor );
 
363
  KPIM::KCheckComboBox *combo = static_cast<KPIM::KCheckComboBox *>( editor );
380
364
 
381
365
  model->setData( index, combo->checkedItems( Qt::UserRole ) );
382
366
}