summaryrefslogtreecommitdiffstats
path: root/src/gui/messageform.h
blob: 8cf9037b7be5b1f373bf1a7f8e5cc78029b56f52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef MESSAGEFORM_H
#define MESSAGEFORM_H
#include <textbrowsernoautolink.h>
#include "getaddressform.h"
#include "im/msg_session.h"
#include "phone.h"
#include <Qt3Support/Q3PopupMenu>
#include <QtGui/QLabel>
#include <QtCore/QStringRef>
#include "textbrowsernoautolink.h"
#include "user.h"
#include "ui_messageform.h"
#include <Q3MainWindow>

class t_phone;
extern t_phone *phone;

class MessageForm : public Q3MainWindow, public Ui::MessageForm
{
	Q_OBJECT

public:
	MessageForm(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags fl = Qt::WType_TopLevel);
	~MessageForm();

	virtual bool updateMessageSession();
	virtual bool prepareSendMessage();

public slots:
	virtual void closeEvent( QCloseEvent * e );
	virtual void show();
	virtual void selectUserConfig( t_user * user_config );
	virtual void showAddressBook();
	virtual void selectedAddress( const QString & address );
	virtual void sendMessage();
	virtual void sendFile( const QString & filename, const QString & subject );
	virtual void addMessage( const im::t_msg & msg, const QString & name );
	virtual void displayError( const QString & errorMsg );
	virtual void displayDeliveryNotification( const QString & notification );
	virtual void setRemotePartyCaption( void );
	virtual void showAttachmentPopupMenu( const QString & attachment );
	virtual void attachmentPopupActivated( int id );
	virtual void saveAttachment();
	virtual void chooseFileToSend();
	virtual void setComposingIndication( const QString & name );
	virtual void clearComposingIndication();
	virtual void setLocalComposingIndicationActive();
	virtual void keyPressEvent( QKeyEvent * e );
	virtual void toAddressChanged( const QString & address );
	virtual void showMessageSize();

protected:
	im::t_msg_session *_msgSession;

protected slots:
	virtual void languageChange();

private:
	QDialog *_saveAsDialog;
	map<string, string> _filenameMap;
	bool _remotePartyComplete;
	GetAddressForm *_getAddressForm;
	Q3PopupMenu *attachmentPopupMenu;
	QString clickedAttachment;
	void *_serviceMap;
	QLabel *_isComposingLabel;
	QLabel *_msgSizeLabel;

	void init();
	void destroy();

};


#endif