| 1 | /* |
|---|
| 2 | * WengoPhone, a voice over Internet phone |
|---|
| 3 | * Copyright (C) 2004-2007 Wengo |
|---|
| 4 | * |
|---|
| 5 | * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | * it under the terms of the GNU General Public License as published by |
|---|
| 7 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | * (at your option) any later version. |
|---|
| 9 | * |
|---|
| 10 | * This program 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 |
|---|
| 13 | * GNU 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, write to the Free Software |
|---|
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 18 | */ |
|---|
| 19 | |
|---|
| 20 | #ifndef OWQTCHATLOGVIEWER_H |
|---|
| 21 | #define OWQTCHATLOGVIEWER_H |
|---|
| 22 | |
|---|
| 23 | #include <QtGui/QMainWindow> |
|---|
| 24 | |
|---|
| 25 | class ContactProfile; |
|---|
| 26 | |
|---|
| 27 | class QtWengoPhone; |
|---|
| 28 | |
|---|
| 29 | class QAction; |
|---|
| 30 | class QString; |
|---|
| 31 | class QStringList; |
|---|
| 32 | namespace Ui { class ChatLogViewer; } |
|---|
| 33 | |
|---|
| 34 | /** |
|---|
| 35 | * Shows saved chat logs |
|---|
| 36 | * |
|---|
| 37 | * @ingroup presentation |
|---|
| 38 | * @author Xavier Desjardins |
|---|
| 39 | */ |
|---|
| 40 | class QtChatLogViewer : public QMainWindow { |
|---|
| 41 | Q_OBJECT |
|---|
| 42 | public: |
|---|
| 43 | |
|---|
| 44 | QtChatLogViewer(QWidget * parent, QtWengoPhone & qtWengoPhone, QString log); |
|---|
| 45 | |
|---|
| 46 | ~QtChatLogViewer(); |
|---|
| 47 | |
|---|
| 48 | public Q_SLOTS: |
|---|
| 49 | |
|---|
| 50 | void contactChangedEventSlot(QString contactId); |
|---|
| 51 | |
|---|
| 52 | void callContact(); |
|---|
| 53 | |
|---|
| 54 | void sendSmsToContact(); |
|---|
| 55 | |
|---|
| 56 | void sendFileToContact(); |
|---|
| 57 | |
|---|
| 58 | void createChatConference(); |
|---|
| 59 | |
|---|
| 60 | void showContactInfo(); |
|---|
| 61 | |
|---|
| 62 | void restartChat(); |
|---|
| 63 | |
|---|
| 64 | void saveChatHistory(); |
|---|
| 65 | |
|---|
| 66 | private: |
|---|
| 67 | |
|---|
| 68 | bool canDoFileTransfer(const ContactProfile & contactProfile); |
|---|
| 69 | |
|---|
| 70 | void setupMenuBarActions(); |
|---|
| 71 | |
|---|
| 72 | void setupToolBarActions(); |
|---|
| 73 | |
|---|
| 74 | void updateToolBarActions(); |
|---|
| 75 | |
|---|
| 76 | /** |
|---|
| 77 | * Finds an QAction and copies its properties to another QAction. |
|---|
| 78 | * Code factorization. |
|---|
| 79 | * |
|---|
| 80 | * @param actionParent where to find the original QAction |
|---|
| 81 | * @param action QAction to modify |
|---|
| 82 | */ |
|---|
| 83 | static void copyQAction(QObject * actionParent, QAction * action); |
|---|
| 84 | |
|---|
| 85 | QtWengoPhone & _qtWengoPhone; |
|---|
| 86 | |
|---|
| 87 | QStringList _cuuidList; |
|---|
| 88 | |
|---|
| 89 | Ui::ChatLogViewer * _ui; |
|---|
| 90 | }; |
|---|
| 91 | |
|---|
| 92 | #endif //OWQTCHATLOGVIEWER_H |
|---|
| 93 | |
|---|