~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to kde/src/lib/videocodecmodel.h

  • Committer: Package Import Robot
  • Author(s): Francois Marier, Francois Marier, Mark Purcell
  • Date: 2014-10-18 15:08:50 UTC
  • mfrom: (1.1.12)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20141018150850-2exfk34ckb15pcwi
Tags: 1.4.1-0.1
[ Francois Marier ]
* Non-maintainer upload
* New upstream release (closes: #759576, #741130)
  - debian/rules +PJPROJECT_VERSION := 2.2.1
  - add upstream patch to fix broken TLS support
  - add patch to fix pjproject regression

[ Mark Purcell ]
* Build-Depends:
  - sflphone-daemon + libavformat-dev, libavcodec-dev, libswscale-dev,
  libavdevice-dev, libavutil-dev
  - sflphone-gnome + libclutter-gtk-1.0-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
 *   Copyright (C) 2012-2014 by Savoir-Faire Linux                          *
3
 
 *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
4
 
 *                                                                          *
5
 
 *   This library is free software; you can redistribute it and/or          *
6
 
 *   modify it under the terms of the GNU Lesser General Public             *
7
 
 *   License as published by the Free Software Foundation; either           *
8
 
 *   version 2.1 of the License, or (at your option) any later version.     *
9
 
 *                                                                          *
10
 
 *   This library is distributed in the hope that it will be useful,        *
11
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
12
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
13
 
 *   Lesser General Public License for more details.                        *
14
 
 *                                                                          *
15
 
 *   You should have received a copy of the GNU General Public License      *
16
 
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
17
 
 ***************************************************************************/
18
 
#ifndef VIDEOCODECMODEL_H
19
 
#define VIDEOCODECMODEL_H
20
 
 
21
 
#include "typedefs.h"
22
 
#include <QtCore/QAbstractListModel>
23
 
 
24
 
//Qt
25
 
 
26
 
//SFLPhone
27
 
class Account;
28
 
 
29
 
//Typedef
30
 
class VideoCodec;
31
 
typedef QHash<QString,VideoCodec*> CodecHash;
32
 
 
33
 
///Abstract model for managing account video codec list
34
 
class LIB_EXPORT VideoCodecModel : public QAbstractListModel {
35
 
   #pragma GCC diagnostic push
36
 
   #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
37
 
   Q_OBJECT
38
 
   #pragma GCC diagnostic pop
39
 
 
40
 
public:
41
 
   //Private constructor, can only be called by 'Account'
42
 
   explicit VideoCodecModel(Account* account = nullptr);
43
 
 
44
 
   //Roles
45
 
   static const int BITRATE_ROLE = 101;
46
 
 
47
 
   //Model functions
48
 
   QVariant      data     ( const QModelIndex& index, int role = Qt::DisplayRole     ) const;
49
 
   int           rowCount ( const QModelIndex& parent = QModelIndex()                ) const;
50
 
   Qt::ItemFlags flags    ( const QModelIndex& index                                 ) const;
51
 
   virtual bool  setData  ( const QModelIndex& index, const QVariant &value, int role)      ;
52
 
 
53
 
   void reload();
54
 
   void save();
55
 
   bool moveUp  (QModelIndex idx);
56
 
   bool moveDown(QModelIndex idx);
57
 
   
58
 
private:
59
 
   //Attrbutes
60
 
   QList<VideoCodec*> m_lCodecs;
61
 
   Account*           m_pAccount;
62
 
};
63
 
Q_DECLARE_METATYPE(VideoCodecModel*)
64
 
#endif