~ubuntu-branches/ubuntu/raring/kdepimlibs/raring-proposed

« back to all changes in this revision

Viewing changes to akonadi/contact/contactgroupeditor.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-07-26 17:13:11 UTC
  • mfrom: (1.1.81)
  • Revision ID: package-import@ubuntu.com-20120726171311-j2heoxylb6lbhg4w
Tags: 4:4.9.0-0ubuntu1
* New upstream release
* Use direct build-depends versions rather than kde-sc-dev-latest

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <klocale.h>
40
40
#include <klineedit.h>
41
41
#include <kmessagebox.h>
 
42
#include <KColorScheme>
 
43
 
42
44
 
43
45
#include <QtCore/QTimer>
44
46
#include <QtGui/QGridLayout>
303
305
  d->mDefaultCollection = collection;
304
306
}
305
307
 
 
308
void ContactGroupEditor::groupNameIsValid(bool isValid)
 
309
{
 
310
#ifndef QT_NO_STYLE_STYLESHEET
 
311
  QString styleSheet;
 
312
  if ( !isValid ) {
 
313
    const KColorScheme::BackgroundRole bgColorScheme( KColorScheme::NegativeBackground );
 
314
    KStatefulBrush bgBrush( KColorScheme::View, bgColorScheme );
 
315
    styleSheet = QString::fromLatin1( "QLineEdit{ background-color:%1 }" ).
 
316
           arg( bgBrush.brush( this ).color().name() );
 
317
  }
 
318
  d->mGui.groupName->setStyleSheet(styleSheet);
 
319
#endif
 
320
}
 
321
 
306
322
#include "contactgroupeditor.moc"