summaryrefslogtreecommitdiffabout
path: root/kmicromail/editaccounts.h
blob: 465780cdf9819c91d8da6c1b3ca53ffe47e08c53 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#ifndef EDITACCOUNTS_H
#define EDITACCOUNTS_H

#include <qstring.h>
#include <qlistview.h>

#include "editaccountsui.h"
#include "selectmailtypeui.h"
#include "imapconfigui.h"
#include "pop3configui.h"
#include "smtpconfigui.h"
#include "nntpconfigui.h"

#include <libetpan/clist.h>
#include <libmailwrapper/settings.h>


class AccountListItem : public QListViewItem
{

public:
    AccountListItem( QListView *parent, Account *a);
    Account *getAccount() { return account; }

private:
    Account *account;

};

class EditAccounts : public EditAccountsUI
{
    Q_OBJECT

public: 
    EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
    
public slots:
    void slotNewAccount( const QString &type );
    void slotEditAccount( Account *account );
    void slotDeleteAccount( Account * account );
    void slotAdjustColumns();

protected slots:
    void slotFillLists();
    void slotNewMail();
    void slotEditMail();
    void slotDeleteMail();
    void slotNewNews();
    void slotEditNews();
    void slotDeleteNews();
    void accept();

private:
    Settings *settings;
    
};

class SelectMailType : public SelectMailTypeUI
{
    Q_OBJECT

public:
    SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );

private slots:
    void slotSelection( const QString &sel );

private:
    QString *selected;

};

class IMAPconfig : public IMAPconfigUI
{
    Q_OBJECT

public:
    IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );

public slots:
    void fillValues();

protected slots:
    void slotConnectionToggle( int index );
    void accept();
 
private:
    IMAPaccount *data;

};

class POP3config : public POP3configUI
{
    Q_OBJECT

public:
    POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
    
public slots:
    void fillValues();

protected slots:
    void slotConnectionToggle( int index );
    void accept();

private:
    POP3account *data;

};

class SMTPconfig : public SMTPconfigUI
{
    Q_OBJECT

public:
    SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );

public slots:
    void fillValues();

protected slots:
    void slotConnectionToggle( int index );
    void accept();
    void chooseSig();

private:
    SMTPaccount *data;

};

class NNTPconfig : public NNTPconfigUI
{
    Q_OBJECT

public:
    NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );

public slots:
    void fillValues();

protected slots:
    void slotSSL( bool enabled );
    void accept();
    void slotGetNG();
    void slotShowSub();
    void slotShowFilter();

private:
    QStringList subscribedGroups;
    QStringList allGroups;
    void save();
    NNTPaccount *data;
    clist* list;

};

#endif