messagingapp/msgui/unifiededitor/src/msgunieditorsubject.cpp
changeset 76 60a8a215b0ec
parent 51 3507212d340e
equal deleted inserted replaced
73:ecf6a73a9186 76:60a8a215b0ec
    43 MsgUnifiedEditorBaseWidget(parent),
    43 MsgUnifiedEditorBaseWidget(parent),
    44 mPriorityIcon(NULL),
    44 mPriorityIcon(NULL),
    45 mPriority(ConvergedMessage::Normal),
    45 mPriority(ConvergedMessage::Normal),
    46 mGenUtils(0)
    46 mGenUtils(0)
    47 {
    47 {
    48         mSubjectEdit = new MsgUnifiedEditorLineEdit(LOC_SUBJECT,this);
    48     this->setObjectName("subject");
    49         mSubjectEdit->setDefaultBehaviour(true);        
    49 
    50         HbStyle::setItemName(mSubjectEdit,"subjectEdit");
    50     mSubjectEdit = new MsgUnifiedEditorLineEdit(LOC_SUBJECT,this);
    51         mSubjectEdit->setMinRows(1);
    51     mSubjectEdit->setDefaultBehaviour(true);        
    52         mSubjectEdit->setMaxRows(10);
    52     HbStyle::setItemName(mSubjectEdit,"subjectEdit");
    53         
    53 
    54         mGenUtils = q_check_ptr(new UniEditorGenUtils());
    54     mGenUtils = q_check_ptr(new UniEditorGenUtils());
    55         
    55 
    56         connect(mSubjectEdit, SIGNAL(contentsChanged(const QString&)),
    56     connect(mSubjectEdit, SIGNAL(contentsChanged(const QString&)),
    57                 this, SLOT(onContentsChanged(const QString&)));
    57         this, SLOT(onContentsChanged(const QString&)));
    58 }
    58 }
    59 
    59 
    60 //---------------------------------------------------------------
    60 //---------------------------------------------------------------
    61 // MsgUnifiedEditorSubject::~MsgUnifiedEditorSubject
    61 // MsgUnifiedEditorSubject::~MsgUnifiedEditorSubject
    62 // @see header file
    62 // @see header file
    96         break;
    96         break;
    97         default:
    97         default:
    98         break;
    98         break;
    99     }
    99     }
   100 
   100 
   101     emit contentChanged();
   101     QVariantList data;
       
   102     data << subjectSize() << mPriority;  
       
   103     emit contentsChanged(data);
   102     this->repolish();
   104     this->repolish();
   103 }
   105 }
   104 
   106 
   105 QString MsgUnifiedEditorSubject::text()
   107 QString MsgUnifiedEditorSubject::text()
   106 {
   108 {
   131     }
   133     }
   132 
   134 
   133     mPrevBuffer = text;
   135     mPrevBuffer = text;
   134     if(!subjectOkInSms())
   136     if(!subjectOkInSms())
   135     {
   137     {
   136         emit contentChanged();
   138         QVariantList data;
       
   139         data << subjectSize() << mPriority;  
       
   140         emit contentsChanged(data);
   137     }
   141     }
   138 }
   142 }
   139 
   143 
   140 bool MsgUnifiedEditorSubject::subjectOkInSms()
   144 bool MsgUnifiedEditorSubject::subjectOkInSms()
   141 {
   145 {