~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to kde/src/sflphone.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
 *   Copyright (C) 2009-2013 by Savoir-Faire Linux                         *
 
2
 *   Copyright (C) 2009-2014 by Savoir-Faire Linux                         *
3
3
 *   Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>         *
4
4
 *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
5
5
 *                                                                         *
21
21
#define SFLPHONE_H
22
22
 
23
23
#include <KXmlGuiWindow>
24
 
#include <lib/callmodel.h>
25
24
 
26
25
//Qt
27
26
class QString;
28
27
class QLabel;
29
 
class QTreeWidgetItem;
30
 
class QActionGroup;
 
28
class QToolButton;
31
29
 
32
30
//KDE
33
 
class KAction;
34
31
class KComboBox;
35
32
 
36
33
//SFLPhone
41
38
class SFLPhoneTray;
42
39
class SFLPhoneView;
43
40
class HistoryDock;
44
 
class CallTreeItem;
45
41
class VideoRenderer;
46
 
class ExtendedAction;
 
42
class AccountListNoCheckProxyModel;
 
43
class Account;
47
44
 
48
 
typedef CallModel<CallTreeItem*,QTreeWidgetItem*> TreeWidgetCallModel;
49
45
 
50
46
/**
51
47
 * This class represents the SFLphone main window
60
56
 * @short Main window
61
57
 * @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>
62
58
 * @author Emmanuel Lepage <emmanuel.lepage@savoirfairelinux.com>
63
 
 * @version 1.2.3
 
59
 * @version 1.3.0
64
60
**/
65
61
class SFLPhone : public KXmlGuiWindow
66
62
{
79
75
 
80
76
private:
81
77
   //Attributes
82
 
   bool   m_pInitialized;
83
 
   ExtendedAction* action_accept         ;
84
 
   ExtendedAction* action_refuse         ;
85
 
   ExtendedAction* action_hold           ;
86
 
   ExtendedAction* action_transfer       ;
87
 
   ExtendedAction* action_record         ;
88
 
   ExtendedAction* action_mute           ;
89
 
   ExtendedAction* action_hangup         ;
90
 
   ExtendedAction* action_unhold         ;
91
 
   ExtendedAction* action_pickup         ;
92
 
   KAction* action_mailBox               ;
93
 
   KAction* action_close                 ;
94
 
   KAction* action_quit                  ;
95
 
   KAction* action_displayVolumeControls ;
96
 
   KAction* action_displayDialpad        ;
97
 
   KAction* action_displayMessageBox     ;
98
 
   KAction* action_configureSflPhone     ;
99
 
   KAction* action_configureShortcut     ;
100
 
   KAction* action_accountCreationWizard ;
101
 
   KAction* action_pastenumber           ;
102
 
   KAction* action_showContactDock       ;
103
 
   KAction* action_showHistoryDock       ;
104
 
   KAction* action_showBookmarkDock      ;
105
 
   KAction* action_editToolBar           ;
106
 
   QActionGroup* action_screen           ;
107
 
 
 
78
   bool           m_pInitialized     ;
108
79
   SFLPhoneView*  m_pView            ;
109
80
   bool           m_pIconChanged     ;
110
81
   SFLPhoneTray*  m_pTrayIcon        ;
117
88
   #ifdef ENABLE_VIDEO
118
89
   VideoDock*     m_pVideoDW         ;
119
90
   #endif
 
91
   QToolButton*   m_pPresent         ;
 
92
   QDockWidget*   m_pPresenceDock    ;
120
93
 
121
94
   static SFLPhone*            m_sApp;
122
 
   static TreeWidgetCallModel* m_pModel;
 
95
   AccountListNoCheckProxyModel* m_pAccountModel;
123
96
 
124
97
   //Setters
125
98
   void setObjectNames();
126
99
 
127
100
protected:
128
101
   virtual bool  queryClose (                )      ;
129
 
   virtual void  changeEvent( QEvent * event )      ;
130
102
   virtual QSize sizeHint   (                ) const;
131
103
 
132
104
 
134
106
   explicit SFLPhone(QWidget *parent = 0);
135
107
   ~SFLPhone                       ();
136
108
   bool             initialize     ();
137
 
   void             setupActions   ();
138
 
   void             trayIconSignal ();
139
 
   QList<QAction *> getCallActions ();
140
109
 
141
110
   friend class SFLPhoneView;
142
111
 
143
112
   static SFLPhone*            app   ();
144
 
   static TreeWidgetCallModel* model ();
145
 
   SFLPhoneView*               view  ();
 
113
   static SFLPhoneView*        view  ();
146
114
 
147
115
   ContactDock*  contactDock ();
148
116
   HistoryDock*  historyDock ();
149
117
   BookmarkDock* bookmarkDock();
150
118
 
151
 
   ExtendedAction* getHoldAction    () { return action_hold;     }
152
 
   ExtendedAction* getRecordAction  () { return action_record;   }
153
 
   ExtendedAction* getRefuseAction  () { return action_refuse;   }
154
 
   ExtendedAction* getMuteAction    () { return action_mute;     }
155
 
   ExtendedAction* getHangupAction  () { return action_hangup;   }
156
 
   ExtendedAction* getUnholdAction  () { return action_unhold;   }
157
 
   ExtendedAction* getTransferAction() { return action_transfer; }
158
 
   ExtendedAction* getPickupAction  () { return action_pickup;   }
159
 
 
160
119
private Q_SLOTS:
161
 
   void on_m_pView_statusMessageChangeAsked      ( const QString& message               );
162
120
   void on_m_pView_windowTitleChangeAsked        ( const QString& message               );
163
121
   void on_m_pView_enabledActionsChangeAsked     ( const bool*    enabledActions        );
164
122
   void on_m_pView_actionIconsChangeAsked        ( const QString* actionIcons           );
168
126
   void on_m_pView_incomingCall                  ( const Call*    call                  );
169
127
   void currentAccountIndexChanged               ( int newIndex                         );
170
128
   void currentPriorAccountChanged               ( Account* newPrior                    );
171
 
   void showShortCutEditor                       (                                      );
172
129
   void quitButton                               (                                      );
173
130
   void updateTabIcons                           (                                      );
174
 
   void addMacro                                 ( KAction* newAction                   );
175
 
   void editToolBar                              (                                      );
 
131
   void updatePresence                           ( const QString& status                );
 
132
   void hidePresenceDock                         (                                      );
176
133
   #ifdef ENABLE_VIDEO
177
134
   void displayVideoDock                         ( VideoRenderer* r                     );
178
135
   #endif
179
136
 
180
137
public Q_SLOTS:
181
138
   void timeout                                  (                                      );
 
139
   void selectCallTab                            (                                      );
182
140
};
183
141
 
184
142
#endif