summaryrefslogtreecommitdiffstats
path: root/korn/maildlg.h
blob: 81917bb40f874d31d9e1588bed63d18578751902 (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
76
77
78
79
80
81
82
83
#ifndef KornMailDlg_h
#define KornMailDlg_h

#include<kdialogbase.h>
#include <keditcl.h>

class KornMailSubject;
class KMailDrop;

class TQProgressDialog;
class TQString;

/**
 * KornMailDlg shows the header and (if available) the body of a mail. 
 * If the mails body is not available a button allows the user to load it.
 */
class KornMailDlg : public KDialogBase
{
	Q_OBJECT
  TQ_OBJECT

	/**
	 * Edit control showing the mail (read only)
	 */
	KEdit * _editCtrl;

	/**
	 * The mail to show
	 */
	KornMailSubject * _mailSubject;

	/**
	 * The mailbox which can load the mail fully
	 */
	KMailDrop * _mailDrop;
	
	/**
	 * Flag used during the load process. Set to true if the user clicks the cancel button.
	 */
	bool _loadMailCanceled;
	
	/**
	 * Progress bar
	 */
	TQProgressDialog *_progress;
public:
	/**
	 * KornMailDlg Constructor
	 * @param parent parent widget
	 */
	KornMailDlg( TQWidget *parent=0 );

	/**
	 * Set the mail details to show. The mails body is transfered to the edit control
	 * and the "Full Message" button is enabled, if the mail body is not available and
	 * if the mailbox can load the mail fully.
	 * @param mailDrop maibox which can load the mesage fully
	 * @param mailSubject mail to show
	 */
	void setMailSubject( KornMailSubject * mailSubject);

	/**
	 * KornMailDlg Destructor
	 */
	virtual ~KornMailDlg();

private:
	void deleteProgress();
private slots:
	/**
	 * Slot triggered if the user presses the "Full Message" button
	 */
	void showFullMessage();

	/**
	 * Slot triggered if the user canceles the message loading process
	 */
	void loadMailCanceled();
	
	void readMailReady( TQString* );
};

#endif