Commit 47aa97f9 authored by Olivier SOLDANO's avatar Olivier SOLDANO Committed by Anthony Léonard

minor code style and css corrections

Changes the name of a button to fit in with the naming style
and the ui representing it.
Also corrected indentations problems and authors list.

Change-Id: I307a9a38775760cabc95ea73f62c998823ec15d5
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent 9657fd1f
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
......@@ -103,9 +105,6 @@ CallWidget::CallWidget(QWidget* parent) :
RecentModel::instance().peopleProxy()->setFilterCaseSensitivity(Qt::CaseInsensitive);
ui->smartList->setModel(RecentModel::instance().peopleProxy());
smartListDelegate_ = new SmartListDelegate();
ui->smartList->setSmartListItemDelegate(smartListDelegate_);
PersonModel::instance().addCollection<PeerProfileCollection>(LoadOptions::FORCE_ENABLED);
ProfileModel::instance().addCollection<LocalProfileCollection>(LoadOptions::FORCE_ENABLED);
......@@ -145,8 +144,7 @@ CallWidget::CallWidget(QWidget* parent) :
connect(&AccountModel::instance(), SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)),
ui->currentAccountWidget, SLOT(update()));
connect(&ProfileModel::instance(), SIGNAL(ProfileModel::dataChanged(const QModelIndex&,const QModelIndex&, const QVector<int>&)),
ui->currentAccountWidget, SLOT(update()));
connect(ui->searchBtn, SIGNAL(clicked(bool)), this, SLOT(searchBtnClicked()));
connect(ui->sendContactRequestWidget, &SendContactRequestWidget::sendCRclicked, [=]{slidePage(ui->messagingPage);});
......@@ -574,10 +572,19 @@ CallWidget::smartListCurrentChanged(const QModelIndex &currentIdx, const QModelI
void
CallWidget::configureSendCRPageButton(const QModelIndex& currentIdx)
{
auto cmVector = RecentModel::instance().getContactMethods(currentIdx);
URI cmUri = cmVector[0]->uri();
if (cmUri.protocolHint() == URI::ProtocolHint::RING || uriNeedNameLookup(cmUri)) {
ui->sendContactRequestPageButton->show();
if (currentIdx.isValid()){
QVector<ContactMethod*> cmVector = RecentModel::instance().getContactMethods(currentIdx);
if (cmVector.size() == 0){
ui->sendContactRequestPageButton->hide();
return;
}
URI cmUri = cmVector[0]->uri();
if (cmUri.protocolHint() == URI::ProtocolHint::RING || uriNeedNameLookup(cmUri)) {
ui->sendContactRequestPageButton->show();
} else {
ui->sendContactRequestPageButton->hide();
}
} else {
ui->sendContactRequestPageButton->hide();
}
......@@ -639,7 +646,7 @@ CallWidget::uriNeedNameLookup(const URI uri_passed)
}
void
CallWidget::on_ringContactLineEdit_returnPressed()
CallWidget::processContactLineEdit()
{
auto contactLineText = ui->ringContactLineEdit->text();
URI uri_passed = URI(contactLineText);
......@@ -654,9 +661,15 @@ CallWidget::on_ringContactLineEdit_returnPressed()
}
void
CallWidget::on_btnCall_clicked()
CallWidget::on_ringContactLineEdit_returnPressed()
{
processContactLineEdit();
}
void
CallWidget::searchBtnClicked()
{
placeCall();
processContactLineEdit();
}
void
......@@ -852,7 +865,8 @@ CallWidget::on_sendContactRequestPageButton_clicked()
slidePage(ui->sendContactRequestPage);*/
}
void CallWidget::on_sendCRBackButton_clicked()
void
CallWidget::on_sendCRBackButton_clicked()
{
slidePage(ui->messagingPage);
}
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
/**************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#pragma once
......@@ -62,10 +64,8 @@ public slots:
//UI SLOTS
public slots:
void on_ringContactLineEdit_returnPressed();
void on_btnCall_clicked();
inline void on_entered(const QModelIndex& i){highLightedIndex_ = i;};
inline void on_entered(const QModelIndex& i){highLightedIndex_ = i;}
//UI SLOTS
private slots:
void on_acceptButton_clicked();
void on_refuseButton_clicked();
......@@ -91,7 +91,8 @@ private slots:
void slotAccountMessageReceived(const QMap<QString,QString> message,ContactMethod* cm,Media::Media::Direction dir);
void onIncomingMessage(::Media::TextRecording* t, ContactMethod* cm);
void callChangedSlot();
void contactLineEdit_registeredNameFound(Account *account, NameDirectory::LookupStatus status, const QString& address, const QString& name);
void contactLineEdit_registeredNameFound(Account *account, NameDirectory::LookupStatus status, const QString& address, const QString& name);
void searchBtnClicked();
private:
Ui::CallWidget* ui;
......@@ -124,5 +125,6 @@ private:
void setupQRCode(QString ringID);
void searchContactLineEditEntry(const URI &uri);
bool uriNeedNameLookup(const URI uri_passed);
void processContactLineEdit();
};
......@@ -234,19 +234,13 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="btnCall">
<widget class="QPushButton" name="searchBtn">
<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>
......@@ -254,30 +248,8 @@
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/ic_search_black_18dp_2x.png</normaloff>:/images/icons/ic_search_black_18dp_2x.png</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>45</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
/**************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#pragma once
......
/**************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#ifndef CURRENTACCOUNTWIDGET_H
#define CURRENTACCOUNTWIDGET_H
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2016 by Savoir-faire Linux *
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#include <QDebug>
#include "sendcontactrequestwidget.h"
......
/**************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#ifndef SENDCONTACTREQUESTWIDGET_H
#define SENDCONTACTREQUESTWIDGET_H
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
......
......@@ -10,11 +10,11 @@ QPushButton#refuseButton, QPushButton#cancelButton{
border:solid 1px;
}
QPushButton#btnCall:hover, QPushButton#acceptButton:hover{
QPushButton#searchBtn:hover, QPushButton#acceptButton:hover{
background-color: #5db761;
}
QPushButton#btnCall:pressed, QPushButton#acceptButton:pressed{
QPushButton#searchBtn:pressed, QPushButton#acceptButton:pressed{
background-color: #449d48;
}
......@@ -228,19 +228,19 @@ QPushButton#btnvideo{
border:solid 1px;
}
QPushButton#btnCall, QPushButton#btnComBarVideo,
QPushButton#searchBtn, QPushButton#btnComBarVideo,
QPushButton#sendButton, QPushButton#sendIMButton{
background-color: #3AC0D2;
border-radius: 15px;
border:solid 1px;
}
QPushButton#btnCall:hover, QPushButton#sendButton:hover,
QPushButton#searchBtn:hover, QPushButton#sendButton:hover,
QPushButton#sendIMButton:hover, QPushButton#btnComBarVideo:hover{
background-color: #4dc6d6;
}
QPushButton#btnCall:pressed, QPushButton#sendButton:pressed,
QPushButton#searchBtn:pressed, QPushButton#sendButton:pressed,
QPushButton#sendIMButton:pressed, QPushButton#btnComBarVideo:pressed{
background-color: #34acbd;
}
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
/**************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
......
/***************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
/**************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#pragma once
......
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