Meeting List rework, Better fonts, ui fixes

This commit is contained in:
Julien Wadel 2024-04-15 11:21:12 +02:00
parent 8eb0e5cff9
commit a031282032
106 changed files with 558 additions and 172 deletions

View file

@ -79,21 +79,34 @@ add_subdirectory(model)
add_subdirectory(view) add_subdirectory(view)
add_subdirectory(core) add_subdirectory(core)
#fonts.qrc is in data and not in data/font because we want to use 'font' in path and not in prefix.
#TODO make prefix working
set(_LINPHONEAPP_FONTS_FILES)
qt6_add_big_resources(_LINPHONEAPP_FONTS_FILES data/fonts.qrc)
# Have big_resource.qrc treated as a source file by Qt Creator
list(APPEND _LINPHONEAPP_FONTS_FILES data/fonts.qrc)
set_property(SOURCE data/fonts.qrc PROPERTY SKIP_AUTORCC ON)
qt6_add_executable(Linphone qt6_add_executable(Linphone
${_LINPHONEAPP_SOURCES} ${_LINPHONEAPP_SOURCES}
${_LINPHONEAPP_FONTS_FILES}
) )
set_source_files_properties(${_LINPHONEAPP_QML_SINGLETONS} PROPERTIES QT_QML_SINGLETON_TYPE TRUE) set_source_files_properties(${_LINPHONEAPP_QML_SINGLETONS} PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
qt6_add_qml_module(Linphone qt6_add_qml_module(Linphone
URI Linphone URI Linphone
RESOURCE_PREFIX "" RESOURCE_PREFIX ""
VERSION 1.0 VERSION 1.0
QML_FILES ${_LINPHONEAPP_QML_FILES} ${_LINPHONEAPP_QML_SINGLETONS} QML_FILES ${_LINPHONEAPP_QML_FILES} ${_LINPHONEAPP_QML_SINGLETONS}
RESOURCES data/fonts.qrc
) )
qt6_add_resources(Linphone "resources" PREFIX "/" FILES ${_LINPHONEAPP_RC_FILES}) qt6_add_resources(Linphone "resources" PREFIX "/" FILES ${_LINPHONEAPP_RC_FILES})
################################################################ ################################################################
# TARGETS LINKS # TARGETS LINKS
################################################################ ################################################################

View file

@ -23,7 +23,9 @@
#include "App.hpp" #include "App.hpp"
#include <QCoreApplication> #include <QCoreApplication>
#include <QDirIterator>
#include <QFileSelector> #include <QFileSelector>
#include <QFontDatabase>
#include <QGuiApplication> #include <QGuiApplication>
#include <QLibraryInfo> #include <QLibraryInfo>
#include <QQmlComponent> #include <QQmlComponent>
@ -77,6 +79,14 @@ App::App(int &argc, char *argv[])
auto ignoreVSync = QSurfaceFormat::defaultFormat(); auto ignoreVSync = QSurfaceFormat::defaultFormat();
ignoreVSync.setSwapInterval(0); ignoreVSync.setSwapInterval(0);
QSurfaceFormat::setDefaultFormat(ignoreVSync); QSurfaceFormat::setDefaultFormat(ignoreVSync);
qInfo() << "Loading Fonts";
QDirIterator it(":/font/", QDirIterator::Subdirectories);
while (it.hasNext()) {
QString ttf = it.next();
// qDebug() << ttf;
auto id = QFontDatabase::addApplicationFont(ttf);
}
//------------------- //-------------------
mLinphoneThread = new Thread(this); mLinphoneThread = new Thread(this);
init(); init();

View file

@ -57,6 +57,7 @@ ConferenceInfoCore::ConferenceInfoCore(std::shared_ptr<linphone::ConferenceInfo>
if (conferenceInfo) { if (conferenceInfo) {
mustBeInLinphoneThread(getClassName()); mustBeInLinphoneThread(getClassName());
mConferenceInfoModel = Utils::makeQObject_ptr<ConferenceInfoModel>(conferenceInfo); mConferenceInfoModel = Utils::makeQObject_ptr<ConferenceInfoModel>(conferenceInfo);
mHaveModel = true;
auto confSchedulerModel = mConferenceInfoModel->getConferenceScheduler(); auto confSchedulerModel = mConferenceInfoModel->getConferenceScheduler();
if (!confSchedulerModel) { if (!confSchedulerModel) {
auto confScheduler = CoreModel::getInstance()->getCore()->createConferenceScheduler(); auto confScheduler = CoreModel::getInstance()->getCore()->createConferenceScheduler();
@ -108,7 +109,6 @@ ConferenceInfoCore::ConferenceInfoCore(std::shared_ptr<linphone::ConferenceInfo>
auto cleanedClonedAddress = accountAddress->clone(); auto cleanedClonedAddress = accountAddress->clone();
cleanedClonedAddress->clean(); cleanedClonedAddress->clean();
mOrganizerAddress = Utils::coreStringToAppString(cleanedClonedAddress->asStringUriOnly()); mOrganizerAddress = Utils::coreStringToAppString(cleanedClonedAddress->asStringUriOnly());
qDebug() << "set organizer address" << mOrganizerAddress;
} }
} }
}); });
@ -126,6 +126,7 @@ ConferenceInfoCore::ConferenceInfoCore(const ConferenceInfoCore &conferenceInfoC
mUri = conferenceInfoCore.mUri; mUri = conferenceInfoCore.mUri;
mParticipants = conferenceInfoCore.mParticipants; mParticipants = conferenceInfoCore.mParticipants;
mTimeZoneModel = conferenceInfoCore.mTimeZoneModel; mTimeZoneModel = conferenceInfoCore.mTimeZoneModel;
mHaveModel = conferenceInfoCore.mHaveModel;
mIsScheduled = conferenceInfoCore.mIsScheduled; mIsScheduled = conferenceInfoCore.mIsScheduled;
mIsEnded = conferenceInfoCore.mIsEnded; mIsEnded = conferenceInfoCore.mIsEnded;
mInviteMode = conferenceInfoCore.mInviteMode; mInviteMode = conferenceInfoCore.mInviteMode;
@ -343,6 +344,17 @@ QString ConferenceInfoCore::getUri() const {
return mUri; return mUri;
} }
bool ConferenceInfoCore::getHaveModel() const {
return mHaveModel;
}
void ConferenceInfoCore::setHaveModel(const bool &haveModel) {
if (mHaveModel != haveModel) {
mHaveModel = haveModel;
emit haveModelChanged();
}
}
bool ConferenceInfoCore::isScheduled() const { bool ConferenceInfoCore::isScheduled() const {
return mIsScheduled; return mIsScheduled;
} }
@ -578,6 +590,7 @@ void ConferenceInfoCore::save() {
} else qCritical() << "No contact address"; } else qCritical() << "No contact address";
} else qCritical() << "No default account"; } else qCritical() << "No default account";
mConferenceInfoModel = Utils::makeQObject_ptr<ConferenceInfoModel>(linphoneConf); mConferenceInfoModel = Utils::makeQObject_ptr<ConferenceInfoModel>(linphoneConf);
setHaveModel(true);
// mConferenceInfoModel->createConferenceScheduler(); // mConferenceInfoModel->createConferenceScheduler();
auto confSchedulerModel = mConferenceInfoModel->getConferenceScheduler(); auto confSchedulerModel = mConferenceInfoModel->getConferenceScheduler();
if (!confSchedulerModel) { if (!confSchedulerModel) {

View file

@ -51,10 +51,13 @@ public:
Q_PROPERTY(QString subject READ getSubject WRITE setSubject NOTIFY subjectChanged) Q_PROPERTY(QString subject READ getSubject WRITE setSubject NOTIFY subjectChanged)
Q_PROPERTY(QString description READ getDescription WRITE setDescription NOTIFY descriptionChanged) Q_PROPERTY(QString description READ getDescription WRITE setDescription NOTIFY descriptionChanged)
Q_PROPERTY(QString uri READ getUri NOTIFY uriChanged) Q_PROPERTY(QString uri READ getUri NOTIFY uriChanged)
Q_PROPERTY(bool haveModel READ getHaveModel NOTIFY haveModelChanged)
Q_PROPERTY(bool isScheduled READ isScheduled WRITE setIsScheduled NOTIFY isScheduledChanged) Q_PROPERTY(bool isScheduled READ isScheduled WRITE setIsScheduled NOTIFY isScheduledChanged)
Q_PROPERTY(bool isEnded READ isEnded WRITE setIsEnded NOTIFY isEndedChanged) Q_PROPERTY(bool isEnded READ isEnded WRITE setIsEnded NOTIFY isEndedChanged)
Q_PROPERTY(int inviteMode READ getInviteMode WRITE setInviteMode NOTIFY inviteModeChanged) Q_PROPERTY(int inviteMode READ getInviteMode WRITE setInviteMode NOTIFY inviteModeChanged)
Q_PROPERTY(int participantCount READ getParticipantCount NOTIFY participantsChanged) Q_PROPERTY(int participantCount READ getParticipantCount NOTIFY participantsChanged)
Q_PROPERTY(QVariantList participants READ getParticipants NOTIFY participantsChanged) Q_PROPERTY(QVariantList participants READ getParticipants NOTIFY participantsChanged)
Q_PROPERTY(LinphoneEnums::ConferenceInfoState state READ getConferenceInfoState NOTIFY conferenceInfoStateChanged) Q_PROPERTY(LinphoneEnums::ConferenceInfoState state READ getConferenceInfoState NOTIFY conferenceInfoStateChanged)
Q_PROPERTY(LinphoneEnums::ConferenceSchedulerState schedulerState READ getConferenceSchedulerState NOTIFY Q_PROPERTY(LinphoneEnums::ConferenceSchedulerState schedulerState READ getConferenceSchedulerState NOTIFY
@ -82,6 +85,8 @@ public:
QString getSubject() const; QString getSubject() const;
QString getDescription() const; QString getDescription() const;
QString getUri() const; QString getUri() const;
bool getHaveModel() const;
void setHaveModel(const bool &haveModel);
bool isScheduled() const; bool isScheduled() const;
void setIsScheduled(const bool &on); void setIsScheduled(const bool &on);
bool computeIsEnded() const; bool computeIsEnded() const;
@ -148,6 +153,7 @@ signals:
void descriptionChanged(); void descriptionChanged();
void participantsChanged(); void participantsChanged();
void uriChanged(); void uriChanged();
void haveModelChanged();
void isScheduledChanged(); void isScheduledChanged();
void isEndedChanged(); void isEndedChanged();
void inviteModeChanged(); void inviteModeChanged();
@ -182,6 +188,7 @@ private:
LinphoneEnums::ConferenceSchedulerState mConferenceSchedulerState; LinphoneEnums::ConferenceSchedulerState mConferenceSchedulerState;
LinphoneEnums::ConferenceInfoState mConferenceInfoState = LinphoneEnums::ConferenceInfoState mConferenceInfoState =
LinphoneEnums::ConferenceInfoState::ConferenceInfoStateNew; LinphoneEnums::ConferenceInfoState::ConferenceInfoStateNew;
bool mHaveModel = false;
bool mIsScheduled; bool mIsScheduled;
bool mIsEnded = false; bool mIsEnded = false;
QTimer mCheckEndTimer; QTimer mCheckEndTimer;

View file

@ -57,6 +57,7 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
mustBeInLinphoneThread(getClassName()); mustBeInLinphoneThread(getClassName());
std::list<std::shared_ptr<linphone::ConferenceInfo>> conferenceInfos = std::list<std::shared_ptr<linphone::ConferenceInfo>> conferenceInfos =
CoreModel::getInstance()->getCore()->getDefaultAccount()->getConferenceInformationList(); CoreModel::getInstance()->getCore()->getDefaultAccount()->getConferenceInformationList();
items->push_back(nullptr); // Add Dummy conference for today
for (auto conferenceInfo : conferenceInfos) { for (auto conferenceInfo : conferenceInfos) {
auto confInfoCore = build(conferenceInfo); auto confInfoCore = build(conferenceInfo);
if (confInfoCore) items->push_back(confInfoCore); if (confInfoCore) items->push_back(confInfoCore);
@ -64,7 +65,10 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
mCoreModelConnection->invokeToCore([this, items]() { mCoreModelConnection->invokeToCore([this, items]() {
mustBeInMainThread(getClassName()); mustBeInMainThread(getClassName());
resetData(); resetData();
int currentDateIndex = sort(*items);
add(*items); add(*items);
updateHaveCurrentDate();
setCurrentDateIndex(mHaveCurrentDate ? currentDateIndex + 1 : currentDateIndex);
delete items; delete items;
}); });
}); });
@ -108,14 +112,50 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
emit lUpdate(); emit lUpdate();
} }
bool ConferenceInfoList::haveCurrentDate() const {
return mHaveCurrentDate;
}
void ConferenceInfoList::setHaveCurrentDate(bool have) {
if (mHaveCurrentDate != have) {
mHaveCurrentDate = have;
emit haveCurrentDateChanged();
}
}
void ConferenceInfoList::updateHaveCurrentDate() {
auto today = QDateTime::currentDateTimeUtc().date();
for (auto item : mList) {
auto model = item.objectCast<ConferenceInfoCore>();
if (model && model->getDateTimeUtc().date() == today) {
setHaveCurrentDate(true);
return;
}
}
setHaveCurrentDate(false);
}
int ConferenceInfoList::getCurrentDateIndex() const {
return mCurrentDateIndex;
}
void ConferenceInfoList::setCurrentDateIndex(int index) {
if (mCurrentDateIndex != index) {
mCurrentDateIndex = index;
emit currentDateIndexChanged();
}
}
QSharedPointer<ConferenceInfoCore> QSharedPointer<ConferenceInfoCore>
ConferenceInfoList::get(std::shared_ptr<linphone::ConferenceInfo> conferenceInfo) const { ConferenceInfoList::get(std::shared_ptr<linphone::ConferenceInfo> conferenceInfo) const {
auto uri = Utils::coreStringToAppString(conferenceInfo->getUri()->asStringUriOnly()); auto uri = Utils::coreStringToAppString(conferenceInfo->getUri()->asStringUriOnly());
for (auto item : mList) { for (auto item : mList) {
auto model = item.objectCast<ConferenceInfoCore>(); auto model = item.objectCast<ConferenceInfoCore>();
auto confUri = model->getUri(); if (model) {
if (confUri == uri) { auto confUri = model->getUri();
return model; if (confUri == uri) {
return model;
}
} }
} }
return nullptr; return nullptr;
@ -144,7 +184,7 @@ ConferenceInfoList::build(const std::shared_ptr<linphone::ConferenceInfo> &confe
void ConferenceInfoList::remove(const int &row) { void ConferenceInfoList::remove(const int &row) {
// beginRemoveRows(QModelIndex(), row, row); // beginRemoveRows(QModelIndex(), row, row);
auto item = mList[row].objectCast<ConferenceInfoCore>(); auto item = mList[row].objectCast<ConferenceInfoCore>();
emit item->lDeleteConferenceInfo(); if (item) emit item->lDeleteConferenceInfo();
// endRemoveRows(); // endRemoveRows();
} }
@ -158,10 +198,42 @@ QHash<int, QByteArray> ConferenceInfoList::roleNames() const {
QVariant ConferenceInfoList::data(const QModelIndex &index, int role) const { QVariant ConferenceInfoList::data(const QModelIndex &index, int role) const {
int row = index.row(); int row = index.row();
if (!index.isValid() || row < 0 || row >= mList.count()) return QVariant(); if (!index.isValid() || row < 0 || row >= mList.count()) return QVariant();
if (role == Qt::DisplayRole) { auto conferenceInfo = mList[row].objectCast<ConferenceInfoCore>();
return QVariant::fromValue(new ConferenceInfoGui(mList[row].objectCast<ConferenceInfoCore>())); if (conferenceInfo) {
} else if (role == Qt::DisplayRole + 1) { if (role == Qt::DisplayRole) {
return Utils::toDateMonthString(mList[row].objectCast<ConferenceInfoCore>()->getDateTimeUtc()); return QVariant::fromValue(new ConferenceInfoGui(mList[row].objectCast<ConferenceInfoCore>()));
} else if (role == Qt::DisplayRole + 1) {
return Utils::toDateMonthString(mList[row].objectCast<ConferenceInfoCore>()->getDateTimeUtc());
}
} else { // Dummy date
if (role == Qt::DisplayRole) {
return QVariant::fromValue(new ConferenceInfoGui());
} else if (role == Qt::DisplayRole + 1) {
return Utils::toDateMonthString(QDateTime::currentDateTimeUtc());
}
} }
return QVariant(); return QVariant();
} }
int ConferenceInfoList::sort(QList<QSharedPointer<ConferenceInfoCore>> &listToSort) {
auto nowDate = QDateTime(QDate::currentDate(), QTime(0, 0, 0)).toUTC().date();
std::sort(listToSort.begin(), listToSort.end(),
[nowDate](const QSharedPointer<QObject> &a, const QSharedPointer<QObject> &b) {
auto l = a.objectCast<ConferenceInfoCore>();
auto r = b.objectCast<ConferenceInfoCore>();
if (!l || !r) { // sort on date
return !l ? nowDate <= r->getDateTimeUtc().date() : l->getDateTimeUtc().date() < nowDate;
} else {
return l->getDateTimeUtc() < r->getDateTimeUtc();
}
});
/*
int count = 0;
for(auto item : listToSort){
auto l = item.objectCast<ConferenceInfoCore>();
qDebug() << count ++ << (l ? l->getDateTimeUtc() : QDateTime::currentDateTimeUtc());
}*/
auto it = std::find(listToSort.begin(), listToSort.end(), nullptr);
// qDebug() << it - listToSort.begin();
return it == listToSort.end() ? -1 : it - listToSort.begin();
}

View file

@ -38,6 +38,13 @@ public:
~ConferenceInfoList(); ~ConferenceInfoList();
void setSelf(QSharedPointer<ConferenceInfoList> me); void setSelf(QSharedPointer<ConferenceInfoList> me);
bool haveCurrentDate()const;
void setHaveCurrentDate(bool have);
void updateHaveCurrentDate();
int getCurrentDateIndex() const;
void setCurrentDateIndex(int index);
QSharedPointer<ConferenceInfoCore> get(std::shared_ptr<linphone::ConferenceInfo> conferenceInfo) const; QSharedPointer<ConferenceInfoCore> get(std::shared_ptr<linphone::ConferenceInfo> conferenceInfo) const;
QSharedPointer<ConferenceInfoCore> build(const std::shared_ptr<linphone::ConferenceInfo> &conferenceInfo) const; QSharedPointer<ConferenceInfoCore> build(const std::shared_ptr<linphone::ConferenceInfo> &conferenceInfo) const;
@ -47,12 +54,18 @@ public:
QHash<int, QByteArray> roleNames() const override; QHash<int, QByteArray> roleNames() const override;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
static int sort(QList<QSharedPointer<ConferenceInfoCore>> &listToSort); // return the index of null item.
signals: signals:
void lUpdate(); void lUpdate();
void addCurrentDateChanged();
void haveCurrentDateChanged();
void currentDateIndexChanged();
private: private:
QSharedPointer<SafeConnection<ConferenceInfoList, CoreModel>> mCoreModelConnection; QSharedPointer<SafeConnection<ConferenceInfoList, CoreModel>> mCoreModelConnection;
bool mHaveCurrentDate = false;
int mCurrentDateIndex = -1;
DECLARE_ABSTRACT_OBJECT DECLARE_ABSTRACT_OBJECT
}; };
#endif // CONFERENCE_INFO_LIST_H_ #endif // CONFERENCE_INFO_LIST_H_

View file

@ -28,8 +28,19 @@ DEFINE_ABSTRACT_OBJECT(ConferenceInfoProxy)
ConferenceInfoProxy::ConferenceInfoProxy(QObject *parent) : SortFilterProxy(parent) { ConferenceInfoProxy::ConferenceInfoProxy(QObject *parent) : SortFilterProxy(parent) {
mList = ConferenceInfoList::create(); mList = ConferenceInfoList::create();
setSourceModel(mList.get()); setSourceModel(mList.get());
connect(this, &ConferenceInfoProxy::searchTextChanged, [this] { invalidate(); }); connect(this, &ConferenceInfoProxy::searchTextChanged, [this] {
invalidate();
updateCurrentDateIndex();
});
connect(this, &ConferenceInfoProxy::lUpdate, mList.get(), &ConferenceInfoList::lUpdate); connect(this, &ConferenceInfoProxy::lUpdate, mList.get(), &ConferenceInfoList::lUpdate);
connect(mList.get(), &ConferenceInfoList::haveCurrentDateChanged, [this] {
invalidate();
updateCurrentDateIndex();
});
connect(mList.get(), &ConferenceInfoList::haveCurrentDateChanged, this,
&ConferenceInfoProxy::haveCurrentDateChanged);
connect(mList.get(), &ConferenceInfoList::currentDateIndexChanged, this,
&ConferenceInfoProxy::updateCurrentDateIndex);
} }
ConferenceInfoProxy::~ConferenceInfoProxy() { ConferenceInfoProxy::~ConferenceInfoProxy() {
@ -45,31 +56,35 @@ void ConferenceInfoProxy::setSearchText(const QString &search) {
emit searchTextChanged(); emit searchTextChanged();
} }
bool ConferenceInfoProxy::haveCurrentDate() const {
return mList->haveCurrentDate();
}
int ConferenceInfoProxy::getCurrentDateIndex() const {
return mCurrentDateIndex;
}
void ConferenceInfoProxy::updateCurrentDateIndex() {
int newIndex = mapFromSource(sourceModel()->index(mList->getCurrentDateIndex(), 0)).row();
if (mCurrentDateIndex != newIndex) {
mCurrentDateIndex = newIndex;
emit currentDateIndexChanged();
}
}
bool ConferenceInfoProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { bool ConferenceInfoProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const {
const ConferenceInfoGui *gui = auto ciCore = qobject_cast<ConferenceInfoList *>(sourceModel())->template getAt<ConferenceInfoCore>(sourceRow);
sourceModel()->data(sourceModel()->index(sourceRow, 0, sourceParent)).value<ConferenceInfoGui *>(); if (ciCore) {
if (gui) {
auto ciCore = gui->getCore();
assert(ciCore);
if (!ciCore->getSubject().contains(mSearchText)) return false; if (!ciCore->getSubject().contains(mSearchText)) return false;
if (ciCore->getDuration() == 0) return false;
QDateTime currentDateTime = QDateTime::currentDateTimeUtc(); QDateTime currentDateTime = QDateTime::currentDateTimeUtc();
if (mFilterType == 0) { if (mFilterType == 0) {
// auto res = ciCore->getEndDateTimeUtc() < currentDateTime;
return true; return true;
} else if (mFilterType == 1) { } else if (mFilterType == 1) {
auto res = ciCore->getEndDateTimeUtc() >= currentDateTime; auto res = ciCore->getEndDateTimeUtc() >= currentDateTime;
return res; return res;
// } else if (mFilterType == 2) {
// return !Utils::isMe(ciCore->getOrganizer());
} else return mFilterType == -1; } else return mFilterType == -1;
} else {
return !mList->haveCurrentDate();
} }
return false; return false;
} }
bool ConferenceInfoProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const {
auto l = getItemAt<ConferenceInfoList, ConferenceInfoGui>(left.row())->getCore();
auto r = getItemAt<ConferenceInfoList, ConferenceInfoGui>(right.row())->getCore();
return l->getDateTimeUtc() < r->getDateTimeUtc();
}

View file

@ -30,6 +30,8 @@ class ConferenceInfoProxy : public SortFilterProxy, public AbstractObject {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString searchText READ getSearchText WRITE setSearchText NOTIFY searchTextChanged) Q_PROPERTY(QString searchText READ getSearchText WRITE setSearchText NOTIFY searchTextChanged)
Q_PROPERTY(bool haveCurrentDate READ haveCurrentDate NOTIFY haveCurrentDateChanged)
Q_PROPERTY(int currentDateIndex READ getCurrentDateIndex NOTIFY currentDateIndexChanged)
public: public:
ConferenceInfoProxy(QObject *parent = Q_NULLPTR); ConferenceInfoProxy(QObject *parent = Q_NULLPTR);
@ -37,18 +39,29 @@ public:
QString getSearchText() const; QString getSearchText() const;
void setSearchText(const QString &search); void setSearchText(const QString &search);
bool haveCurrentDate() const;
int getCurrentDateIndex() const;
void updateCurrentDateIndex();
protected: protected:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; // Do not use the sort feature. We cannot retrieve indexes with mapToSource because Qt return -1 for items that are not displayed.
// We need it to know where
// The workaround is to implement ourself the sort into the List.
//bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
signals: signals:
void searchTextChanged(); void searchTextChanged();
void haveCurrentDateChanged();
void currentDateIndexChanged();
void lUpdate(); void lUpdate();
private: private:
QString mSearchText; QString mSearchText;
QSharedPointer<ConferenceInfoList> mList; QSharedPointer<ConferenceInfoList> mList;
int mCurrentDateIndex = -1;
DECLARE_ABSTRACT_OBJECT DECLARE_ABSTRACT_OBJECT
}; };

View file

@ -21,7 +21,6 @@
#include "SortFilterProxy.hpp" #include "SortFilterProxy.hpp"
SortFilterProxy::SortFilterProxy(QObject *parent) : QSortFilterProxyModel(parent) { SortFilterProxy::SortFilterProxy(QObject *parent) : QSortFilterProxyModel(parent) {
mFilterType = 0;
connect(this, &SortFilterProxy::rowsInserted, this, &SortFilterProxy::countChanged); connect(this, &SortFilterProxy::rowsInserted, this, &SortFilterProxy::countChanged);
connect(this, &SortFilterProxy::rowsRemoved, this, &SortFilterProxy::countChanged); connect(this, &SortFilterProxy::rowsRemoved, this, &SortFilterProxy::countChanged);
} }

View file

@ -52,7 +52,7 @@ signals:
void filterTypeChanged(int filterType); void filterTypeChanged(int filterType);
protected: protected:
int mFilterType; int mFilterType = 0;
bool mDeleteSourceModel = false; bool mDeleteSourceModel = false;
}; };

View file

@ -1,15 +0,0 @@
This package is part of the noto project. Visit
google.com/get/noto for more information.
Built on 2017-04-03 from the following noto repository:
-----
Repo: noto-fonts
Tag: v2017-03-06-phase3-initial
Date: 2017-03-06 15:25:38 GMT
Commit:60aa0da2ee84b11e78725b4577edc2e80b009d56
Initial phase 3.
This is the first release of noto-fonts that includes phase 3 fonts in
the hinted/unhinted subdirectories. The new fonts are Armenian,
Cherokee, and Hebrew.

View file

@ -1,92 +1,93 @@
This Font Software is licensed under the SIL Open Font License, Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
Version 1.1.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -----------------------------------------------------------
----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide PREAMBLE
development of collaborative font projects, to support the font The goals of the Open Font License (OFL) are to stimulate worldwide
creation efforts of academic and linguistic communities, and to development of collaborative font projects, to support the font creation
provide a free and open framework in which fonts may be shared and efforts of academic and linguistic communities, and to provide a free and
improved in partnership with others. open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The The OFL allows the licensed fonts to be used, studied, modified and
fonts, including any derivative works, can be bundled, embedded, redistributed freely as long as they are not sold by themselves. The
redistributed and/or sold with any software provided that any reserved fonts, including any derivative works, can be bundled, embedded,
names are not used by derivative works. The fonts and derivatives, redistributed and/or sold with any software provided that any reserved
however, cannot be released under any other type of license. The names are not used by derivative works. The fonts and derivatives,
requirement for fonts to remain under this license does not apply to however, cannot be released under any other type of license. The
any document created using the fonts or their derivatives. requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright DEFINITIONS
Holder(s) under this license and clearly marked as such. This may "Font Software" refers to the set of files released by the Copyright
include source files, build scripts and documentation. Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s). "Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s). "Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the "Modified Version" refers to any derivative made by adding to, deleting,
components of the Original Version, by changing formats or by porting or substituting -- in part or in whole -- any of the components of the
the Font Software to a new environment. Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software. "Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining PERMISSION & CONDITIONS
a copy of the Font Software, to use, study, copy, merge, embed, Permission is hereby granted, free of charge, to any person obtaining
modify, redistribute, and sell modified and unmodified copies of the a copy of the Font Software, to use, study, copy, merge, embed, modify,
Font Software, subject to the following conditions: redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself. 1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy 2) Original or Modified Versions of the Font Software may be bundled,
contains the above copyright notice and this license. These can be redistributed and/or sold with any software, provided that each copy
included either as stand-alone text files, human-readable headers or contains the above copyright notice and this license. These can be
in the appropriate machine-readable metadata fields within text or included either as stand-alone text files, human-readable headers or
binary files as long as those fields can be easily viewed by the user. in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the 3) No Modified Version of the Font Software may use the Reserved Font
corresponding Copyright Holder. This restriction only applies to the Name(s) unless explicit written permission is granted by the corresponding
primary font name as presented to the users. Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Modified Version, except to acknowledge the contribution(s) of the Software shall not be used to promote, endorse or advertise any
Copyright Holder(s) and the Author(s) or with their explicit written Modified Version, except to acknowledge the contribution(s) of the
permission. Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be 5) The Font Software, modified or unmodified, in part or in whole,
distributed under any other license. The requirement for fonts to must be distributed entirely under this license, and must not be
remain under this license does not apply to any document created using distributed under any other license. The requirement for fonts to
the Font Software. remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are TERMINATION
not met. This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, DISCLAIMER
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
OTHER DEALINGS IN THE FONT SOFTWARE. FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View file

@ -0,0 +1,136 @@
Noto Sans Variable Font
=======================
This download contains Noto Sans as both variable fonts and static fonts.
Noto Sans is a variable font with these axes:
wdth
wght
This means all the styles are contained in these files:
NotoSans-VariableFont_wdth,wght.ttf
NotoSans-Italic-VariableFont_wdth,wght.ttf
If your app fully supports variable fonts, you can now pick intermediate styles
that arent available as static fonts. Not all apps support variable fonts, and
in those cases you can use the static font files for Noto Sans:
static/NotoSans_ExtraCondensed-Thin.ttf
static/NotoSans_ExtraCondensed-ExtraLight.ttf
static/NotoSans_ExtraCondensed-Light.ttf
static/NotoSans_ExtraCondensed-Regular.ttf
static/NotoSans_ExtraCondensed-Medium.ttf
static/NotoSans_ExtraCondensed-SemiBold.ttf
static/NotoSans_ExtraCondensed-Bold.ttf
static/NotoSans_ExtraCondensed-ExtraBold.ttf
static/NotoSans_ExtraCondensed-Black.ttf
static/NotoSans_Condensed-Thin.ttf
static/NotoSans_Condensed-ExtraLight.ttf
static/NotoSans_Condensed-Light.ttf
static/NotoSans_Condensed-Regular.ttf
static/NotoSans_Condensed-Medium.ttf
static/NotoSans_Condensed-SemiBold.ttf
static/NotoSans_Condensed-Bold.ttf
static/NotoSans_Condensed-ExtraBold.ttf
static/NotoSans_Condensed-Black.ttf
static/NotoSans_SemiCondensed-Thin.ttf
static/NotoSans_SemiCondensed-ExtraLight.ttf
static/NotoSans_SemiCondensed-Light.ttf
static/NotoSans_SemiCondensed-Regular.ttf
static/NotoSans_SemiCondensed-Medium.ttf
static/NotoSans_SemiCondensed-SemiBold.ttf
static/NotoSans_SemiCondensed-Bold.ttf
static/NotoSans_SemiCondensed-ExtraBold.ttf
static/NotoSans_SemiCondensed-Black.ttf
static/NotoSans-Thin.ttf
static/NotoSans-ExtraLight.ttf
static/NotoSans-Light.ttf
static/NotoSans-Regular.ttf
static/NotoSans-Medium.ttf
static/NotoSans-SemiBold.ttf
static/NotoSans-Bold.ttf
static/NotoSans-ExtraBold.ttf
static/NotoSans-Black.ttf
static/NotoSans_ExtraCondensed-ThinItalic.ttf
static/NotoSans_ExtraCondensed-ExtraLightItalic.ttf
static/NotoSans_ExtraCondensed-LightItalic.ttf
static/NotoSans_ExtraCondensed-Italic.ttf
static/NotoSans_ExtraCondensed-MediumItalic.ttf
static/NotoSans_ExtraCondensed-SemiBoldItalic.ttf
static/NotoSans_ExtraCondensed-BoldItalic.ttf
static/NotoSans_ExtraCondensed-ExtraBoldItalic.ttf
static/NotoSans_ExtraCondensed-BlackItalic.ttf
static/NotoSans_Condensed-ThinItalic.ttf
static/NotoSans_Condensed-ExtraLightItalic.ttf
static/NotoSans_Condensed-LightItalic.ttf
static/NotoSans_Condensed-Italic.ttf
static/NotoSans_Condensed-MediumItalic.ttf
static/NotoSans_Condensed-SemiBoldItalic.ttf
static/NotoSans_Condensed-BoldItalic.ttf
static/NotoSans_Condensed-ExtraBoldItalic.ttf
static/NotoSans_Condensed-BlackItalic.ttf
static/NotoSans_SemiCondensed-ThinItalic.ttf
static/NotoSans_SemiCondensed-ExtraLightItalic.ttf
static/NotoSans_SemiCondensed-LightItalic.ttf
static/NotoSans_SemiCondensed-Italic.ttf
static/NotoSans_SemiCondensed-MediumItalic.ttf
static/NotoSans_SemiCondensed-SemiBoldItalic.ttf
static/NotoSans_SemiCondensed-BoldItalic.ttf
static/NotoSans_SemiCondensed-ExtraBoldItalic.ttf
static/NotoSans_SemiCondensed-BlackItalic.ttf
static/NotoSans-ThinItalic.ttf
static/NotoSans-ExtraLightItalic.ttf
static/NotoSans-LightItalic.ttf
static/NotoSans-Italic.ttf
static/NotoSans-MediumItalic.ttf
static/NotoSans-SemiBoldItalic.ttf
static/NotoSans-BoldItalic.ttf
static/NotoSans-ExtraBoldItalic.ttf
static/NotoSans-BlackItalic.ttf
Get started
-----------
1. Install the font files you want to use
2. Use your app's font picker to view the font family and all the
available styles
Learn more about variable fonts
-------------------------------
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
https://variablefonts.typenetwork.com
https://medium.com/variable-fonts
In desktop apps
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
Online
https://developers.google.com/fonts/docs/getting_started
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
Installing fonts
MacOS: https://support.apple.com/en-us/HT201749
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
Android Apps
https://developers.google.com/fonts/docs/android
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
License
-------
Please read the full license text (OFL.txt) to understand the permissions,
restrictions and requirements for usage, redistribution, and modification.
You can use them in your products & projects print or digital,
commercial or otherwise.
This isn't legal advice, please consider consulting a lawyer and see the full
license for all details.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

77
Linphone/data/fonts.qrc Normal file
View file

@ -0,0 +1,77 @@
<RCC>
<qresource prefix="/">
<file>font/NotoColorEmoji_WindowsCompatible.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-LightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-ThinItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-SemiBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-Italic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-MediumItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-BoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-ExtraBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-BlackItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-MediumItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-BoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-ExtraLightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-Medium.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-SemiBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-Black.ttf</file>
<file>font/Noto_Sans/static/NotoSans-Medium.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-Bold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-ExtraBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-Regular.ttf</file>
<file>font/Noto_Sans/static/NotoSans-SemiBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans-ExtraBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-Medium.ttf</file>
<file>font/Noto_Sans/static/NotoSans-BlackItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-MediumItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-BoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-SemiBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-ExtraBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-SemiBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-LightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-MediumItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-ExtraBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-ExtraLightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-Italic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-ThinItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-Italic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-SemiBoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-BlackItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-Italic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-ExtraLight.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-Thin.ttf</file>
<file>font/Noto_Sans/static/NotoSans-Regular.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-Light.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-ExtraBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-ExtraLight.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-ExtraLight.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-SemiBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans-Thin.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-Bold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-ExtraLightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-Black.ttf</file>
<file>font/Noto_Sans/static/NotoSans-ExtraBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-Light.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-ThinItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-Black.ttf</file>
<file>font/Noto_Sans/static/NotoSans-LightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-ThinItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_SemiCondensed-BoldItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-SemiBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-Light.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-LightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-BlackItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans-Bold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-ExtraBold.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-Thin.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-Regular.ttf</file>
<file>font/Noto_Sans/static/NotoSans_Condensed-Black.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-Bold.ttf</file>
<file>font/Noto_Sans/static/NotoSans-Light.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-Medium.ttf</file>
<file>font/Noto_Sans/static/NotoSans-ExtraLightItalic.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-Regular.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-ExtraLight.ttf</file>
<file>font/Noto_Sans/static/NotoSans_ExtraCondensed-Thin.ttf</file>
</qresource>
</RCC>

View file

@ -360,7 +360,7 @@ void CallModel::onStateChanged(const std::shared_ptr<linphone::Call> &call,
// After UpdatedByRemote, video direction could be changed. // After UpdatedByRemote, video direction could be changed.
auto params = call->getRemoteParams(); auto params = call->getRemoteParams();
emit remoteVideoEnabledChanged(params && params->videoEnabled()); emit remoteVideoEnabledChanged(params && params->videoEnabled());
qWarning() << "CallCameraEnabled:" << call->cameraEnabled(); qDebug() << "CallCameraEnabled:" << call->cameraEnabled();
auto videoDirection = call->getCurrentParams()->getVideoDirection(); auto videoDirection = call->getCurrentParams()->getVideoDirection();
emit cameraEnabledChanged(videoDirection == linphone::MediaDirection::SendOnly || emit cameraEnabledChanged(videoDirection == linphone::MediaDirection::SendOnly ||
videoDirection == linphone::MediaDirection::SendRecv); videoDirection == linphone::MediaDirection::SendRecv);

View file

@ -1164,6 +1164,14 @@ QDateTime Utils::createDateTime(const QDate &date, int hour, int min) {
return QDateTime(date, time); return QDateTime(date, time);
} }
QDateTime Utils::getCurrentDateTime() {
return QDateTime::currentDateTime();
}
QDateTime Utils::getCurrentDateTimeUtc() {
return QDateTime::currentDateTimeUtc();
}
int Utils::secsTo(const QString &startTime, const QString &endTime) { int Utils::secsTo(const QString &startTime, const QString &endTime) {
QDateTime startDate(QDateTime::fromString(startTime, "hh:mm")); QDateTime startDate(QDateTime::fromString(startTime, "hh:mm"));
QDateTime endDate(QDateTime::fromString(endTime, "hh:mm")); QDateTime endDate(QDateTime::fromString(endTime, "hh:mm"));

View file

@ -95,6 +95,8 @@ public:
Q_INVOKABLE static bool isBeforeToday(QDate date); Q_INVOKABLE static bool isBeforeToday(QDate date);
Q_INVOKABLE static bool datesAreEqual(const QDate &a, const QDate &b); Q_INVOKABLE static bool datesAreEqual(const QDate &a, const QDate &b);
Q_INVOKABLE static QDateTime createDateTime(const QDate &date, int hour, int min); Q_INVOKABLE static QDateTime createDateTime(const QDate &date, int hour, int min);
Q_INVOKABLE static QDateTime getCurrentDateTime();
Q_INVOKABLE static QDateTime getCurrentDateTimeUtc();
Q_INVOKABLE static int getYear(const QDate &date); Q_INVOKABLE static int getYear(const QDate &date);
Q_INVOKABLE static int secsTo(const QString &start, const QString &end); Q_INVOKABLE static int secsTo(const QString &start, const QString &end);
Q_INVOKABLE static QDateTime addSecs(QDateTime date, int secs); Q_INVOKABLE static QDateTime addSecs(QDateTime date, int secs);

Some files were not shown because too many files have changed in this diff Show more