Commit 7cf39e2d authored by Edric Milaret's avatar Edric Milaret

im: add a copy button to cm combobox

Change-Id: Id5b023beef399403d92056bc83a21db0df7a3838
Tuleap: #321
parent 7ef617b7
......@@ -698,3 +698,10 @@ CallWidget::slideToRight(QPropertyAnimation* anim, QWidget* widget)
anim->setEasingCurve(QEasingCurve::OutQuad);
anim->start();
}
void
CallWidget::on_copyCMButton_clicked()
{
auto text = ui->contactMethodComboBox->currentText();
QApplication::clipboard()->setText(text);
}
......@@ -79,6 +79,7 @@ private slots:
void on_contactMethodComboBox_currentIndexChanged(const QString& number);
void on_ringContactLineEdit_textChanged(const QString& text);
void on_imBackButton_clicked();
void on_copyCMButton_clicked();
private slots:
void callIncoming(Call* call);
......
......@@ -773,6 +773,35 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="copyCMButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<normaloff>:/images/ic_content_copy_white.svg</normaloff>:/images/ic_content_copy_white.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
......
<svg fill="#FFFFFF" height="48" viewBox="0 0 24 24" width="48" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>
</svg>
\ No newline at end of file
......@@ -45,5 +45,6 @@
<file>images/video-conf/ic_high_quality_white.svg</file>
<file>images/ic_send_white.svg</file>
<file>images/ic_pause_white.svg</file>
<file>images/ic_content_copy_white.svg</file>
</qresource>
</RCC>
......@@ -126,17 +126,18 @@ QPushButton#hangupButton:pressed{
background-color: rgba(255, 0, 0, 0.8);
}
QPushButton#imBackButton, QPushButton#addToContactButton{
QPushButton#addToContactButton, QPushButton#imBackButton, QPushButton#copyCMButton{
background-color: #414141;
border-radius: 15px;
border:solid 1px;
}
QPushButton#imBackButton:hover{
QPushButton#imBackButton:hover, QPushButton#copyCMButton:hover{
background-color: #515151;
}
QPushButton#imBackButton:pressed{
QPushButton#imBackButton:pressed, QPushButton#copyCMButton:pressed{
background-color: #313131;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment