messagingapp/msgui/conversationview/src/msgeditorwidget.cpp
changeset 43 35b64624a9e7
parent 34 84197e66a4bd
child 44 36f374c67aa8
equal deleted inserted replaced
34:84197e66a4bd 43:35b64624a9e7
    83     // Create mandatory element of mesh layout.
    83     // Create mandatory element of mesh layout.
    84     mMsgEditor = new MsgEditor(this);
    84     mMsgEditor = new MsgEditor(this);
    85     mMsgEditor->setMaxRows(3); // NOTE: Don't remove this line.
    85     mMsgEditor->setMaxRows(3); // NOTE: Don't remove this line.
    86     HbStyle::setItemName(mMsgEditor, "msgEditor");
    86     HbStyle::setItemName(mMsgEditor, "msgEditor");
    87 
    87 
    88     mSendButton = new HbPushButton(this);
    88 	mSendButton = new HbPushButton(this); 
    89     HbStyle::setItemName(mSendButton, "sendButton");
    89     HbStyle::setItemName(mSendButton, "sendButton"); 
       
    90     mSendButton->setEnabled(false); 
       
    91     
       
    92     HbFrameItem* backGround = new HbFrameItem(this); 
       
    93     backGround->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); 
       
    94     mSendButton->setBackgroundItem(backGround); 
       
    95     updateButtonBackground(SEND_BUTTON_DISABLED); 
    90     mSendButton->setIcon(HbIcon(SEND_ICON));
    96     mSendButton->setIcon(HbIcon(SEND_ICON));
    91     mSendButton->setEnabled(false);
       
    92     HbFrameDrawer* drawer = new HbFrameDrawer(this);
       
    93     drawer->setFrameType(HbFrameDrawer::NinePieces);
       
    94     mSendButton->setFrameBackground(drawer);
       
    95     updateButtonBackground(SEND_BUTTON_DISABLED);
       
    96     
    97     
    97     mCharCounter = new HbTextItem(this);
    98     mCharCounter = new HbTextItem(this);
    98     HbStyle::setItemName(mCharCounter, "charCounter");
    99     HbStyle::setItemName(mCharCounter, "charCounter");
    99     mCharCounter->setZValue(1.5);
   100     mCharCounter->setZValue(1.5);
   100     
   101     
   282 
   283 
   283 //---------------------------------------------------------------
   284 //---------------------------------------------------------------
   284 // MsgEditor::updateButtonBackground
   285 // MsgEditor::updateButtonBackground
   285 // @see header
   286 // @see header
   286 //---------------------------------------------------------------
   287 //---------------------------------------------------------------
   287 void MsgEditorWidget::updateButtonBackground(const QString& bg)
   288 void MsgEditorWidget::updateButtonBackground(const QString& bg) 
   288     {
   289     { 
   289     HbFrameDrawer* drawer = mSendButton->frameBackground();
   290     HbFrameItem* drawer = static_cast<HbFrameItem*>(mSendButton->backgroundItem()); 
   290     if(drawer)
   291     if(drawer) 
   291         {
   292         { 
   292         drawer->setFrameGraphicsName(bg);        
   293         drawer->frameDrawer().setFrameGraphicsName(bg);   
   293         }
   294         } 
   294     }
   295     } 
       
   296     
   295 
   297 
   296 //---------------------------------------------------------------
   298 //---------------------------------------------------------------
   297 // MsgEditor::onPressed
   299 // MsgEditor::onPressed
   298 // @see header
   300 // @see header
   299 //---------------------------------------------------------------
   301 //---------------------------------------------------------------