summaryrefslogtreecommitdiff
path: root/noncore/net/mail/composemail.h
blob: 604c8624c08dcedf4091236a22b0ae7983b2a08e (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
#ifndef COMPOSEMAIL_H
#define COMPOSEMAIL_H

#include <qlineedit.h>
#include <qlistview.h>

#include "composemailui.h"
#include "addresspickerui.h"
#include <libmailwrapper/settings.h>
#include <libmailwrapper/mailwrapper.h>



class AddressPicker : public AddressPickerUI
{
	Q_OBJECT

public:
	AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 );
	static QString getNames();

protected:
	QString selectedNames;
	void accept();

};


class ComposeMail : public ComposeMailUI
{
    Q_OBJECT
    
public:
    ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 );

public slots:
    void slotAdjustColumns();

    void setTo( const QString & to );
    void setSubject( const QString & subject );
    void setInReplyTo( const QString & messageId );
    void setMessage( const QString & text );

protected slots:
    void accept();
    
private slots:
    void fillValues( int current );
    void pickAddress( QLineEdit *line );
    void pickAddressTo();
    void pickAddressCC();
    void pickAddressBCC();
    void pickAddressReply();
    void addAttachment();
    void removeAttachment();



private:
    Settings *settings;
    QList<SMTPaccount> smtpAccounts;

};

class AttachViewItem : public QListViewItem
{
public:	
    AttachViewItem( QListView *parent, Attachment *att );
	Attachment *getAttachment() { return attachment; }

private:
	Attachment *attachment;

};

#endif