Commit 81fb5626 authored by Ming Rui Zhang's avatar Ming Rui Zhang

project: remove unused files and change file arrangement

Change-Id: I4831d09585441320055425fbf79350b0b609bbc8
parent 6cc1c1aa
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AnimatedOverlay</class>
<widget class="QWidget" name="AnimatedOverlay">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="backgroundLabel">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
/**************************************************************************
* Copyright (C) 2019-2019 by Savoir-faire Linux *
* Author: Isa Nanic <isa.nanic@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 <https://www.gnu.org/licenses/>. *
**************************************************************************/
#include "avatargraphicsview.h"
AvatarGraphicsView::AvatarGraphicsView(QWidget* parent)
: QGraphicsView(parent)
{
setDragMode(QGraphicsView::ScrollHandDrag);
}
void
AvatarGraphicsView::wheelEvent(QWheelEvent* event)
{
QPoint numSteps = event->angleDelta() / (8*15);
if (!numSteps.isNull()) {
zoomImage(numSteps);
}
event->accept();
}
void
AvatarGraphicsView::zoomImage(const QPoint& steps)
{
steps.y() == 1 ? scale(zoomIncrement_, zoomIncrement_) : scale(1 / zoomIncrement_, 1 / zoomIncrement_);
}
void
AvatarGraphicsView::paintEvent(QPaintEvent* e)
{
QGraphicsView::paintEvent(e);
QPainter painter(viewport());
QPainterPath square;
QPainterPath circle;
square.addRect(0, 0, width(), height());
circle.addEllipse(QPoint(width() / 2 - 0.5, height() / 2 - 0.5), circleSize_ + 1, circleSize_ + 1);
painter.setOpacity(0.3);
painter.fillPath(square.subtracted(circle), QBrush(QColor(Qt::black)));
}
\ No newline at end of file
/**************************************************************************
* Copyright (C) 2019-2019 by Savoir-faire Linux *
* Author: Isa Nanic <isa.nanic@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 <https://www.gnu.org/licenses/>. *
**************************************************************************/
#pragma once
#include <QGraphicsView>
#include <QWheelEvent>
#include <QDragMoveEvent>
class AvatarGraphicsView : public QGraphicsView
{
Q_OBJECT
AvatarGraphicsView(const AvatarGraphicsView& cpy);
public:
AvatarGraphicsView(QWidget* parent = nullptr);
inline void setAvatarSize(int size) { circleSize_ = size; };
private:
void wheelEvent(QWheelEvent* event);
void zoomImage(const QPoint& steps);
void paintEvent(QPaintEvent* e);
const qreal zoomIncrement_ = 1.03;
int circleSize_ = 130;
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -450,7 +450,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="ressources.qrc">:/images/logo-jami-standard-coul.png</pixmap>
<pixmap resource="../ressources.qrc">:/images/logo-jami-standard-coul.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
......@@ -965,7 +965,7 @@ p, li { white-space: pre-wrap; }
<tabstop>creditsButton</tabstop>
</tabstops>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>358</width>
<height>573</height>
<height>587</height>
</rect>
</property>
<property name="windowTitle">
......@@ -558,7 +558,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="ressources.qrc">:/images/jami_eclipse_spinner.gif</pixmap>
<pixmap resource="../ressources.qrc">:/images/jami_eclipse_spinner.gif</pixmap>
</property>
</widget>
</item>
......@@ -628,7 +628,7 @@
</layout>
</widget>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -164,7 +164,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -556,7 +556,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -591,7 +591,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -662,7 +662,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -1835,7 +1835,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_down-24px.svg</normaloff>:/images/icons/round-arrow_drop_down-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -1869,7 +1869,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_up-24px.svg</normaloff>:/images/icons/round-arrow_drop_up-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -1988,7 +1988,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_down-24px.svg</normaloff>:/images/icons/round-arrow_drop_down-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -2022,7 +2022,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_up-24px.svg</normaloff>:/images/icons/round-arrow_drop_up-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -2416,7 +2416,7 @@
<tabstop>videoRTPMaxPortSpinBox</tabstop>
</tabstops>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -125,7 +125,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_person_add_black_24dp_2x.png</normaloff>:/images/icons/ic_person_add_black_24dp_2x.png</iconset>
</property>
<property name="iconSize">
......@@ -155,7 +155,7 @@
</layout>
</widget>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -38,8 +38,6 @@
</item>
</layout>
</widget>
<resources>
<include location="ressources.qrc"/>
</resources>
<resources/>
<connections/>
</ui>
......@@ -809,7 +809,7 @@ Copy and share it with your friends!
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/qrcode.png</normaloff>:/images/qrcode.png</iconset>
</property>
<property name="iconSize">
......@@ -860,7 +860,7 @@ Copy and share it with your friends!
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_share_black_48dp_2x.png</normaloff>:/images/icons/ic_share_black_48dp_2x.png</iconset>
</property>
<property name="iconSize">
......@@ -1412,7 +1412,7 @@ Copy and share it with your friends!
<enum>Qt::LeftToRight</enum>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_close_white_24dp.png</normaloff>:/images/icons/ic_close_white_24dp.png</iconset>
</property>
<property name="iconSize">
......@@ -1646,7 +1646,7 @@ Copy and share it with your friends!
<string>Answer incoming call button</string>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_done_white_24dp.png</normaloff>:/images/icons/ic_done_white_24dp.png</iconset>
</property>
<property name="iconSize">
......@@ -1721,7 +1721,7 @@ Copy and share it with your friends!
<enum>Qt::RightToLeft</enum>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_close_white_24dp.png</normaloff>:/images/icons/ic_close_white_24dp.png</iconset>
</property>
<property name="iconSize">
......@@ -1866,7 +1866,7 @@ Copy and share it with your friends!
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_arrow_back_24px.svg</normaloff>:/images/icons/ic_arrow_back_24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -2017,7 +2017,7 @@ Copy and share it with your friends!
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_phone_24px.svg</normaloff>:/images/icons/ic_phone_24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -2046,7 +2046,7 @@ Copy and share it with your friends!
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_video_call_24px.svg</normaloff>:/images/icons/ic_video_call_24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -2087,7 +2087,7 @@ Copy and share it with your friends!
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_person_add_black_24dp_2x.png</normaloff>:/images/icons/ic_person_add_black_24dp_2x.png</iconset>
</property>
<property name="iconSize">
......@@ -2256,7 +2256,7 @@ Copy and share it with your friends!
<tabstop>shareButton</tabstop>
</tabstops>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -44,7 +44,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="ressources.qrc">:/images/icons/baseline-desktop_windows-24px.svg</pixmap>
<pixmap resource="../ressources.qrc">:/images/icons/baseline-desktop_windows-24px.svg</pixmap>
</property>
</widget>
</item>
......@@ -166,7 +166,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/round-save_alt-24px.svg</normaloff>:/images/icons/round-save_alt-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -200,7 +200,7 @@
<tabstop>btnEditDevice</tabstop>
</tabstops>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -86,7 +86,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_person_add_black_24dp_2x.png</normaloff>:/images/icons/ic_person_add_black_24dp_2x.png</iconset>
</property>
<property name="iconSize">
......@@ -134,7 +134,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_clear_24px.svg</normaloff>:/images/icons/ic_clear_24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -182,7 +182,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/ic_block_24px.svg</normaloff>:/images/icons/ic_block_24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -214,7 +214,7 @@
</layout>
</widget>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -165,7 +165,7 @@ MainWindow::MainWindow(QWidget* parent)
QTimer *timer = new QTimer(this);
connect(timer, &QTimer::timeout,
[this]() {
QString fileName = "stylesheet.css";
QString fileName = ":/stylesheet.css";
QDir filePath = QDir(QCoreApplication::applicationDirPath());
filePath.cdUp();
filePath.cdUp();
......@@ -412,4 +412,4 @@ void MainWindow::slotAccountListChanged()
emit currentWidget->NavigationRequested(ScreenEnum::WizardScreen);
}
}
}
\ No newline at end of file
}
......@@ -435,7 +435,7 @@
<string>Jami</string>
</property>
<property name="windowIcon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/jami.png</normaloff>:/images/jami.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
......@@ -499,7 +499,7 @@
</customwidget>
</customwidgets>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
......@@ -1914,7 +1914,7 @@ instead of using your ID.</string>
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
<iconset resource="../ressources.qrc">
<normaloff>:/images/icons/info-24px.svg</normaloff>:/images/icons/info-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -2679,7 +2679,7 @@ instead of using your ID.</string>
<string/>
</property>
<property name="pixmap">
<pixmap resource="ressources.qrc">:/images/jami_eclipse_spinner.gif</pixmap>
<pixmap resource="../ressources.qrc">:/images/jami_eclipse_spinner.gif</pixmap>
</property>
</widget>
</item>
......@@ -2918,7 +2918,7 @@ instead of using your ID.</string>
<tabstop>nextButton</tabstop>
</tabstops>
<resources>
<include location="ressources.qrc"/>
<include location="../ressources.qrc"/>
</resources>
<connections/>
</ui>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.