Debian Codegraph @

src/emailDialog.cpp

raw symbols SCIP
1 /* ---------------------------------- emailDialog.cpp ---------------------------------------------------------------------------
2 // Class to echedule an email report after a profile execution
3
4 ===============================================================================================================================
5 ===============================================================================================================================
6 This file is part of "luckyBackup" project
7 Copyright, Loukas Avgeriou
8 luckyBackup is distributed under the terms of the GNU General Public License
9 luckyBackup is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 luckyBackup is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with luckyBackup. If not, see <http://www.gnu.org/licenses/>.
21
22
23 project version : Please see "main.cpp" for project version
24
25 developer : luckyb
26 last modified : 22 May 2016
27 ===============================================================================================================================
28 ===============================================================================================================================
29 */
30
31 #include "emailDialog.h"cxx . . $ `<file>/src/emailDialog.h`/
32
33 #include <QSignalMapper>
34
35 #include "textDialog.h"cxx . . $ `<file>/src/textDialog.h`/
36 #include "global.h"cxx . . $ `<file>/src/global.h`/
37
38 // class emailDialog Constructor===============================================================================================
39 // Displays a dialog to schedule email reports
40 emailDialogcxx . . $ emailDialog#::emailDialogcxx . . $ emailDialog#emailDialog(d194de0c0f68c28b). (QDialogcxx . . $ QDialog# *parent) : QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d). (parent)
41 {
42 uiEcxx . . $ emailDialog#uiE..setupUicxx . . $ Ui_emailDialog#setupUi(d194de0c0f68c28b).(this);
43
44 fillWindowcxx . . $ emailDialog#fillWindow(49f6e7a06ebc5aa8).();
45
46 //connect okay & cancel pushButton SLOTs ----------------
47 connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiEcxx . . $ emailDialog#uiE..pushButton_okcxx . . $ Ui_emailDialog#pushButton_ok., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( okay() ) );
48 connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiEcxx . . $ emailDialog#uiE..pushButton_cancelcxx . . $ Ui_emailDialog#pushButton_cancel., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( cancel() ) );
49 connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiEcxx . . $ emailDialog#uiE..pushButton_testcxx . . $ Ui_emailDialog#pushButton_test., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( emailTest() ) );
50 connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiEcxx . . $ emailDialog#uiE..lineEdit_commandcxx . . $ Ui_emailDialog#lineEdit_command., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( textEdited(QString) ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( enableTLS() ) );
51 connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uiEcxx . . $ emailDialog#uiE..checkBox_disable_tlscxx . . $ Ui_emailDialog#checkBox_disable_tls., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( stateChanged(int) ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( enableTLS() ) );
52
53 //Connect all "revert to default" toolButtons with the revertDefault SLOT
54 //Map all the toolButton signals and transmit a different integer depending on the toolbutton
55 QSignalMappercxx . . $ QSignalMapper# *signalMapper1 = new QSignalMappercxx . . $ QSignalMapper#(this);
56 signalMapper1 -> setMappingcxx . . $ QSignalMapper#setMapping(3f47e595a91bc133). ( uiEcxx . . $ emailDialog#uiE..toolButton_default_commandcxx . . $ Ui_emailDialog#toolButton_default_command., 0 );
57 connectcxx . . $ QObject#connect(158df1d9a01a3410). (uiEcxx . . $ emailDialog#uiE..toolButton_default_commandcxx . . $ Ui_emailDialog#toolButton_default_command., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), signalMapper1 , SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`! (map()));
58 signalMapper1 -> setMappingcxx . . $ QSignalMapper#setMapping(3f47e595a91bc133). ( uiEcxx . . $ emailDialog#uiE..toolButton_default_subjectcxx . . $ Ui_emailDialog#toolButton_default_subject., 1 );
59 connectcxx . . $ QObject#connect(158df1d9a01a3410). (uiEcxx . . $ emailDialog#uiE..toolButton_default_subjectcxx . . $ Ui_emailDialog#toolButton_default_subject., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), signalMapper1 , SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`! (map()));
60 signalMapper1 -> setMappingcxx . . $ QSignalMapper#setMapping(3f47e595a91bc133). ( uiEcxx . . $ emailDialog#uiE..toolButton_default_bodycxx . . $ Ui_emailDialog#toolButton_default_body., 2 );
61 connectcxx . . $ QObject#connect(158df1d9a01a3410). (uiEcxx . . $ emailDialog#uiE..toolButton_default_bodycxx . . $ Ui_emailDialog#toolButton_default_body., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), signalMapper1 , SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`! (map()));
62 connectcxx . . $ QObject#connect(158df1d9a01a3410).(signalMapper1, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(mapped( const int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( revertDefault( const int) ) );
63
64 GoOncxx . . $ emailDialog#GoOn. = 0;
65 }
66
67 // SLOTS-------------------------------------------------------------------------------------
68 // --------------------------------okay pressed------------------------------------------------
69 void emailDialogcxx . . $ emailDialog#::okaycxx . . $ emailDialog#okay(49f6e7a06ebc5aa8).()
70 {
71 GoOncxx . . $ emailDialog#GoOn. = 0; // ok pressed -> Everything good
72 fillVariablescxx . . $ emailDialog#fillVariables(49f6e7a06ebc5aa8).();
73
74 if (!checkFieldscxx . . $ emailDialog#checkFields(c9857a73d68e59ba).())
75 {
76 textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., warningMessagecxx . . $ QString#QString(132dd6869045752b)., this);
77 textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).();
78 return; // do not proceed if something is wrong with the fields
79 }
80
81
82 closecxx . . $ QWidget#close(c9857a73d68e59ba).(); //emmit a QcloseEvent
83 }
84
85 // --------------------------------cancel pressed------------------------------------------------
86 void emailDialogcxx . . $ emailDialog#::cancelcxx . . $ emailDialog#cancel(49f6e7a06ebc5aa8).()
87 {
88 GoOncxx . . $ emailDialog#GoOn. = 1; // cancel pressed
89
90 closecxx . . $ QWidget#close(c9857a73d68e59ba).(); //emmit a QcloseEvent
91 }
92
93 // -------------------------------- closeEvent emitted --------------------------------
94 void emailDialogcxx . . $ emailDialog#::closeEventcxx . . $ emailDialog#closeEvent(642e80679aeb34f8).(QCloseEventcxx . . $ QCloseEvent# *event)
95 {
96 event -> acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).();
97 }
98
99 // revertDefault ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100 //SLOT to revert a field to the default value
101 void emailDialogcxx . . $ emailDialog#::revertDefaultcxx . . $ emailDialog#revertDefault(d4f767463ce0a6b3).(const int field)
102 {
103 switch (field)
104 {
105 //command
106 case 0:
107 if (WINrunningcxx . . $ Global/WINrunning.)
108 {
109 uiEcxx . . $ emailDialog#uiE..lineEdit_commandcxx . . $ Ui_emailDialog#lineEdit_command. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailDefaultWinCommandcxx . . $ Global/emailDefaultWinCommand.);
110 uiEcxx . . $ emailDialog#uiE..lineEdit_argumentscxx . . $ Ui_emailDialog#lineEdit_arguments. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailDefaultWinArgumentscxx . . $ Global/emailDefaultWinArguments.);
111 }
112 else
113 {
114 uiEcxx . . $ emailDialog#uiE..lineEdit_commandcxx . . $ Ui_emailDialog#lineEdit_command. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailDefaultCommandcxx . . $ Global/emailDefaultCommand.);
115 uiEcxx . . $ emailDialog#uiE..lineEdit_argumentscxx . . $ Ui_emailDialog#lineEdit_arguments. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailDefaultArgumentscxx . . $ Global/emailDefaultArguments.);
116 }
117 break;
118 //subject
119 case 1:
120 uiEcxx . . $ emailDialog#uiE..lineEdit_arg_subjectcxx . . $ Ui_emailDialog#lineEdit_arg_subject. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailDefaultSubjectcxx . . $ Global/emailDefaultSubject.);
121 break;
122 //body text
123 case 2:
124 uiEcxx . . $ emailDialog#uiE..textBrowser_arg_bodycxx . . $ Ui_emailDialog#textBrowser_arg_body. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(emailDefaultBodycxx . . $ Global/emailDefaultBody.);
125 break;
126 }
127 enableTLScxx . . $ emailDialog#enableTLS(49f6e7a06ebc5aa8).();
128 }
129
130 // Check if all fields are ok
131 bool emailDialogcxx . . $ emailDialog#::checkFieldscxx . . $ emailDialog#checkFields(c9857a73d68e59ba).()
132 {
133 bool returnVal = true;
134 if (uiEcxx . . $ emailDialog#uiE..checkBox_conditionNevercxx . . $ Ui_emailDialog#checkBox_conditionNever.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) // if the never condition is checked, just return. No email will be sent anyway
135 return returnVal;
136
137 warningMessagecxx . . $ emailDialog#warningMessage. =cxx . . $ QString#`operator=`(d02845eef0c33901). "";
138
139 if (uiEcxx . . $ emailDialog#uiE..lineEdit_commandcxx . . $ Ui_emailDialog#lineEdit_command. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).() ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "")
140 {
141 warningMessagecxx . . $ emailDialog#warningMessage..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ emailDialog#tr(75d9f1c324b4579d).("The command field is empty") +cxx . . $ operator+(3d22f08efddf8107). "!! \n");
142 returnVal = false;
143 }
144
145 /* This is commented because a command with no arguments (eg a script) is possible to be used
146 if (uiE.lineEdit_arguments -> text() == "")
147 {
148 warningMessage.append(tr("The command arguments field is empty") + "!! \n");
149 returnVal = false;
150 }*/
151
152 return returnVal ;
153 }
154
155 // fillWindow
156 // Fill gui fields from variables
157 void emailDialogcxx . . $ emailDialog#::fillWindowcxx . . $ emailDialog#fillWindow(49f6e7a06ebc5aa8).()
158 {
159 uiEcxx . . $ emailDialog#uiE..lineEdit_commandcxx . . $ Ui_emailDialog#lineEdit_command. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailCommandcxx . . $ Global/emailCommand.);
160 uiEcxx . . $ emailDialog#uiE..lineEdit_argumentscxx . . $ Ui_emailDialog#lineEdit_arguments. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailArgumentscxx . . $ Global/emailArguments.);
161 uiEcxx . . $ emailDialog#uiE..lineEdit_arg_fromcxx . . $ Ui_emailDialog#lineEdit_arg_from. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailFromcxx . . $ Global/emailFrom.);
162 uiEcxx . . $ emailDialog#uiE..lineEdit_arg_tocxx . . $ Ui_emailDialog#lineEdit_arg_to. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailTocxx . . $ Global/emailTo.);
163 uiEcxx . . $ emailDialog#uiE..lineEdit_arg_subjectcxx . . $ Ui_emailDialog#lineEdit_arg_subject. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailSubjectcxx . . $ Global/emailSubject.);
164 uiEcxx . . $ emailDialog#uiE..lineEdit_arg_smtpcxx . . $ Ui_emailDialog#lineEdit_arg_smtp. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(emailSMTPcxx . . $ Global/emailSMTP.);
165 uiEcxx . . $ emailDialog#uiE..textBrowser_arg_bodycxx . . $ Ui_emailDialog#textBrowser_arg_body. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(emailBodycxx . . $ Global/emailBody.);
166 uiEcxx . . $ emailDialog#uiE..checkBox_conditionNevercxx . . $ Ui_emailDialog#checkBox_conditionNever. -> setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(emailNevercxx . . $ Global/emailNever.);
167 uiEcxx . . $ emailDialog#uiE..checkBox_conditionErrorcxx . . $ Ui_emailDialog#checkBox_conditionError. -> setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(emailErrorcxx . . $ Global/emailError.);
168 uiEcxx . . $ emailDialog#uiE..checkBox_conditionSchedulecxx . . $ Ui_emailDialog#checkBox_conditionSchedule. -> setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(emailSchedulecxx . . $ Global/emailSchedule.);
169 uiEcxx . . $ emailDialog#uiE..checkBox_disable_tlscxx . . $ Ui_emailDialog#checkBox_disable_tls. -> setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(emailTLScxx . . $ Global/emailTLS.);
170 enableTLScxx . . $ emailDialog#enableTLS(49f6e7a06ebc5aa8).();
171 }
172
173 // fillVariables
174 // Fill variables from gui fields
175 void emailDialogcxx . . $ emailDialog#::fillVariablescxx . . $ emailDialog#fillVariables(49f6e7a06ebc5aa8).()
176 {
177 emailCommandcxx . . $ Global/emailCommand. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). uiEcxx . . $ emailDialog#uiE..lineEdit_commandcxx . . $ Ui_emailDialog#lineEdit_command. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).();
178 emailArgumentscxx . . $ Global/emailArguments. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). uiEcxx . . $ emailDialog#uiE..lineEdit_argumentscxx . . $ Ui_emailDialog#lineEdit_arguments. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).();
179 emailFromcxx . . $ Global/emailFrom. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). uiEcxx . . $ emailDialog#uiE..lineEdit_arg_fromcxx . . $ Ui_emailDialog#lineEdit_arg_from. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).();
180 emailTocxx . . $ Global/emailTo. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). uiEcxx . . $ emailDialog#uiE..lineEdit_arg_tocxx . . $ Ui_emailDialog#lineEdit_arg_to. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).();
181 emailSubjectcxx . . $ Global/emailSubject. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). uiEcxx . . $ emailDialog#uiE..lineEdit_arg_subjectcxx . . $ Ui_emailDialog#lineEdit_arg_subject. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).();
182 if (WINrunningcxx . . $ Global/WINrunning.)
183 {
184 QStringListcxx . . $ QStringList# smtpSrv = (uiEcxx . . $ emailDialog#uiE..lineEdit_arg_smtpcxx . . $ Ui_emailDialog#lineEdit_arg_smtp. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).()).splitcxx . . $ QString#split(c8b44a97dcb6200d).(":"cxx . . $ QString#QString(85c52e162fed56f9).);
185 emailSMTPcxx . . $ Global/emailSMTP. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). smtpSrv.firstcxx . . $ QList#first(19b2b6f17af048b).();
186 QStringcxx . . $ QString# smtpPort = "25"cxx . . $ QString#QString(85c52e162fed56f9).;
187 if (smtpSrv.lengthcxx . . $ QList#length(455f465bc33b4cdf).()>1)
188 smtpPort=cxx . . $ QString#`operator=`(b79fde0b0ce9b948).smtpSrv.atcxx . . $ QList#at(e2681f9bb6b2f357).(1);
189 //QString smtpUser = uiE.lineEdit_arg_smtp_user->text(); // security issues ?
190 //QString smtpPass = uiE.lineEdit_arg_smtp_pass->text(); // security issues ?
191 }
192 else
193 emailSMTPcxx . . $ Global/emailSMTP. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). uiEcxx . . $ emailDialog#uiE..lineEdit_arg_smtpcxx . . $ Ui_emailDialog#lineEdit_arg_smtp. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).();
194 emailBodycxx . . $ Global/emailBody. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). uiEcxx . . $ emailDialog#uiE..textBrowser_arg_bodycxx . . $ Ui_emailDialog#textBrowser_arg_body. -> toPlainTextcxx . . $ QTextEdit#toPlainText(6ef7b6c27b00b43d).();
195 emailNevercxx . . $ Global/emailNever. = uiEcxx . . $ emailDialog#uiE..checkBox_conditionNevercxx . . $ Ui_emailDialog#checkBox_conditionNever. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).();
196 emailErrorcxx . . $ Global/emailError. = uiEcxx . . $ emailDialog#uiE..checkBox_conditionErrorcxx . . $ Ui_emailDialog#checkBox_conditionError. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).();
197 emailSchedulecxx . . $ Global/emailSchedule. = uiEcxx . . $ emailDialog#uiE..checkBox_conditionSchedulecxx . . $ Ui_emailDialog#checkBox_conditionSchedule. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).();
198 emailTLScxx . . $ Global/emailTLS. = uiEcxx . . $ emailDialog#uiE..checkBox_disable_tlscxx . . $ Ui_emailDialog#checkBox_disable_tls. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).();
199
200 // Windows TESTING purposes for Juan TESTING~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
201 /* if (WINrunning)
202 {
203 // Execute the email command
204 QProcess *emailProcess; emailProcess = new QProcess;
205 emailProcess -> setProcessChannelMode(QProcess::MergedChannels);
206 QDir::setCurrent(luckyBackupDir);
207 emailProcess -> setWorkingDirectory(luckyBackupDir);
208 QStringList args;
209 if (!smtpUser.isEmpty() && !smtpPass.isEmpty())
210 {
211 args << "-install" << emailSMTP << emailFrom <<"2" << smtpPort <<"-" << smtpUser << smtpPass;
212 emailProcess -> start ("blat.exe",args);
213 emailProcess -> waitForFinished(10000);
214 }
215
216 // Build the return string ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
217 //QString errorOccured = emailProcess -> errorString();
218 }*/
219 // WINDOWS TESTING END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
220 }
221
222 // emailTest
223 // Send an email now, using current gui field values
224 void emailDialogcxx . . $ emailDialog#::emailTestcxx . . $ emailDialog#emailTest(49f6e7a06ebc5aa8).()
225 {
226 fillVariablescxx . . $ emailDialog#fillVariables(49f6e7a06ebc5aa8).();
227
228 if (!checkFieldscxx . . $ emailDialog#checkFields(c9857a73d68e59ba).())
229 {
230 textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., warningMessagecxx . . $ QString#QString(132dd6869045752b)., this);
231 textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).();
232 return; // do not proceed if something is wrong with the fields (eg command is empty)
233 }
234
235 warningMessagecxx . . $ emailDialog#warningMessage. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). sendEmailNowcxx . . $ Global/sendEmailNow(f4d483874300e612).(true);
236
237 textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("emailOutput"cxx . . $ QString#QString(85c52e162fed56f9).,warningMessagecxx . . $ QString#QString(132dd6869045752b)., this);
238 textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).();
239 }
240
241 // enableTLS
242 // enable/disable the TLS option
243 void emailDialogcxx . . $ emailDialog#::enableTLScxx . . $ emailDialog#enableTLS(49f6e7a06ebc5aa8).()
244 {
245 QStringcxx . . $ QString# tlsArgument= "-o tls=no"cxx . . $ QString#QString(85c52e162fed56f9).;
246 QStringcxx . . $ QString# tempEmailArguments = uiEcxx . . $ emailDialog#uiE..lineEdit_argumentscxx . . $ Ui_emailDialog#lineEdit_arguments. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).();
247 tempEmailArguments.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(tlsArgument +cxx . . $ operator+(3d22f08efddf8107)." ");
248 tempEmailArguments.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). tlsArgument);
249
250 //hide or show the "disable TLS" option if "sendemail" is used as command
251 if (uiEcxx . . $ emailDialog#uiE..lineEdit_commandcxx . . $ Ui_emailDialog#lineEdit_command. -> textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).() ==cxx . . $ `operator==`(5bc2975d2d751687). emailDefaultCommandcxx . . $ Global/emailDefaultCommand.)
252 {
253 uiEcxx . . $ emailDialog#uiE..checkBox_disable_tlscxx . . $ Ui_emailDialog#checkBox_disable_tls. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true);
254 if (uiEcxx . . $ emailDialog#uiE..checkBox_disable_tlscxx . . $ Ui_emailDialog#checkBox_disable_tls. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).())
255 tempEmailArguments.prependcxx . . $ QString#prepend(6a89d0b7f4d2681c).(tlsArgument +cxx . . $ operator+(3d22f08efddf8107). " ");
256 }
257 else
258 uiEcxx . . $ emailDialog#uiE..checkBox_disable_tlscxx . . $ Ui_emailDialog#checkBox_disable_tls. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false);
259
260 uiEcxx . . $ emailDialog#uiE..lineEdit_argumentscxx . . $ Ui_emailDialog#lineEdit_arguments. -> setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(tempEmailArguments);
261 }
262 // --------------------------------accessors-----------------------------------
263 // Return an integer according to different status
264 int emailDialogcxx . . $ emailDialog#::getGoOncxx . . $ emailDialog#getGoOn(b126dc7c1de90089).()
265 {
266 return GoOncxx . . $ emailDialog#GoOn. ;
267 }
268
269
270 // end of emailDialog.cpp ---------------------------------------------------------------------------
271