Select Git revision
recentmodel.cpp
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
recentmodel.cpp 39.15 KiB
/************************************************************************************
* Copyright (C) 2015-2016 by Savoir-faire Linux *
* Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
* Alexandre Lision <alexandre.lision@savoirfairelinux.com> *
* Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com> *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***********************************************************************************/
#include "recentmodel.h"
//std
#include <algorithm>
//Qt
#include <QtCore/QCoreApplication>
#include <QtCore/QSortFilterProxyModel>
//Ring
#include <call.h>
#include <person.h>
#include <personmodel.h>
#include <contactmethod.h>
#include <phonedirectorymodel.h>
#include <callmodel.h>
#include <categorizedhistorymodel.h>
#include <media/recordingmodel.h>
#include <media/textrecording.h>
struct CallGroup
{
QVector<Call*> m_lCalls ;
Call::Direction m_Direction;
bool m_Missed ;
time_t m_LastUsed ;
};
struct RecentViewNode
{
//Types
enum class Type {
PERSON ,
CONTACT_METHOD ,
CALL ,
CALL_GROUP ,
CONFERENCE ,
TEXT_MESSAGE ,
TEXT_MESSAGE_GROUP,
};
//Constructor
explicit RecentViewNode();
RecentViewNode(Call* c, RecentModelPrivate* model);
RecentViewNode(const Person *p, RecentModelPrivate* model);
RecentViewNode(ContactMethod *cm, RecentModelPrivate* model);
virtual ~RecentViewNode();
//Attributes
RecentModelPrivate* m_pModel ;