controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.cpp
changeset 40 593f946f4fec
parent 22 a5692c68d772
equal deleted inserted replaced
22:a5692c68d772 40:593f946f4fec
    18 
    18 
    19 #include "cpprofileactivatordialog.h"
    19 #include "cpprofileactivatordialog.h"
    20 #include <cpitemdatahelper.h>
    20 #include <cpitemdatahelper.h>
    21 #include <cpprofilemodel.h>
    21 #include <cpprofilemodel.h>
    22 #include <QScopedPointer>
    22 #include <QScopedPointer>
    23 #include "cpprofilemonitor.h"
    23 #include <cpprofilemonitor.h>
    24 
    24 
    25 CpProfileActivatorEntryItem::CpProfileActivatorEntryItem(CpItemDataHelper &itemDataHelper,
    25 CpProfileActivatorEntryItem::CpProfileActivatorEntryItem(CpItemDataHelper &itemDataHelper,
    26                 const QString &text,
    26                 const QString &text,
    27                 const QString &description,
    27                 const QString &description,
    28                 const QString &icon,
    28                 const QString &icon,
    34     mProfileModel = new CpProfileModel();
    34     mProfileModel = new CpProfileModel();
    35     
    35     
    36     int currentId = mProfileModel->activeProfileId();
    36     int currentId = mProfileModel->activeProfileId();
    37     QString currentName = mProfileModel->profileName(currentId);
    37     QString currentName = mProfileModel->profileName(currentId);
    38     this->setDescription(currentName);
    38     this->setDescription(currentName);
    39     connect(mProfileMonitor, SIGNAL(profileActivated(int)), this, SLOT(onProfileChanged(int)));        
    39     connect(mProfileMonitor, SIGNAL(profileActivated(int)), this, SLOT(onProfileChanged(int)));
       
    40     connect(mProfileMonitor, SIGNAL(activeProfileModified(int)), this, SLOT(onProfileChanged(int)));
    40 }
    41 }
    41 
    42 
    42 CpProfileActivatorEntryItem::~CpProfileActivatorEntryItem()
    43 CpProfileActivatorEntryItem::~CpProfileActivatorEntryItem()
    43 {
    44 {
    44     delete mProfileModel;
    45     delete mProfileModel;