Commit 74fe46f8 authored by Nicolas Jager's avatar Nicolas Jager

ui : improve configuration menu and contactView

- new icon for settings menu in mainwindow.
- adds animations between navwidgets.
- improves look of contactView.
- improves look of quality dialog.
- removes code for bars not used anymore.
- removes some qdebug left.
- fixes paths icons.

Tuleap: #148
Change-Id: I9f04e9c8d13c2064bfc006d95d2dd1c166160092
parent 3ba22ca2
......@@ -39,7 +39,6 @@ SOURCES += main.cpp\
callwidget.cpp \
configurationwidget.cpp \
navstack.cpp \
navbar.cpp \
navwidget.cpp \
accountdetails.cpp \
aboutdialog.cpp \
......@@ -64,7 +63,6 @@ SOURCES += main.cpp\
combar.cpp \
idlabel.cpp \
smartlist.cpp \
mainwindowtoolbar.cpp \
ringcontactlineedit.cpp \
pixbufmanipulator.cpp \
qualitydialog.cpp
......@@ -73,7 +71,6 @@ HEADERS += mainwindow.h \
callwidget.h \
configurationwidget.h \
navstack.h \
navbar.h \
navwidget.h \
accountdetails.h \
aboutdialog.h \
......@@ -99,7 +96,6 @@ HEADERS += mainwindow.h \
combar.h \
idlabel.h \
smartlist.h \
mainwindowtoolbar.h \
ringcontactlineedit.h \
pixbufmanipulator.h \
qualitydialog.h \
......@@ -113,7 +109,6 @@ contains(DEFINES, URI_PROTOCOL) {
FORMS += mainwindow.ui \
callwidget.ui \
configurationwidget.ui \
navbar.ui \
accountdetails.ui \
aboutdialog.ui \
wizarddialog.ui \
......
/***************************************************************************
* 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 *
......@@ -40,15 +40,6 @@ AccountDetails::AccountDetails(QWidget *parent) :
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
ui->audioCodecView->setShowGrid(false);
ui->audioCodecView->verticalHeader()->hide();
ui->audioCodecView->horizontalHeader()->hide();
ui->videoCodecView->setShowGrid(false);
ui->videoCodecView->verticalHeader()->hide();
ui->videoCodecView->horizontalHeader()->hide();
ui->lrcfg_username->setAlignment(Qt::AlignCenter);
connect(ui->lrcfg_tlsCaListCertificate, SIGNAL(clicked(bool)), this, SLOT(onCertButtonClicked()));
connect(ui->lrcfg_tlsCertificate, SIGNAL(clicked(bool)), this, SLOT(onCertButtonClicked()));
connect(ui->lrcfg_tlsPrivateKeyCertificate, SIGNAL(clicked(bool)), this, SLOT(onCertButtonClicked()));
......@@ -251,3 +242,10 @@ AccountDetails::stopRingtone() {
if (RingtoneModel::instance().isPlaying())
RingtoneModel::instance().play(idx);
}
QPushButton*
AccountDetails::getDeleteAccountButton()
{
return ui->deleteAccountButton;
}
......@@ -27,6 +27,8 @@
#include "audio/codecmodel.h"
#include "account.h"
class QPushButton;
namespace Ui {
class AccountDetails;
}
......@@ -39,6 +41,7 @@ public:
explicit AccountDetails(QWidget* parent = 0);
~AccountDetails();
QPushButton* getDeleteAccountButton();
void setAccount(Account* currentAccount);
void save();
......
This diff is collapsed.
......@@ -21,39 +21,55 @@
#include "accountmodel.h"
#include "account.h"
AccountStateDelegate::AccountStateDelegate(QObject *parent) :
AccountStateDelegate::AccountStateDelegate(QObject* parent) :
QStyledItemDelegate(parent)
{}
void
AccountStateDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
AccountStateDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
painter->setRenderHint(QPainter::Antialiasing);
QStyleOptionViewItemV4 opt = option;
initStyleOption(&opt, index);
if (index.column() == 0) {
// name & checkbox
auto name = index.model()->data(index, Qt::DisplayRole).toString();
opt.text = QString();
QStyle *style = opt.widget ? opt.widget->style() : QApplication::style();
QStyle* style = opt.widget ? opt.widget->style() : QApplication::style();
style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, opt.widget);
auto rect = opt.rect;
QPalette::ColorGroup cg = opt.state & QStyle::State_Enabled ?
QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(opt.state & QStyle::State_Active))
cg = QPalette::Inactive;
auto font = painter->font() ;
font.setBold(true);
auto font = painter->font();
font.setPointSize(12);
painter->setFont(font);
painter->setPen(AccountModel::instance().
getAccountByModelIndex(index)->stateColorName());
painter->setOpacity(1.0);
painter->drawText(QRect(rect.left()+25, rect.top(),
opt.displayAlignment = Qt::AlignTop;
painter->setPen(Qt::black);
painter->drawText(QRect(rect.left() + 25, rect.top(),
rect.width(), rect.height()),
opt.displayAlignment, name);
// status
auto account = AccountModel::instance().getAccountByModelIndex(index);
QString stateColor(account->stateColorName());
QString accountStatus = account->toHumanStateName();
painter->setPen(stateColor);
opt.displayAlignment = Qt::AlignBottom|Qt::AlignLeft;
painter->drawText(QRect(rect.left() + 25, rect.top(),
rect.width(), rect.height()),
opt.displayAlignment, accountStatus);
}
}
QSize
AccountStateDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
AccountStateDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
{
QSize result = QStyledItemDelegate::sizeHint(option, index);
return result;
......
......@@ -15,16 +15,16 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>0</number>
<number>4</number>
</property>
<property name="bottomMargin">
<number>1</number>
<number>4</number>
</property>
<item>
<widget class="QListView" name="contactView"/>
......
......@@ -53,7 +53,7 @@
#include "pixbufmanipulator.h"
CallWidget::CallWidget(QWidget* parent) :
NavWidget(END ,parent),
NavWidget(parent),
ui(new Ui::CallWidget),
menu_(new QMenu()),
imDelegate_(new ImDelegate())
......@@ -65,6 +65,8 @@ CallWidget::CallWidget(QWidget* parent) :
setActualCall(nullptr);
videoRenderer_ = nullptr;
connect(ui->settingsButton, &QPushButton::clicked, this, &CallWidget::settingsButtonClicked);
connect(ui->videoWidget, SIGNAL(setChatVisibility(bool)),
ui->instantMessagingWidget, SLOT(setVisible(bool)));
......@@ -154,7 +156,7 @@ CallWidget::CallWidget(QWidget* parent) :
setupOutOfCallIM();
setupSmartListMenu();
connect(ui->smartList, &SmartList::btnVideoClicked, this, &CallWidget::on_btnComBarVideo_clicked);
connect(ui->smartList, &SmartList::btnVideoClicked, this, &CallWidget::btnComBarVideoClicked);
connect(RecentModel::instance().selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
......@@ -558,20 +560,20 @@ CallWidget::placeCall()
}
void
CallWidget::settingsButton_clicked()
CallWidget::settingsButtonClicked()
{
ui->smartList->reset();
emit NavigationRequested(ScreenEnum::ConfScreen);
}
void
CallWidget::contactButton_clicked(bool checked)
CallWidget::contactButtonClicked(bool checked)
{
ui->mainTabMenu->setCurrentIndex(checked ? 1 : 0);
}
void
CallWidget::historicButton_clicked(bool checked)
CallWidget::historicButtonClicked(bool checked)
{
ui->mainTabMenu->setCurrentIndex(checked ? 2 : 0);
}
......@@ -596,7 +598,7 @@ CallWidget::on_btnCall_clicked()
}
void
CallWidget::on_btnComBarVideo_clicked()
CallWidget::btnComBarVideoClicked()
{
if (not highLightedIndex_.isValid())
return;
......
......@@ -55,15 +55,16 @@ public:
void atExit();
public slots:
void contactButton_clicked(bool checked);
void settingsButton_clicked();
void historicButton_clicked(bool checked);
void contactButtonClicked(bool checked);
void settingsButtonClicked();
void historicButtonClicked(bool checked);
void showIMOutOfCall(const QModelIndex& nodeIdx);
void btnComBarVideoClicked();
//UI SLOTS
public slots:
void on_ringContactLineEdit_returnPressed();
void on_btnCall_clicked();
void on_btnComBarVideo_clicked();
void showIMOutOfCall(const QModelIndex& nodeIdx);
inline void on_entered(const QModelIndex& i){highLightedIndex_ = i;};
//UI SLOTS
......
......@@ -508,6 +508,70 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>7</number>
</property>
<property name="rightMargin">
<number>7</number>
</property>
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="settingsButton">
<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="toolTip">
<string>settings menu</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/ic_settings_white_48dp_2x.png</normaloff>:/images/icons/ic_settings_white_48dp_2x.png</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
......@@ -529,15 +593,30 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>200</height>
<height>100</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
......@@ -699,7 +778,7 @@
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<normaloff>:/images/ic_share_white.png</normaloff>:/images/ic_share_white.png</iconset>
<normaloff>:/images/icons/ic_share_white_24dp_2x.png</normaloff>:/images/icons/ic_share_white_24dp_2x.png</iconset>
</property>
<property name="iconSize">
<size>
......@@ -811,6 +890,9 @@
<height>30</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="text">
<string/>
</property>
......
......@@ -23,6 +23,7 @@
#include <QDir>
#include <QStandardPaths>
#include <QFileDialog>
#include <QPropertyAnimation>
#include "video/devicemodel.h"
#include "video/channel.h"
......@@ -49,7 +50,7 @@
#endif
ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
NavWidget(Nav, parent),
NavWidget(parent),
ui(new Ui::ConfigurationWidget),
accountModel_(&AccountModel::instance()),
deviceModel_(&Video::DeviceModel::instance()),
......@@ -57,6 +58,26 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
{
ui->setupUi(this);
connect(ui->exitSettingsButton, &QPushButton::clicked, this, [=]() {
if (CallModel::instance().getActiveCalls().size() == 0
&& Video::PreviewManager::instance().isPreviewing()) {
Video::PreviewManager::instance().stopPreview();
}
accountModel_->save();
accountDetails_->save();
});
connect(accountDetails_->getDeleteAccountButton(), &QPushButton::clicked, this, [=]() {
auto account = accountModel_->getAccountByModelIndex(
ui->accountView->currentIndex());
if (account != accountModel_->ip2ip())
accountModel_->remove(account);
});
connect(ui->exitSettingsButton, &QPushButton::clicked, this, [=]() {
emit NavigationRequested(ScreenEnum::CallScreen);
});
ui->accountView->setModel(accountModel_);
accountStateDelegate_ = new AccountStateDelegate();
ui->accountView->setItemDelegate(accountStateDelegate_);
......@@ -79,7 +100,7 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
CategorizedHistoryModel::instance().historyLimit());
ui->closeOrMinCheckBox->setChecked(settings_.value(
SettingsKey::closeOrMinimized).toBool());
connect(ui->tabWidget, &QTabWidget::currentChanged, [](int index) {
connect(ui->stackedWidget, &QStackedWidget::currentChanged, [](int index) {
if (index == 1
&& CallModel::instance().getActiveCalls().size() == 0) {
Video::PreviewManager::instance().startPreview();
......@@ -105,6 +126,32 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
Media::RecordingModel::instance().setAlwaysRecording(checked);
});
connect(ui->generalTabButton, &QPushButton::toggled, [=] (bool toggled) {
if (toggled) {
ui->stackedWidget->setCurrentWidget(ui->generalPage);
ui->videoTabButton->setChecked(false);
ui->accountTabButton->setChecked(false);
}
});
connect(ui->videoTabButton, &QPushButton::toggled, [=] (bool toggled) {
if (toggled) {
ui->stackedWidget->setCurrentWidget(ui->videoPage);
ui->accountTabButton->setChecked(false);
ui->generalTabButton->setChecked(false);
}
});
connect(ui->accountTabButton, &QPushButton::toggled, [=] (bool toggled) {
if (toggled) {
ui->stackedWidget->setCurrentWidget(ui->accountPage);
ui->videoTabButton->setChecked(false);
ui->generalTabButton->setChecked(false);
}
});
ui->generalTabButton->setChecked(true);
#ifndef ENABLE_AUTOUPDATE
ui->checkUpdateButton->hide();
ui->intervalUpdateCheckSpinBox->hide();
......@@ -115,7 +162,7 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
void ConfigurationWidget::showPreview()
{
if (ui->tabWidget->currentIndex() == 1
if (ui->stackedWidget->currentIndex() == 1
&& CallModel::instance().getActiveCalls().size() == 0) {
ui->previewUnavailable->hide();
ui->videoView->show();
......@@ -139,16 +186,6 @@ ConfigurationWidget::showEvent(QShowEvent *event) {
showPreview();
}
void
ConfigurationWidget::atExit() {
if (CallModel::instance().getActiveCalls().size() == 0
&& Video::PreviewManager::instance().isPreviewing()) {
Video::PreviewManager::instance().stopPreview();
}
accountModel_->save();
accountDetails_->save();
}
ConfigurationWidget::~ConfigurationWidget()
{
delete ui;
......@@ -206,15 +243,6 @@ ConfigurationWidget::accountSelected(QItemSelection itemSel) {
AccountSerializationAdapter adapter(account, accountDetails_);
}
void
ConfigurationWidget::on_deleteAccountButton_clicked()
{
auto account = accountModel_->getAccountByModelIndex(
ui->accountView->currentIndex());
if (account != accountModel_->ip2ip())
accountModel_->remove(account);
}
void
ConfigurationWidget::on_addAccountButton_clicked()
{
......@@ -285,7 +313,7 @@ ConfigurationWidget::on_intervalUpdateCheckSpinBox_valueChanged(int arg1)
}
void
ConfigurationWidget::on_tabWidget_currentChanged(int index)
ConfigurationWidget::on_stackedWidget_currentChanged(int index)
{
Q_UNUSED(index)
showPreview();
......
/***************************************************************************
* 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 *
......@@ -41,7 +41,6 @@ class ConfigurationWidget : public NavWidget
public:
explicit ConfigurationWidget(QWidget *parent = 0);
~ConfigurationWidget();
void atExit();
protected:
void showEvent(QShowEvent *event);
......@@ -50,7 +49,6 @@ protected:
private slots:
void on_deviceBox_currentIndexChanged(int index);
void on_sizeBox_currentIndexChanged(int index);
void on_deleteAccountButton_clicked();
void on_addAccountButton_clicked();
void on_startupBox_toggled(bool checked);
void on_clearHistoryButton_clicked();
......@@ -59,7 +57,7 @@ private slots:
void on_checkUpdateButton_clicked();
void on_autoUpdateCheckBox_toggled(bool checked);
void on_intervalUpdateCheckSpinBox_valueChanged(int arg1);
void on_tabWidget_currentChanged(int index);
void on_stackedWidget_currentChanged(int index);
void on_recordPath_clicked();
private slots:
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
<path fill="#00BFD3" d="M30,15c0,8.284-6.716,15-15,15l0,0C6.716,30,0,23.284,0,15l0,0C0,6.716,6.716,0,15,0l0,0
C23.284,0,30,6.716,30,15L30,15z"/>
<g>
<path fill="#FFFFFF" d="M19.715,14.357v1.286c0,0.179-0.062,0.33-0.188,0.455c-0.125,0.125-0.277,0.188-0.457,0.188h-2.785v2.787
c0,0.178-0.062,0.33-0.188,0.455c-0.125,0.125-0.277,0.188-0.455,0.188h-1.286c-0.179,0-0.33-0.062-0.455-0.188
s-0.188-0.277-0.188-0.455v-2.787h-2.785c-0.179,0-0.331-0.062-0.456-0.188c-0.125-0.125-0.188-0.276-0.188-0.455v-1.286
c0-0.179,0.062-0.33,0.188-0.455s0.277-0.188,0.456-0.188h2.785v-2.786c0-0.179,0.062-0.33,0.188-0.455s0.276-0.188,0.455-0.188
h1.286c0.178,0,0.33,0.062,0.455,0.188c0.125,0.125,0.188,0.276,0.188,0.455v2.786h2.785c0.18,0,0.332,0.062,0.457,0.188
S19.715,14.178,19.715,14.357z"/>
</g>
</svg>
<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="M18.5 6C15.46 6 13 8.46 13 11.5c0 1.33.47 2.55 1.26 3.5H9.74c.79-.95 1.26-2.17 1.26-3.5C11 8.46 8.54 6 5.5 6S0 8.46 0 11.5 2.46 17 5.5 17h13c3.04 0 5.5-2.46 5.5-5.5S21.54 6 18.5 6zm-13 9C3.57 15 2 13.43 2 11.5S3.57 8 5.5 8 9 9.57 9 11.5 7.43 15 5.5 15zm13 0c-1.93 0-3.5-1.57-3.5-3.5S16.57 8 18.5 8 22 9.57 22 11.5 20.43 15 18.5 15z"/>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="36px" height="36px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve">
<path opacity="0.6" d="M36,18c0,9.941-8.059,18-18,18l0,0C8.059,36,0,27.941,0,18l0,0C0,8.059,8.059,0,18,0l0,0
C27.941,0,36,8.059,36,18L36,18z"/>
<g>
<path fill="#FFFFFF" d="M25.703,16.907v2.227c0,0.08-0.026,0.156-0.08,0.231c-0.055,0.073-0.121,0.115-0.201,0.128l-1.856,0.283
c-0.126,0.359-0.257,0.664-0.39,0.913c0.233,0.334,0.591,0.794,1.071,1.383c0.068,0.08,0.102,0.164,0.102,0.249
c0,0.088-0.03,0.166-0.091,0.233c-0.18,0.246-0.511,0.607-0.993,1.082c-0.48,0.476-0.795,0.712-0.943,0.712
c-0.078,0-0.165-0.03-0.26-0.091l-1.383-1.082c-0.296,0.153-0.6,0.281-0.915,0.381c-0.104,0.909-0.203,1.531-0.29,1.865
c-0.047,0.188-0.166,0.281-0.361,0.281h-2.226c-0.093,0-0.174-0.028-0.246-0.086c-0.07-0.057-0.108-0.129-0.115-0.215l-0.281-1.846
c-0.327-0.106-0.629-0.231-0.902-0.37l-1.414,1.071c-0.067,0.061-0.15,0.091-0.251,0.091c-0.094,0-0.177-0.037-0.251-0.11
c-0.842-0.762-1.394-1.322-1.654-1.684c-0.047-0.067-0.07-0.146-0.07-0.233c0-0.078,0.027-0.155,0.08-0.229
c0.101-0.139,0.271-0.363,0.511-0.667c0.241-0.305,0.422-0.54,0.542-0.705c-0.181-0.335-0.317-0.666-0.41-0.993l-1.836-0.271
c-0.087-0.015-0.158-0.057-0.211-0.127s-0.08-0.149-0.08-0.234v-2.229c0-0.08,0.027-0.157,0.08-0.23
c0.053-0.074,0.118-0.117,0.19-0.131l1.866-0.281c0.093-0.308,0.223-0.615,0.391-0.923c-0.267-0.38-0.625-0.842-1.073-1.384
c-0.067-0.08-0.101-0.16-0.101-0.241c0-0.066,0.03-0.143,0.091-0.23c0.174-0.241,0.503-0.6,0.988-1.079
c0.485-0.478,0.801-0.717,0.948-0.717c0.087,0,0.174,0.034,0.261,0.1l1.384,1.073c0.294-0.154,0.598-0.28,0.913-0.381
c0.107-0.909,0.204-1.531,0.291-1.865c0.046-0.187,0.167-0.281,0.36-0.281h2.226c0.095,0,0.177,0.028,0.247,0.085
c0.069,0.057,0.107,0.129,0.114,0.216l0.281,1.845c0.327,0.107,0.628,0.231,0.904,0.372l1.422-1.073
c0.061-0.06,0.143-0.09,0.24-0.09c0.088,0,0.173,0.034,0.253,0.1c0.861,0.796,1.413,1.365,1.653,1.705
c0.047,0.054,0.071,0.127,0.071,0.22c0,0.081-0.027,0.158-0.082,0.231c-0.098,0.141-0.271,0.363-0.511,0.667
s-0.422,0.54-0.541,0.707c0.174,0.334,0.312,0.662,0.411,0.982l1.837,0.281c0.085,0.013,0.155,0.055,0.21,0.125
C25.677,16.742,25.703,16.82,25.703,16.907z M19.815,19.815c0.502-0.502,0.753-1.106,0.753-1.815s-0.251-1.314-0.753-1.815
c-0.502-0.502-1.106-0.752-1.816-0.752c-0.708,0-1.313,0.25-1.814,0.752c-0.502,0.501-0.752,1.106-0.752,1.815
s0.25,1.313,0.752,1.815c0.501,0.502,1.106,0.753,1.814,0.753C18.709,20.568,19.313,20.317,19.815,19.815z"/>
</g>
</svg>
<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="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.5V15H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v4zm-3.5-.5h2v-3h-2v3z"/>
</svg>
\ No newline at end of file
/***************************************************************************
* 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 *
......@@ -31,7 +31,6 @@
#endif
#include "aboutdialog.h"
#include "mainwindowtoolbar.h"
#include "settingskey.h"
#ifdef ENABLE_AUTOUPDATE
......@@ -42,8 +41,7 @@
MainWindow::MainWindow(QWidget* parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
mwToolBar_(new MainWindowToolBar)
ui(new Ui::MainWindow)
{
ui->setupUi(this);
......@@ -68,7 +66,7 @@ MainWindow::MainWindow(QWidget* parent) :
connect(&CallModel::instance(), SIGNAL(incomingCall(Call*)),
this, SLOT(onIncomingCall(Call*)));
navStack_ = new NavStack(ui->bar, ui->stackedWidgetView, this);
navStack_ = new NavStack(ui->stackedWidgetView, this);
connect(configAction, &QAction::triggered, [this]() {
navStack_->onNavigationRequested(ScreenEnum::ConfScreen);
});
......@@ -84,17 +82,6 @@ MainWindow::MainWindow(QWidget* parent) :
resize(1054, 600);
addToolBar(static_cast<QToolBar*>(mwToolBar_));
auto callWidget = static_cast<CallWidget*>(navStack_->getNavWidget(ScreenEnum::CallScreen));
connect(mwToolBar_->getSettingsButton(), &QAction::triggered,
callWidget, &CallWidget::settingsButton_clicked);
connect(mwToolBar_->getHistoryButton(), &QAction::triggered,
callWidget, &CallWidget::historicButton_clicked);
connect(mwToolBar_->getContactListButton(), &QAction::triggered,
callWidget, &CallWidget::contactButton_clicked);
#ifdef ENABLE_AUTOUPDATE
win_sparkle_set_appcast_url("http://gpl.savoirfairelinux.net/ring-download/windows/winsparkle-ring.xml");
win_sparkle_set_app_details(L"Savoir-faire Linux", L"Ring", QString(NIGHTLY_VERSION).toStdWString().c_str());
......
......@@ -27,9 +27,6 @@
static constexpr char IDM_ABOUTBOX = 0x0010;
class WindowBarUpOne;
class MainWindowToolBar;
namespace Ui {
class MainWindow;
}
......@@ -62,6 +59,4 @@ private: