-
Notifications
You must be signed in to change notification settings - Fork 4
/
sendmessagesdialog.h
72 lines (56 loc) · 1.45 KB
/
sendmessagesdialog.h
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
#ifndef SENDMESSAGESDIALOG_H
#define SENDMESSAGESDIALOG_H
#include <QDialog>
#include <QString>
namespace Ui {
class SendMessagesDialog;
}
class MessageModel;
class SendMessagesEntry;
class SendMessagesRecipient;
//QT_BEGIN_NAMESPACE
//class QUrl;
//QT_END_NAMESPACE
/** Dialog for sending messages */
class SendMessagesDialog : public QDialog
{
Q_OBJECT
public:
enum Mode {
Encrypted,
Anonymous,
};
enum Type {
Page,
Dialog,
};
explicit SendMessagesDialog(Mode mode, Type type, QWidget *parent = 0);
~SendMessagesDialog();
void setModel (MessageModel *model);
void loadRow(int row);
bool checkMode(Mode mode);
bool validate ();
/** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
*/
QWidget *setupTabChain(QWidget *prev);
void pasteEntry(const SendMessagesRecipient &rv);
public slots:
void done(int retval);
void clear();
void reject();
void accept();
SendMessagesEntry *addEntry();
void updateRemoveEnabled();
private:
Ui::SendMessagesDialog *ui;
MessageModel *model;
bool fNewRecipientAllowed;
Mode mode;
Type type;
private slots:
void on_sendButton_clicked();
void removeEntry(SendMessagesEntry* entry);
void on_addressBookButton_clicked();
void on_pasteButton_clicked();
};
#endif // SENDMESSAGESDIALOG_H