2 #include "ui_jasmine_main.h"
3 #include "memberlist.h"
4 #include "settingdialog.h"
6 #include "../settings.h"
7 #include "../validator/ipaddressvalidator.h"
8 #include "../network/tcpnetwork.h"
10 using namespace structures;
11 using namespace network;
13 class mainWindow:public QMainWindow,private Ui::MainWindow{
19 //These functions work automatically by automatic connection.
20 void on_sendButton_clicked();
21 void on_runServerAction_triggered(bool);
22 void on_serverSettingAction_triggered();
23 void on_clientSettingAction_triggered();
24 void on_miscAction_triggered();
25 void on_sendFileAction_triggered();
26 void on_aboutAction_triggered();
27 void on_openMemberListAction_triggered();
28 void on_saveLogAction_triggered();
29 void on_saveMemberListAction_triggered();
30 void on_actionExit_triggered();
31 void on_clearAction_triggered();
32 void on_addButton_clicked();
33 void on_removeButton_clicked();
34 void on_saveConfigAction_triggered();
35 void on_openConfigAction_triggered();
36 //This function works manually.
37 void settingDialog_accepted();
38 //These are for saving stuff.
39 void saveConfig(const QString &);
40 void saveMember(const QString &);
41 void saveLog(const QString &);
43 void linkClicked(const QUrl &);
44 //These slots are for receiveText.
45 void invalidLink(const QString &);
46 void selectedLink(const QUrl &);
47 //These functions are for tcpclient.
49 //These functions are for tcpserver.
50 bool tcpserver_pending(const AddressAndPort &);
51 void tcpserver_accepted(const threadedTcpSocket &);
52 void tcpserver_msg_received(const QString &);
54 //These are for opening stuff.
55 void openConfig(const QString &);
56 void openMember(const QString &);
59 void closeEvent(QCloseEvent *);
60 void showEvent(QShowEvent *);
62 QObject *beforesender;
63 QStringList memberFilters,logFilters;
65 MemberList *memberList;
66 RtfEditor *sendTextEditor;
67 tcpServer *mainServer;
68 SettingDialog *settingdialog;
71 bool isInMember(const AddressAndPort &,bool matchIPOnly);
72 void configAndShowSettingDialog(const SettingDialog::tab);
74 settings app_setting() const;