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

« back to all changes in this revision

Viewing changes to kmail/tagselectdialog.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:
28
28
 
29
29
#include "tagselectdialog.h"
30
30
#include "tag.h"
 
31
 
 
32
#include <KListWidgetSearchLine>
 
33
 
31
34
#include <Nepomuk/Resource>
32
35
#include <Nepomuk/ResourceManager>
33
36
#include <Nepomuk/Tag>
52
55
  setMainWidget( mainWidget );
53
56
 
54
57
  mListTag = new QListWidget( this );
 
58
  mListWidgetSearchLine = new KListWidgetSearchLine(this,mListTag);
 
59
  mListWidgetSearchLine->setClickMessage(i18n("Search tag"));
 
60
  mListWidgetSearchLine->setClearButtonShown(true);
 
61
 
 
62
  mainLayout->addWidget(mListWidgetSearchLine);
55
63
  mainLayout->addWidget( mListTag );
56
64
  
57
65
  QList<Tag::Ptr> tagList;
68
76
    item->setCheckState( Qt::Unchecked );
69
77
    mListTag->addItem( item );
70
78
 
71
 
    if ( numberOfSelectedMessages == 1 )
72
 
    {
 
79
    if ( numberOfSelectedMessages == 1 ) {
73
80
      const bool hasTag = itemResource.tags().contains(  Nepomuk::Tag( tag->tagName ) );
74
81
      item->setCheckState( hasTag ? Qt::Checked : Qt::Unchecked );
75
 
    }
76
 
    else {
 
82
    } else {
77
83
      item->setCheckState( Qt::Unchecked );
78
84
    }    
79
85
  }