diff options
Diffstat (limited to 'hyperui/phoneview.cpp')
-rw-r--r-- | hyperui/phoneview.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/hyperui/phoneview.cpp b/hyperui/phoneview.cpp index 3664949..6a88456 100644 --- a/hyperui/phoneview.cpp +++ b/hyperui/phoneview.cpp @@ -123,6 +123,8 @@ void DialerWidget::addButton(const QString &label, int row, int col, Button *button = new Button(Resource::pixmap(normalPath), Resource::pixmap(pressedPath)); button->setText(label); + button->setFont(Resource::buttonFont()); + connect(button, SIGNAL(clicked()), SLOT(onButtonClicked())); m_layout->addItem(button, row, col); @@ -248,16 +250,16 @@ CallBoard::CallBoard(QGraphicsItem *parent) m_bigNameLabel->setFont(font); m_bigNameLabel->setGeometry(bigNameLabelRect); - Button *dialButton = new Button(Resource::pixmap("dialer_bt_dialer.png")); - dialButton->setParentItem(panelInCall); + Button *dialButton = new Button(Resource::pixmap("dialer_bt_dialer.png"), + panelInCall); dialButton->setPos(dialPos); - Button *muteButton = new Button(Resource::pixmap("dialer_bt_mute.png")); - muteButton->setParentItem(panelInCall); + Button *muteButton = new Button(Resource::pixmap("dialer_bt_mute.png"), + panelInCall); muteButton->setPos(mutePos); - Button *speakerButton = new Button(Resource::pixmap("dialer_bt_speaker.png")); - speakerButton->setParentItem(panelInCall); + Button *speakerButton = new Button(Resource::pixmap("dialer_bt_speaker.png"), + panelInCall); speakerButton->setPos(speakerPos); } @@ -417,25 +419,25 @@ PhoneView::PhoneView(QGraphicsItem *parent) m_display = new DialerDisplay(this); m_display->setPos(displayPos); - m_contactsButton = new Button(Resource::pixmap("dialer_bt_contacts.png")); - m_contactsButton->setParentItem(this); + m_contactsButton = new Button(Resource::pixmap("dialer_bt_contacts.png"), this); m_contactsButton->setPos(contactsButtonPos); + m_contactsButton->setFont(Resource::buttonFont()); m_overlay = new Overlay(this); m_overlay->setBrush(Qt::black); m_overlay->setRect(Resource::value("phone-view/overlay-rect").toRect()); m_callButton = new Button(Resource::pixmap("dialer_bt_call.png"), - Resource::pixmap("dialer_bt_call_over.png")); + Resource::pixmap("dialer_bt_call_over.png"), this); m_callButton->setText(tr("CALL")); - m_callButton->setParentItem(this); m_callButton->setPos(callButtonPos); + m_callButton->setFont(Resource::buttonFont()); m_endCallButton = new Button(Resource::pixmap("dialer_bt_endcall.png"), - Resource::pixmap("dialer_bt_endcall_over.png")); + Resource::pixmap("dialer_bt_endcall_over.png"), this); m_endCallButton->setText(tr("END CALL")); - m_endCallButton->setParentItem(this); m_endCallButton->setPos(callButtonPos); + m_endCallButton->setFont(Resource::buttonFont()); m_board = new CallBoard(this); m_board->setPos(dialerBackPos); |