fix before first release

fixed english translation,
changed connectivity checkings
add more debugging functions
This commit is contained in:
liranbg 2014-09-27 01:40:02 +03:00
parent 0f6ffb1223
commit b16fc2b792
10 changed files with 583 additions and 515 deletions

View file

@ -6,7 +6,7 @@
QT += core gui network widgets QT += core gui network widgets
CONFIG += qt c++11 static CONFIG += qt c++11
#CONFIG += console static #CONFIG += console static
TARGET = jceManager TARGET = jceManager

BIN
jce_en.qm

Binary file not shown.

107
jce_en.ts
View file

@ -46,8 +46,8 @@
<name>MainScreen</name> <name>MainScreen</name>
<message> <message>
<location filename="main/mainscreen.ui" line="20"/> <location filename="main/mainscreen.ui" line="20"/>
<source>JCE Avg Calculator</source> <source>JCE Manager</source>
<translation>JCE Avg Calculator</translation> <translation>JCE Manager</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.ui" line="86"/> <location filename="main/mainscreen.ui" line="86"/>
@ -148,7 +148,8 @@
</message> </message>
<message> <message>
<location filename="main/mainscreen.ui" line="632"/> <location filename="main/mainscreen.ui" line="632"/>
<source>&lt;p align=&quot;right&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</source> <source>&lt;p align=&quot;center&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</source>
<oldsource>&lt;p align=&quot;right&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</oldsource>
<translation>&lt;p align=&quot;right&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</translation> <translation>&lt;p align=&quot;right&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</translation>
</message> </message>
<message> <message>
@ -192,107 +193,107 @@
<translation>How To</translation> <translation>How To</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="21"/> <location filename="main/mainscreen.cpp" line="23"/>
<source>Ready</source> <source>Ready</source>
<translation>Ready</translation> <translation>Ready</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="132"/> <location filename="main/mainscreen.cpp" line="136"/>
<location filename="main/mainscreen.cpp" line="151"/> <location filename="main/mainscreen.cpp" line="157"/>
<location filename="main/mainscreen.cpp" line="206"/> <location filename="main/mainscreen.cpp" line="212"/>
<location filename="main/mainscreen.cpp" line="234"/> <location filename="main/mainscreen.cpp" line="242"/>
<source>Error</source> <source>Error</source>
<translation>Error</translation> <translation>Error</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="132"/> <location filename="main/mainscreen.cpp" line="136"/>
<source>Invalid Dates. <source>Invalid Dates.
Make Sure everything is correct and try again</source> Make Sure everything is correct and try again</source>
<translation>Invalid dates. Make sure everything is correct and try again</translation> <translation>Invalid dates. Make sure everything is correct and try again</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="151"/> <location filename="main/mainscreen.cpp" line="157"/>
<location filename="main/mainscreen.cpp" line="234"/> <location filename="main/mainscreen.cpp" line="242"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation>Not Connected</translation> <translation>Not Connected</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="206"/> <location filename="main/mainscreen.cpp" line="212"/>
<source>Missmatching data</source> <source>Missmatching data</source>
<translation>Missmatching Data</translation> <translation>Missmatching Data</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="255"/> <location filename="main/mainscreen.cpp" line="264"/>
<source>License:</source> <source>License:</source>
<translation>License:</translation> <translation>License:</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="260"/> <location filename="main/mainscreen.cpp" line="269"/>
<source>Powered By: </source> <source>Powered By: </source>
<oldsource>powered by: </oldsource> <oldsource>powered by: </oldsource>
<translation>Powered By: </translation> <translation>Powered By: </translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="262"/> <location filename="main/mainscreen.cpp" line="271"/>
<source>Developed By</source> <source>Developed By</source>
<translation>Developed By</translation> <translation>Developed By</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="278"/> <location filename="main/mainscreen.cpp" line="287"/>
<source>Help Guide</source> <source>Help Guide</source>
<oldsource>Guide</oldsource> <oldsource>Guide</oldsource>
<translation>Help Guide</translation> <translation>Help Guide</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="264"/> <location filename="main/mainscreen.cpp" line="273"/>
<source>Liran</source> <source>Liran</source>
<translation>Liran Ben Gida</translation> <translation>Liran Ben Gida</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="265"/> <location filename="main/mainscreen.cpp" line="274"/>
<source>Sagi</source> <source>Sagi</source>
<translation>Sagi Dayan</translation> <translation>Sagi Dayan</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="280"/> <location filename="main/mainscreen.cpp" line="289"/>
<source>&lt;br&gt;&lt;li&gt;Login: &lt;ul&gt;&lt;li&gt;Type your username and password and click Login.&lt;/li&gt;&lt;li&gt;Once you are connected, you will see a green ball in the right buttom panel.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Login: &lt;ul&gt;&lt;li&gt;Type your username and password and click Login.&lt;/li&gt;&lt;li&gt;Once you are connected, you will see a green ball in the right buttom panel.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;Login: &lt;ul&gt;&lt;li&gt;Type your username and password and click Login.&lt;/li&gt;&lt;li&gt;Once you are connected, you will see a green ball in the right buttom panel.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;Login: &lt;ul&gt;&lt;li&gt;Type your username and password and click Login.&lt;/li&gt;&lt;li&gt;Once you are connected, you will see a green ball in the right buttom panel.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="281"/> <location filename="main/mainscreen.cpp" line="290"/>
<source>&lt;br&gt;&lt;li&gt;Getting GPA sheet&lt;ul&gt;&lt;li&gt;Click on GPA Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Add&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Getting GPA sheet&lt;ul&gt;&lt;li&gt;Click on GPA Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Add&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;Getting GPA sheet&lt;ul&gt;&lt;li&gt;Click on GPA Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Add&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;Getting GPA sheet&lt;ul&gt;&lt;li&gt;Click on GPA Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Add&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="282"/> <location filename="main/mainscreen.cpp" line="291"/>
<source>&lt;br&gt;&lt;li&gt;Average Changing&lt;ul&gt;&lt;li&gt;Change one of your grade and see the average in the buttom panel changing.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Average Changing&lt;ul&gt;&lt;li&gt;Change one of your grade and see the average in the buttom panel changing.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;Average Changing&lt;ul&gt;&lt;li&gt;Change one of your grade and see the average in the buttom panel changing.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;Average Changing&lt;ul&gt;&lt;li&gt;Change one of your grade and see the average in the buttom panel changing.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="283"/> <location filename="main/mainscreen.cpp" line="292"/>
<source>&lt;br&gt;&lt;li&gt;Getting Calendar&lt;ul&gt;&lt;li&gt;Click on Calendar Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Get Calendar&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Getting Calendar&lt;ul&gt;&lt;li&gt;Click on Calendar Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Get Calendar&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;Getting Calendar&lt;ul&gt;&lt;li&gt;Click on Calendar Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Get Calendar&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;Getting Calendar&lt;ul&gt;&lt;li&gt;Click on Calendar Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Get Calendar&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="284"/> <location filename="main/mainscreen.cpp" line="293"/>
<source>&lt;br&gt;&lt;li&gt;For exporting your calendar to a .CSV file:&lt;ul&gt;&lt;li&gt;Do previous step and continue to next step&lt;/li&gt;&lt;li&gt; Click on Export to CSV&lt;/li&gt;&lt;li&gt;Select your dates and click OK&lt;/li&gt;&lt;li&gt;Once you&apos;re Done, go on your calendar and import your csv file&lt;/li&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;For exporting your calendar to a .CSV file:&lt;ul&gt;&lt;li&gt;Do previous step and continue to next step&lt;/li&gt;&lt;li&gt; Click on Export to CSV&lt;/li&gt;&lt;li&gt;Select your dates and click OK&lt;/li&gt;&lt;li&gt;Once you&apos;re Done, go on your calendar and import your csv file&lt;/li&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;על מנת לייצא לקובץ CSV&lt;ul&gt;&lt;li&gt;חזור על השלב הקודם ורק אז&lt;/li&gt;&lt;li&gt; לחת על ייצוא לקובץ CSV&lt;/li&gt;&lt;li&gt;בחר את התאריכים המתאימים ולחץ על אישור&lt;/li&gt;&lt;li&gt;ברגע שתסיים תוכל הודעה ולאחר מכן תוכל לייבא את הקובץ היכן שתרצה&lt;/li&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;For exporting your calendar to a .CSV file:&lt;ul&gt;&lt;li&gt;Do previous step and continue to next step&lt;/li&gt;&lt;li&gt; Click on Export to CSV&lt;/li&gt;&lt;li&gt;Select your dates and click OK&lt;/li&gt;&lt;li&gt;Once you&apos;re Done, go on your calendar and import your csv file&lt;/li&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="286"/> <location filename="main/mainscreen.cpp" line="295"/>
<source>&lt;b&gt;For more information, please visit us at: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</source> <source>&lt;b&gt;For more information, please visit us at: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</source>
<translation>&lt;b&gt;For more information, please visit us at: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</translation> <translation>&lt;b&gt;For more information, please visit us at: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="297"/> <location filename="main/mainscreen.cpp" line="306"/>
<location filename="main/mainscreen.cpp" line="325"/> <location filename="main/mainscreen.cpp" line="334"/>
<source>Settings</source> <source>Settings</source>
<translation>Settings</translation> <translation>Settings</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="297"/> <location filename="main/mainscreen.cpp" line="306"/>
<location filename="main/mainscreen.cpp" line="311"/> <location filename="main/mainscreen.cpp" line="320"/>
<location filename="main/mainscreen.cpp" line="325"/> <location filename="main/mainscreen.cpp" line="334"/>
<source>Your settings will take effect next time you start the program</source> <source>Your settings will take effect next time you start the program</source>
<translation>Your settings will take effect next time you start the program</translation> <translation>Your settings will take effect next time you start the program</translation>
</message> </message>
@ -423,117 +424,117 @@ If this message appear without reason, please contact me at liranbg@gmail.com</t
<translation>Friday</translation> <translation>Friday</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="249"/> <location filename="src/jceConnection/jcesslclient.cpp" line="263"/>
<source>ConnectionRefusedError</source> <source>ConnectionRefusedError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="254"/> <location filename="src/jceConnection/jcesslclient.cpp" line="268"/>
<source>RemoteHostClosedError</source> <source>RemoteHostClosedError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="264"/> <location filename="src/jceConnection/jcesslclient.cpp" line="278"/>
<source>HostNotFoundError</source> <source>HostNotFoundError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="269"/> <location filename="src/jceConnection/jcesslclient.cpp" line="283"/>
<source>SocketAccessError</source> <source>SocketAccessError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="273"/> <location filename="src/jceConnection/jcesslclient.cpp" line="287"/>
<source>SocketTimeoutError</source> <source>SocketTimeoutError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="280"/> <location filename="src/jceConnection/jcesslclient.cpp" line="294"/>
<source>NetworkError</source> <source>NetworkError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="289"/> <location filename="src/jceConnection/jcesslclient.cpp" line="303"/>
<source>SslHandshakeFailedError</source> <source>SslHandshakeFailedError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="293"/> <location filename="src/jceConnection/jcesslclient.cpp" line="307"/>
<source>SslInternalError</source> <source>SslInternalError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="297"/> <location filename="src/jceConnection/jcesslclient.cpp" line="311"/>
<source>SslInvalidUserDataError</source> <source>SslInvalidUserDataError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="301"/> <location filename="src/jceConnection/jcesslclient.cpp" line="315"/>
<source>DatagramTooLargeError</source> <source>DatagramTooLargeError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="306"/> <location filename="src/jceConnection/jcesslclient.cpp" line="320"/>
<source>OperationError</source> <source>OperationError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="309"/> <location filename="src/jceConnection/jcesslclient.cpp" line="323"/>
<source>AddressInUseError</source> <source>AddressInUseError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="312"/> <location filename="src/jceConnection/jcesslclient.cpp" line="326"/>
<source>SocketAddressNotAvailableError</source> <source>SocketAddressNotAvailableError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="315"/> <location filename="src/jceConnection/jcesslclient.cpp" line="329"/>
<source>UnsupportedSocketOperationError</source> <source>UnsupportedSocketOperationError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="318"/> <location filename="src/jceConnection/jcesslclient.cpp" line="332"/>
<source>ProxyAuthenticationRequiredError</source> <source>ProxyAuthenticationRequiredError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="321"/> <location filename="src/jceConnection/jcesslclient.cpp" line="335"/>
<source>ProxyConnectionRefusedError</source> <source>ProxyConnectionRefusedError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="324"/> <location filename="src/jceConnection/jcesslclient.cpp" line="338"/>
<source>UnfinishedSocketOperationError</source> <source>UnfinishedSocketOperationError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="327"/> <location filename="src/jceConnection/jcesslclient.cpp" line="341"/>
<source>ProxyConnectionClosedError</source> <source>ProxyConnectionClosedError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="330"/> <location filename="src/jceConnection/jcesslclient.cpp" line="344"/>
<source>ProxyConnectionTimeoutError</source> <source>ProxyConnectionTimeoutError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="333"/> <location filename="src/jceConnection/jcesslclient.cpp" line="347"/>
<source>ProxyNotFoundError</source> <source>ProxyNotFoundError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="336"/> <location filename="src/jceConnection/jcesslclient.cpp" line="350"/>
<source>ProxyProtocolError</source> <source>ProxyProtocolError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="339"/> <location filename="src/jceConnection/jcesslclient.cpp" line="353"/>
<source>TemporaryError</source> <source>TemporaryError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="342"/> <location filename="src/jceConnection/jcesslclient.cpp" line="356"/>
<source>UnknownSocketError</source> <source>UnknownSocketError</source>
<translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation> <translation>Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD</translation>
</message> </message>

BIN
jce_he.qm

Binary file not shown.

107
jce_he.ts
View file

@ -46,8 +46,8 @@
<name>MainScreen</name> <name>MainScreen</name>
<message> <message>
<location filename="main/mainscreen.ui" line="20"/> <location filename="main/mainscreen.ui" line="20"/>
<source>JCE Avg Calculator</source> <source>JCE Manager</source>
<translation>JCE Avg Calculator</translation> <translation>JCE Manager</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.ui" line="86"/> <location filename="main/mainscreen.ui" line="86"/>
@ -148,8 +148,9 @@
</message> </message>
<message> <message>
<location filename="main/mainscreen.ui" line="632"/> <location filename="main/mainscreen.ui" line="632"/>
<source>&lt;p align=&quot;right&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</source> <source>&lt;p align=&quot;center&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</source>
<translation>&lt;p align=&quot;right&quot;&gt;נוצר ע&quot;י: &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</translation> <oldsource>&lt;p align=&quot;right&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</oldsource>
<translation>&lt;p align=&quot;center&quot;&gt;נוצר ע&quot;י: &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.ui" line="649"/> <location filename="main/mainscreen.ui" line="649"/>
@ -192,107 +193,107 @@
<translation>עזרה</translation> <translation>עזרה</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="21"/> <location filename="main/mainscreen.cpp" line="23"/>
<source>Ready</source> <source>Ready</source>
<translation>מוכן</translation> <translation>מוכן</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="132"/> <location filename="main/mainscreen.cpp" line="136"/>
<location filename="main/mainscreen.cpp" line="151"/> <location filename="main/mainscreen.cpp" line="157"/>
<location filename="main/mainscreen.cpp" line="206"/> <location filename="main/mainscreen.cpp" line="212"/>
<location filename="main/mainscreen.cpp" line="234"/> <location filename="main/mainscreen.cpp" line="242"/>
<source>Error</source> <source>Error</source>
<translation>שגיאה</translation> <translation>שגיאה</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="132"/> <location filename="main/mainscreen.cpp" line="136"/>
<source>Invalid Dates. <source>Invalid Dates.
Make Sure everything is correct and try again</source> Make Sure everything is correct and try again</source>
<translation>תאריכים לא חוקיים. אנא בדוק שהנתונים שהוזנו נכונים ונסה מחדשה</translation> <translation>תאריכים לא חוקיים. אנא בדוק שהנתונים שהוזנו נכונים ונסה מחדשה</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="151"/> <location filename="main/mainscreen.cpp" line="157"/>
<location filename="main/mainscreen.cpp" line="234"/> <location filename="main/mainscreen.cpp" line="242"/>
<source>Not Connected</source> <source>Not Connected</source>
<translation>לא מחובר</translation> <translation>לא מחובר</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="206"/> <location filename="main/mainscreen.cpp" line="212"/>
<source>Missmatching data</source> <source>Missmatching data</source>
<translation>שגיאה בהכנסת נתונים</translation> <translation>שגיאה בהכנסת נתונים</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="255"/> <location filename="main/mainscreen.cpp" line="264"/>
<source>License:</source> <source>License:</source>
<translation>רישיון:</translation> <translation>רישיון:</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="260"/> <location filename="main/mainscreen.cpp" line="269"/>
<source>Powered By: </source> <source>Powered By: </source>
<oldsource>powered by: </oldsource> <oldsource>powered by: </oldsource>
<translation>מנוע:</translation> <translation>מנוע:</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="262"/> <location filename="main/mainscreen.cpp" line="271"/>
<source>Developed By</source> <source>Developed By</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="278"/> <location filename="main/mainscreen.cpp" line="287"/>
<source>Help Guide</source> <source>Help Guide</source>
<oldsource>Guide</oldsource> <oldsource>Guide</oldsource>
<translation>תפריט עזרה</translation> <translation>תפריט עזרה</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="264"/> <location filename="main/mainscreen.cpp" line="273"/>
<source>Liran</source> <source>Liran</source>
<translation>לירן בן גידה</translation> <translation>לירן בן גידה</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="265"/> <location filename="main/mainscreen.cpp" line="274"/>
<source>Sagi</source> <source>Sagi</source>
<translation>שגיא דיין</translation> <translation>שגיא דיין</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="280"/> <location filename="main/mainscreen.cpp" line="289"/>
<source>&lt;br&gt;&lt;li&gt;Login: &lt;ul&gt;&lt;li&gt;Type your username and password and click Login.&lt;/li&gt;&lt;li&gt;Once you are connected, you will see a green ball in the right buttom panel.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Login: &lt;ul&gt;&lt;li&gt;Type your username and password and click Login.&lt;/li&gt;&lt;li&gt;Once you are connected, you will see a green ball in the right buttom panel.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;התחברות: &lt;ul&gt;&lt;li&gt;הזן את שם המשתמש והסיסמה ולחץ על התחבר&lt;/li&gt;&lt;li&gt;בגמר ההתחברות תראה בכדור ירוק בשורת המצב. המשמעות שהינך מחובר לאתר&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;התחברות: &lt;ul&gt;&lt;li&gt;הזן את שם המשתמש והסיסמה ולחץ על התחבר&lt;/li&gt;&lt;li&gt;בגמר ההתחברות תראה בכדור ירוק בשורת המצב. המשמעות שהינך מחובר לאתר&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="281"/> <location filename="main/mainscreen.cpp" line="290"/>
<source>&lt;br&gt;&lt;li&gt;Getting GPA sheet&lt;ul&gt;&lt;li&gt;Click on GPA Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Add&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Getting GPA sheet&lt;ul&gt;&lt;li&gt;Click on GPA Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Add&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;קבלת גליון ציונים&lt;ul&gt;&lt;li&gt;לחץ על לשונית הציונים&lt;/li&gt;&lt;li&gt;בחר את טווח התאריכים הרצויים ולחץ על הוספה&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;קבלת גליון ציונים&lt;ul&gt;&lt;li&gt;לחץ על לשונית הציונים&lt;/li&gt;&lt;li&gt;בחר את טווח התאריכים הרצויים ולחץ על הוספה&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="282"/> <location filename="main/mainscreen.cpp" line="291"/>
<source>&lt;br&gt;&lt;li&gt;Average Changing&lt;ul&gt;&lt;li&gt;Change one of your grade and see the average in the buttom panel changing.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Average Changing&lt;ul&gt;&lt;li&gt;Change one of your grade and see the average in the buttom panel changing.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;שינוי ממוצע&lt;ul&gt;&lt;li&gt;שנה את אחד הציונים שלך בקורס והממוצע ישתנה בהתאם.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;שינוי ממוצע&lt;ul&gt;&lt;li&gt;שנה את אחד הציונים שלך בקורס והממוצע ישתנה בהתאם.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="283"/> <location filename="main/mainscreen.cpp" line="292"/>
<source>&lt;br&gt;&lt;li&gt;Getting Calendar&lt;ul&gt;&lt;li&gt;Click on Calendar Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Get Calendar&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;Getting Calendar&lt;ul&gt;&lt;li&gt;Click on Calendar Tab&lt;/li&gt;&lt;li&gt; Select your dates and click on Get Calendar&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;קבלת שעות מערכת&lt;ul&gt;&lt;li&gt;לחץ על לשונית שעות מערכת&lt;/li&gt;&lt;li&gt;בחר את השנה והסמסטר ולחץ על הצג מערכת&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;קבלת שעות מערכת&lt;ul&gt;&lt;li&gt;לחץ על לשונית שעות מערכת&lt;/li&gt;&lt;li&gt;בחר את השנה והסמסטר ולחץ על הצג מערכת&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="284"/> <location filename="main/mainscreen.cpp" line="293"/>
<source>&lt;br&gt;&lt;li&gt;For exporting your calendar to a .CSV file:&lt;ul&gt;&lt;li&gt;Do previous step and continue to next step&lt;/li&gt;&lt;li&gt; Click on Export to CSV&lt;/li&gt;&lt;li&gt;Select your dates and click OK&lt;/li&gt;&lt;li&gt;Once you&apos;re Done, go on your calendar and import your csv file&lt;/li&gt;&lt;/li&gt;</source> <source>&lt;br&gt;&lt;li&gt;For exporting your calendar to a .CSV file:&lt;ul&gt;&lt;li&gt;Do previous step and continue to next step&lt;/li&gt;&lt;li&gt; Click on Export to CSV&lt;/li&gt;&lt;li&gt;Select your dates and click OK&lt;/li&gt;&lt;li&gt;Once you&apos;re Done, go on your calendar and import your csv file&lt;/li&gt;&lt;/li&gt;</source>
<translation>&lt;br&gt;&lt;li&gt;על מנת לייצא לקובץ CSV&lt;ul&gt;&lt;li&gt;בצע את השלב הקודם ואז&lt;/li&gt;&lt;li&gt; לחץ על ייצוא לCSV&lt;/li&gt;&lt;li&gt;בחר את התאריכים המתאימים ולחץ אישור&lt;/li&gt;&lt;li&gt;לאחר השלמת הפעולה תוכל לייבא את המערכת שעות&lt;/li&gt;&lt;/li&gt;</translation> <translation>&lt;br&gt;&lt;li&gt;על מנת לייצא לקובץ CSV&lt;ul&gt;&lt;li&gt;בצע את השלב הקודם ואז&lt;/li&gt;&lt;li&gt; לחץ על ייצוא לCSV&lt;/li&gt;&lt;li&gt;בחר את התאריכים המתאימים ולחץ אישור&lt;/li&gt;&lt;li&gt;לאחר השלמת הפעולה תוכל לייבא את המערכת שעות&lt;/li&gt;&lt;/li&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="286"/> <location filename="main/mainscreen.cpp" line="295"/>
<source>&lt;b&gt;For more information, please visit us at: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</source> <source>&lt;b&gt;For more information, please visit us at: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</source>
<translation>&lt;b&gt;לעוד מידע: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</translation> <translation>&lt;b&gt;לעוד מידע: &lt;a href=&apos;http://liranbg.github.io/JceManager/&apos;&gt;Jce Manager site&lt;/a&gt;&lt;/b&gt;</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="297"/> <location filename="main/mainscreen.cpp" line="306"/>
<location filename="main/mainscreen.cpp" line="325"/> <location filename="main/mainscreen.cpp" line="334"/>
<source>Settings</source> <source>Settings</source>
<translation>הגדרות</translation> <translation>הגדרות</translation>
</message> </message>
<message> <message>
<location filename="main/mainscreen.cpp" line="297"/> <location filename="main/mainscreen.cpp" line="306"/>
<location filename="main/mainscreen.cpp" line="311"/> <location filename="main/mainscreen.cpp" line="320"/>
<location filename="main/mainscreen.cpp" line="325"/> <location filename="main/mainscreen.cpp" line="334"/>
<source>Your settings will take effect next time you start the program</source> <source>Your settings will take effect next time you start the program</source>
<translation>ההגדרות שלך ייכנסו לתוקפן בפעם הבאה שתפעיל את התוכנה</translation> <translation>ההגדרות שלך ייכנסו לתוקפן בפעם הבאה שתפעיל את התוכנה</translation>
</message> </message>
@ -423,117 +424,117 @@ If this message appear without reason, please contact me at liranbg@gmail.com</s
<translation>שישי</translation> <translation>שישי</translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="249"/> <location filename="src/jceConnection/jcesslclient.cpp" line="263"/>
<source>ConnectionRefusedError</source> <source>ConnectionRefusedError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="254"/> <location filename="src/jceConnection/jcesslclient.cpp" line="268"/>
<source>RemoteHostClosedError</source> <source>RemoteHostClosedError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="264"/> <location filename="src/jceConnection/jcesslclient.cpp" line="278"/>
<source>HostNotFoundError</source> <source>HostNotFoundError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="269"/> <location filename="src/jceConnection/jcesslclient.cpp" line="283"/>
<source>SocketAccessError</source> <source>SocketAccessError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="273"/> <location filename="src/jceConnection/jcesslclient.cpp" line="287"/>
<source>SocketTimeoutError</source> <source>SocketTimeoutError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="280"/> <location filename="src/jceConnection/jcesslclient.cpp" line="294"/>
<source>NetworkError</source> <source>NetworkError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="289"/> <location filename="src/jceConnection/jcesslclient.cpp" line="303"/>
<source>SslHandshakeFailedError</source> <source>SslHandshakeFailedError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="293"/> <location filename="src/jceConnection/jcesslclient.cpp" line="307"/>
<source>SslInternalError</source> <source>SslInternalError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="297"/> <location filename="src/jceConnection/jcesslclient.cpp" line="311"/>
<source>SslInvalidUserDataError</source> <source>SslInvalidUserDataError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="301"/> <location filename="src/jceConnection/jcesslclient.cpp" line="315"/>
<source>DatagramTooLargeError</source> <source>DatagramTooLargeError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="306"/> <location filename="src/jceConnection/jcesslclient.cpp" line="320"/>
<source>OperationError</source> <source>OperationError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="309"/> <location filename="src/jceConnection/jcesslclient.cpp" line="323"/>
<source>AddressInUseError</source> <source>AddressInUseError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="312"/> <location filename="src/jceConnection/jcesslclient.cpp" line="326"/>
<source>SocketAddressNotAvailableError</source> <source>SocketAddressNotAvailableError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="315"/> <location filename="src/jceConnection/jcesslclient.cpp" line="329"/>
<source>UnsupportedSocketOperationError</source> <source>UnsupportedSocketOperationError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="318"/> <location filename="src/jceConnection/jcesslclient.cpp" line="332"/>
<source>ProxyAuthenticationRequiredError</source> <source>ProxyAuthenticationRequiredError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="321"/> <location filename="src/jceConnection/jcesslclient.cpp" line="335"/>
<source>ProxyConnectionRefusedError</source> <source>ProxyConnectionRefusedError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="324"/> <location filename="src/jceConnection/jcesslclient.cpp" line="338"/>
<source>UnfinishedSocketOperationError</source> <source>UnfinishedSocketOperationError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="327"/> <location filename="src/jceConnection/jcesslclient.cpp" line="341"/>
<source>ProxyConnectionClosedError</source> <source>ProxyConnectionClosedError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="330"/> <location filename="src/jceConnection/jcesslclient.cpp" line="344"/>
<source>ProxyConnectionTimeoutError</source> <source>ProxyConnectionTimeoutError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="333"/> <location filename="src/jceConnection/jcesslclient.cpp" line="347"/>
<source>ProxyNotFoundError</source> <source>ProxyNotFoundError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="336"/> <location filename="src/jceConnection/jcesslclient.cpp" line="350"/>
<source>ProxyProtocolError</source> <source>ProxyProtocolError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="339"/> <location filename="src/jceConnection/jcesslclient.cpp" line="353"/>
<source>TemporaryError</source> <source>TemporaryError</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="src/jceConnection/jcesslclient.cpp" line="342"/> <location filename="src/jceConnection/jcesslclient.cpp" line="356"/>
<source>UnknownSocketError</source> <source>UnknownSocketError</source>
<translation></translation> <translation></translation>
</message> </message>

View file

@ -4,343 +4,359 @@
MainScreen::MainScreen(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainScreen) MainScreen::MainScreen(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainScreen)
{ {
ui->setupUi(this); ui->setupUi(this);
//this->setFixedSize(this->size()); //main not resizeable //this->setFixedSize(this->size()); //main not resizeable
//Login Tab ui->labelMadeBy->setOpenExternalLinks(true);
iconPix.load(":/icons/iconX.png");
ui->pswdLineEdit->setEchoMode((QLineEdit::Password));
ui->labelUsrInputStatus->setVisible(false);
ui->labelPswInputStatus->setVisible(false);
ui->labelUsrInputStatus->setPixmap(iconPix);
ui->labelPswInputStatus->setPixmap(iconPix);
//StatusBar //Login Tab
ui->statusBar->setStyleSheet("QStatusBar::item { border: 0px solid black };"); iconPix.load(":/icons/iconX.png");
ui->statusBar->setFixedHeight(STATUS_ICON_HEIGH); ui->pswdLineEdit->setEchoMode((QLineEdit::Password));
ui->statusBar->showMessage(tr("Ready")); ui->labelUsrInputStatus->setVisible(false);
ui->labelPswInputStatus->setVisible(false);
ui->labelUsrInputStatus->setPixmap(iconPix);
ui->labelPswInputStatus->setPixmap(iconPix);
//GPA Tab //StatusBar
ui->avgLCD->setPalette(QPalette(QPalette::WindowText,Qt::blue)); ui->statusBar->setStyleSheet("QStatusBar::item { border: 0px solid black };");
ui->statusBar->setFixedHeight(STATUS_ICON_HEIGH);
ui->statusBar->showMessage(tr("Ready"));
//Pointer allocating //GPA Tab
qDebug() << Q_FUNC_INFO << "Allocating pointers"; ui->avgLCD->setPalette(QPalette(QPalette::WindowText,Qt::blue));
this->userLoginSetting = new user("","");
this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting);
this->loginHandel = new loginHandler(userLoginSetting,ui->statusBar,ui->loginButton);
this->calendar = new CalendarManager(ui->calendarGridLayoutMain);
this->data = new SaveData();
//check login File //Pointer allocating
if (data->isSaved()) qDebug() << Q_FUNC_INFO << "Allocating pointers";
this->userLoginSetting = new user("","");
this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting);
this->loginHandel = new loginHandler(userLoginSetting,ui->statusBar,ui->loginButton);
this->calendar = new CalendarManager(ui->calendarGridLayoutMain);
this->data = new SaveData();
//check login File
if (data->isSaved())
{ {
qDebug() << Q_FUNC_INFO << "Loading data from file"; qDebug() << Q_FUNC_INFO << "Loading data from file";
ui->usrnmLineEdit->setText(data->getUsername()); ui->usrnmLineEdit->setText(data->getUsername());
ui->pswdLineEdit->setText(data->getPassword()); ui->pswdLineEdit->setText(data->getPassword());
ui->keepLogin->setChecked(true); ui->keepLogin->setChecked(true);
} }
//language //language
qDebug() << Q_FUNC_INFO << "Checking locale"; qDebug() << Q_FUNC_INFO << "Checking locale";
checkLocale(); checkLocale();
qDebug() << Q_FUNC_INFO << "Ready."; qDebug() << Q_FUNC_INFO << "Ready.";
} }
MainScreen::~MainScreen() MainScreen::~MainScreen()
{ {
delete calendar; delete calendar;
delete courseTableMgr; delete courseTableMgr;
delete userLoginSetting; delete userLoginSetting;
delete loginHandel; delete loginHandel;
delete data; delete data;
delete ui; delete ui;
} }
//EVENTS ON LOGIN TAB //EVENTS ON LOGIN TAB
void MainScreen::on_loginButton_clicked() void MainScreen::on_loginButton_clicked()
{ {
qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty())) if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty()))
{ {
if (ui->usrnmLineEdit->text().isEmpty()) if (ui->usrnmLineEdit->text().isEmpty())
{ {
ui->labelUsrInputStatus->setVisible(true); ui->labelUsrInputStatus->setVisible(true);
qDebug() << Q_FUNC_INFO << "username input is empty"; qDebug() << Q_FUNC_INFO << "username input is empty";
} }
else else
ui->labelUsrInputStatus->setVisible(false);
if (ui->pswdLineEdit->text().isEmpty())
{
ui->labelPswInputStatus->setVisible(true);
qDebug() << Q_FUNC_INFO << "password input is empty";
}
else
ui->labelPswInputStatus->setVisible(false);
return;
}
else
{
ui->labelUsrInputStatus->setVisible(false); ui->labelUsrInputStatus->setVisible(false);
ui->labelPswInputStatus->setVisible(false); if (ui->pswdLineEdit->text().isEmpty())
}
qDebug() << Q_FUNC_INFO << "login session start";
if (this->loginHandel->login(ui->usrnmLineEdit->text(),ui->pswdLineEdit->text()) == true)
{
qDebug() << Q_FUNC_INFO << "login session end with true";
ui->pswdLineEdit->setDisabled(true);
ui->usrnmLineEdit->setDisabled(true);
if (ui->keepLogin->isChecked())
{ {
qDebug() << Q_FUNC_INFO << "saving data"; ui->labelPswInputStatus->setVisible(true);
data->setUsername(ui->usrnmLineEdit->text()); qDebug() << Q_FUNC_INFO << "password input is empty";
data->setPassword(ui->pswdLineEdit->text()); }
else
ui->labelPswInputStatus->setVisible(false);
return;
}
else
{
ui->labelUsrInputStatus->setVisible(false);
ui->labelPswInputStatus->setVisible(false);
}
qDebug() << Q_FUNC_INFO << "login session start";
QApplication::setOverrideCursor(Qt::WaitCursor);
if (this->loginHandel->login(ui->usrnmLineEdit->text(),ui->pswdLineEdit->text()) == true)
{
qDebug() << Q_FUNC_INFO << "login session end with true";
ui->pswdLineEdit->setDisabled(true);
ui->usrnmLineEdit->setDisabled(true);
if (ui->keepLogin->isChecked())
{
qDebug() << Q_FUNC_INFO << "saving data";
data->setUsername(ui->usrnmLineEdit->text());
data->setPassword(ui->pswdLineEdit->text());
} }
} }
else else
{ {
qDebug() << Q_FUNC_INFO << "login session end with false"; qDebug() << Q_FUNC_INFO << "login session end with false";
ui->pswdLineEdit->setDisabled(false); ui->pswdLineEdit->setDisabled(false);
ui->usrnmLineEdit->setDisabled(false); ui->usrnmLineEdit->setDisabled(false);
} }
QApplication::restoreOverrideCursor();
} }
void MainScreen::on_keepLogin_clicked() void MainScreen::on_keepLogin_clicked()
{ {
qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
if (ui->keepLogin->isChecked()) if (ui->keepLogin->isChecked())
{ {
qDebug() << Q_FUNC_INFO << "saving data"; qDebug() << Q_FUNC_INFO << "saving data";
data->setUsername(ui->usrnmLineEdit->text()); data->setUsername(ui->usrnmLineEdit->text());
data->setPassword(ui->pswdLineEdit->text()); data->setPassword(ui->pswdLineEdit->text());
} }
else else
data->reset(); data->reset();
} }
void MainScreen::on_usrnmLineEdit_editingFinished() void MainScreen::on_usrnmLineEdit_editingFinished()
{ {
qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower()); ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower());
} }
//EVENTS ON GPA TAB //EVENTS ON GPA TAB
void MainScreen::on_ratesButton_clicked() void MainScreen::on_ratesButton_clicked()
{ {
qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
if (!checkIfValidDates()) if (!checkIfValidDates())
{ {
qWarning() << Q_FUNC_INFO << "Invalid dates! return"; qWarning() << Q_FUNC_INFO << "Invalid dates! return";
QMessageBox::critical(this,tr("Error"),tr("Invalid Dates.\nMake Sure everything is correct and try again")); QMessageBox::critical(this,tr("Error"),tr("Invalid Dates.\nMake Sure everything is correct and try again"));
return; return;
} }
QString pageString; QString pageString;
int status = 0; int status = 0;
if (loginHandel->isLoggedInFlag()) QApplication::setOverrideCursor(Qt::WaitCursor);
if (loginHandel->isLoggedInFlag())
{ {
if ((status = loginHandel->makeGradeRequest(ui->spinBoxCoursesFromYear->value(), if ((status = loginHandel->makeGradeRequest(ui->spinBoxCoursesFromYear->value(),
ui->spinBoxCoursesToYear->value(),ui->spinBoxCoursesFromSemester->value(), ui->spinBoxCoursesToYear->value(),ui->spinBoxCoursesFromSemester->value(),
ui->spinBoxCoursesToSemester->value())) == jceLogin::JCE_PAGE_PASSED) ui->spinBoxCoursesToSemester->value())) == jceLogin::JCE_PAGE_PASSED)
{ {
qDebug() << Q_FUNC_INFO << "grade page is ready"; qDebug() << Q_FUNC_INFO << "grade page is ready";
pageString = loginHandel->getCurrentPageContect(); pageString = loginHandel->getCurrentPageContect();
courseTableMgr->setCoursesList(pageString); courseTableMgr->setCoursesList(pageString);
courseTableMgr->insertJceCoursesIntoTable(); courseTableMgr->insertJceCoursesIntoTable();
} }
else if (status == jceLogin::JCE_NOT_CONNECTED) else if (status == jceLogin::JCE_NOT_CONNECTED)
{ {
qWarning() << Q_FUNC_INFO << "not connected"; qWarning() << Q_FUNC_INFO << "not connected";
QMessageBox::critical(this,tr("Error"),tr("Not Connected")); QApplication::restoreOverrideCursor();
QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
} }
else else
{ {
qCritical() << Q_FUNC_INFO << "grade get ended with" << status; qCritical() << Q_FUNC_INFO << "grade get ended with" << status;
} }
} }
QApplication::restoreOverrideCursor();
} }
bool MainScreen::checkIfValidDates() bool MainScreen::checkIfValidDates()
{ {
bool flag = false; bool flag = false;
if (ui->spinBoxCoursesFromYear->value() < ui->spinBoxCoursesToYear->value()) if (ui->spinBoxCoursesFromYear->value() < ui->spinBoxCoursesToYear->value())
{ {
//doesnt matter what is the semester, its valid! //doesnt matter what is the semester, its valid!
flag = true;
}
else if ((ui->spinBoxCoursesFromYear->value() == ui->spinBoxCoursesToYear->value()))
{
//semester from must be equal or less than to semester
if (ui->spinBoxCoursesFromSemester->value() <= ui->spinBoxCoursesToSemester->value())
flag = true; flag = true;
} }
else if ((ui->spinBoxCoursesFromYear->value() == ui->spinBoxCoursesToYear->value())) return flag;
{
//semester from must be equal or less than to semester
if (ui->spinBoxCoursesFromSemester->value() <= ui->spinBoxCoursesToSemester->value())
flag = true;
}
return flag;
} }
void MainScreen::on_checkBoxCoursesInfluence_toggled(bool checked) void MainScreen::on_checkBoxCoursesInfluence_toggled(bool checked)
{ {
qDebug() << Q_FUNC_INFO << "only main courses toggeled" << checked; qDebug() << Q_FUNC_INFO << "only main courses toggeled" << checked;
this->userLoginSetting->setInfluenceCourseOnly(checked); this->userLoginSetting->setInfluenceCourseOnly(checked);
this->courseTableMgr->influnceCourseChanged(checked); this->courseTableMgr->influnceCourseChanged(checked);
} }
void MainScreen::on_spinBoxCoursesFromYear_valueChanged(int arg1) void MainScreen::on_spinBoxCoursesFromYear_valueChanged(int arg1)
{ {
ui->spinBoxCoursesFromYear->setValue(arg1); ui->spinBoxCoursesFromYear->setValue(arg1);
} }
void MainScreen::on_spinBoxCoursesToYear_valueChanged(int arg1) void MainScreen::on_spinBoxCoursesToYear_valueChanged(int arg1)
{ {
ui->spinBoxCoursesToYear->setValue(arg1); ui->spinBoxCoursesToYear->setValue(arg1);
} }
void MainScreen::on_spinBoxCoursesFromSemester_valueChanged(int arg1) void MainScreen::on_spinBoxCoursesFromSemester_valueChanged(int arg1)
{ {
ui->spinBoxCoursesFromSemester->setValue(arg1%4); ui->spinBoxCoursesFromSemester->setValue(arg1%4);
} }
void MainScreen::on_spinBoxCoursesToSemester_valueChanged(int arg1) void MainScreen::on_spinBoxCoursesToSemester_valueChanged(int arg1)
{ {
ui->spinBoxCoursesToSemester->setValue(arg1%4); ui->spinBoxCoursesToSemester->setValue(arg1%4);
} }
void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item) void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item)
{ {
qDebug() << Q_FUNC_INFO << "item at row:" << item->row() << " colum:" << item->column() << " text: " << item->text(); if (this->courseTableMgr->changes(item->text(),item->row(),item->column()))
if (this->courseTableMgr->changes(item->text(),item->row(),item->column())) ui->avgLCD->display(courseTableMgr->getAvg());
ui->avgLCD->display(courseTableMgr->getAvg()); else
else
{ {
qWarning() << Q_FUNC_INFO << "missmatch data"; qWarning() << Q_FUNC_INFO << "missmatch data";
QMessageBox::critical(this,tr("Error"),tr("Missmatching data")); QMessageBox::critical(this,tr("Error"),tr("Missmatching data"));
} }
} }
void MainScreen::on_clearTableButton_clicked() void MainScreen::on_clearTableButton_clicked()
{ {
qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
courseTableMgr->clearTable(); courseTableMgr->clearTable();
ui->avgLCD->display(courseTableMgr->getAvg()); ui->avgLCD->display(courseTableMgr->getAvg());
} }
//EVENTS ON CALENDAR TAB //EVENTS ON CALENDAR TAB
void MainScreen::on_getCalendarBtn_clicked() void MainScreen::on_getCalendarBtn_clicked()
{ {
qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
int status = 0; int status = 0;
if (loginHandel->isLoggedInFlag()) QApplication::setOverrideCursor(Qt::WaitCursor);
if (loginHandel->isLoggedInFlag())
{ {
if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_PAGE_PASSED) if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_PAGE_PASSED)
{ {
//Use it for debug. add plain text and change the object name to 'plainTextEdit' so you will get the html request //Use it for debug. add plain text and change the object name to 'plainTextEdit' so you will get the html request
//ui->plainTextEdit->setPlainText(loginHandel->getCurrentPageContect()); //ui->plainTextEdit->setPlainText(loginHandel->getCurrentPageContect());
calendar->resetTable(); calendar->resetTable();
calendar->setCalendar(loginHandel->getCurrentPageContect()); calendar->setCalendar(loginHandel->getCurrentPageContect());
qDebug() << Q_FUNC_INFO << "calendar is loaded"; qDebug() << Q_FUNC_INFO << "calendar is loaded";
} }
else if (status == jceLogin::JCE_NOT_CONNECTED) else if (status == jceLogin::JCE_NOT_CONNECTED)
{ {
qWarning() << Q_FUNC_INFO << "not connected"; qWarning() << Q_FUNC_INFO << "not connected";
QMessageBox::critical(this,tr("Error"),tr("Not Connected")); QApplication::restoreOverrideCursor();
QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
} }
else else
qCritical() << Q_FUNC_INFO << "calendar get ended with" << status; qCritical() << Q_FUNC_INFO << "calendar get ended with" << status;
} }
QApplication::restoreOverrideCursor();
} }
void MainScreen::on_exportToCVSBtn_clicked() void MainScreen::on_exportToCVSBtn_clicked()
{ {
qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName(); qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
if (loginHandel->isLoggedInFlag()) if (loginHandel->isLoggedInFlag())
{ {
this->calendar->exportCalendarCSV(); this->calendar->exportCalendarCSV();
} }
} }
//EVENTS ON MENU BAR //EVENTS ON MENU BAR
void MainScreen::on_actionCredits_triggered() void MainScreen::on_actionCredits_triggered()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
QMessageBox::about(this, "About", QMessageBox::about(this, "About",
"<a href='http://liranbg.github.io/JceManager/'>Jce Manager</a> v1.0.0<br><br>" "<a href='http://liranbg.github.io/JceManager/'>Jce Manager</a> v1.0.0<br><br>"
+tr("License:")+ +tr("License:")+
"<br>GNU LESSER GENERAL PUBLIC LICENSE V2.1<br>" "<br>GNU LESSER GENERAL PUBLIC LICENSE V2.1<br>"
+"<br>"+ +"<br>"+
"<a href='https://github.com/liranbg/JceManager'>JceManager Repository</a>"+ "<a href='https://github.com/liranbg/JceManager'>JceManager Repository</a>"+
"<br><br>" "<br><br>"
+tr("Powered By: ")+ +tr("Powered By: ")+
"<a href='https://github.com/liranbg/jceConnection'> Jce Connection</a><br><br>" "<a href='https://github.com/liranbg/jceConnection'> Jce Connection</a><br><br>"
+tr("Developed By")+ +tr("Developed By")+
":<ul>"+ ":<ul>"+
"<li><a href='mailto:liranbg@gmail.com'>"+tr("Liran")+"</a></li>"+ "<li><a href='mailto:liranbg@gmail.com'>"+tr("Liran")+"</a></li>"+
"<li><a href='mailto:sagidayan@gmail.com'>"+tr("Sagi")+"</a></li></ul>" "<li><a href='mailto:sagidayan@gmail.com'>"+tr("Sagi")+"</a></li></ul>"
); );
} }
void MainScreen::on_actionExit_triggered() void MainScreen::on_actionExit_triggered()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
exit(0); exit(0);
} }
void MainScreen::on_actionHow_To_triggered() void MainScreen::on_actionHow_To_triggered()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
QMessageBox::information(this,"How To", QMessageBox::information(this,"How To",
"<b>" "<b>"
+tr("Help Guide")+ +tr("Help Guide")+
"</b><ul>" "</b><ul>"
+tr("<br><li>Login: <ul><li>Type your username and password and click Login.</li><li>Once you are connected, you will see a green ball in the right buttom panel.</li></ul></li>") +tr("<br><li>Login: <ul><li>Type your username and password and click Login.</li><li>Once you are connected, you will see a green ball in the right buttom panel.</li></ul></li>")
+tr("<br><li>Getting GPA sheet<ul><li>Click on GPA Tab</li><li> Select your dates and click on Add</li></ul></li>") +tr("<br><li>Getting GPA sheet<ul><li>Click on GPA Tab</li><li> Select your dates and click on Add</li></ul></li>")
+tr("<br><li>Average Changing<ul><li>Change one of your grade and see the average in the buttom panel changing.</li></ul></li>") +tr("<br><li>Average Changing<ul><li>Change one of your grade and see the average in the buttom panel changing.</li></ul></li>")
+tr("<br><li>Getting Calendar<ul><li>Click on Calendar Tab</li><li> Select your dates and click on Get Calendar</li></ul></li>") +tr("<br><li>Getting Calendar<ul><li>Click on Calendar Tab</li><li> Select your dates and click on Get Calendar</li></ul></li>")
+tr("<br><li>For exporting your calendar to a .CSV file:<ul><li>Do previous step and continue to next step</li><li> Click on Export to CSV</li><li>Select your dates and click OK</li><li>Once you're Done, go on your calendar and import your csv file</li></li>")+ +tr("<br><li>For exporting your calendar to a .CSV file:<ul><li>Do previous step and continue to next step</li><li> Click on Export to CSV</li><li>Select your dates and click OK</li><li>Once you're Done, go on your calendar and import your csv file</li></li>")+
"<br><br>" "<br><br>"
+tr("<b>For more information, please visit us at: <a href='http://liranbg.github.io/JceManager/'>Jce Manager site</a></b>")); +tr("<b>For more information, please visit us at: <a href='http://liranbg.github.io/JceManager/'>Jce Manager site</a></b>"));
} }
void MainScreen::on_actionHebrew_triggered() void MainScreen::on_actionHebrew_triggered()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
if (ui->actionEnglish->isChecked() || ui->actionOS_Default->isChecked()) if (ui->actionEnglish->isChecked() || ui->actionOS_Default->isChecked())
{ {
ui->actionEnglish->setChecked(false); ui->actionEnglish->setChecked(false);
ui->actionOS_Default->setChecked(false); ui->actionOS_Default->setChecked(false);
qDebug() << Q_FUNC_INFO << "Changed Language to hebrew"; qDebug() << Q_FUNC_INFO << "Changed Language to hebrew";
data->setLocal("he"); data->setLocal("he");
QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
} }
else else
ui->actionHebrew->setChecked(true); ui->actionHebrew->setChecked(true);
} }
void MainScreen::on_actionEnglish_triggered() void MainScreen::on_actionEnglish_triggered()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
if (ui->actionHebrew->isChecked() || ui->actionOS_Default->isChecked()) if (ui->actionHebrew->isChecked() || ui->actionOS_Default->isChecked())
{ {
ui->actionHebrew->setChecked(false); ui->actionHebrew->setChecked(false);
ui->actionOS_Default->setChecked(false); ui->actionOS_Default->setChecked(false);
qDebug() << Q_FUNC_INFO << "Changed Language to English"; qDebug() << Q_FUNC_INFO << "Changed Language to English";
data->setLocal("en"); data->setLocal("en");
QMessageBox::information(this,"Settings",tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); QMessageBox::information(this,"Settings",tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
} }
else else
ui->actionEnglish->setChecked(true); ui->actionEnglish->setChecked(true);
} }
void MainScreen::on_actionOS_Default_triggered() void MainScreen::on_actionOS_Default_triggered()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
if (ui->actionHebrew->isChecked() || ui->actionEnglish->isChecked()) if (ui->actionHebrew->isChecked() || ui->actionEnglish->isChecked())
{ {
ui->actionHebrew->setChecked(false); ui->actionHebrew->setChecked(false);
ui->actionEnglish->setChecked(false); ui->actionEnglish->setChecked(false);
qDebug() << Q_FUNC_INFO << "Changed Language to OS Default"; qDebug() << Q_FUNC_INFO << "Changed Language to OS Default";
data->setLocal("default"); data->setLocal("default");
QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
} }
else else
ui->actionOS_Default->setChecked(true); ui->actionOS_Default->setChecked(true);
} }
void MainScreen::checkLocale() void MainScreen::checkLocale()
{ {
if(data->getLocal() == "en") if(data->getLocal() == "en")
{ {
ui->actionHebrew->setChecked(false); ui->actionHebrew->setChecked(false);
ui->actionOS_Default->setChecked(false); ui->actionOS_Default->setChecked(false);
ui->actionEnglish->setChecked(true); ui->actionEnglish->setChecked(true);
}else if(data->getLocal() == "he"){ }else if(data->getLocal() == "he"){
ui->actionHebrew->setChecked(true); ui->actionHebrew->setChecked(true);
ui->actionOS_Default->setChecked(false); ui->actionOS_Default->setChecked(false);
ui->actionEnglish->setChecked(false); ui->actionEnglish->setChecked(false);
}else{ }else{
ui->actionHebrew->setChecked(false); ui->actionHebrew->setChecked(false);
ui->actionOS_Default->setChecked(true); ui->actionOS_Default->setChecked(true);
ui->actionEnglish->setChecked(false); ui->actionEnglish->setChecked(false);
} }
} }
void MainScreen::on_labelMadeBy_linkActivated(const QString &link)
{
qDebug() << Q_FUNC_INFO << "link: " << link;
}

View file

@ -65,6 +65,8 @@ private slots:
void on_spinBoxCoursesToSemester_valueChanged(int arg1); void on_spinBoxCoursesToSemester_valueChanged(int arg1);
void on_labelMadeBy_linkActivated(const QString &link);
private: private:
void checkLocale(); void checkLocale();

View file

@ -17,7 +17,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>JCE Avg Calculator</string> <string>JCE Manager</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="../resources/connectionstatus.qrc"> <iconset resource="../resources/connectionstatus.qrc">
@ -61,7 +61,7 @@ background: qlineargradient(spread:pad, x1:0.496, y1:0, x2:0.508, y2:1, stop:0 r
<enum>QTabWidget::Rounded</enum> <enum>QTabWidget::Rounded</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>0</number>
</property> </property>
<property name="documentMode"> <property name="documentMode">
<bool>false</bool> <bool>false</bool>
@ -627,7 +627,7 @@ font-size: 15px;
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="labelMadeBy">
<property name="text"> <property name="text">
<string>&lt;p align=&quot;center&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</string> <string>&lt;p align=&quot;center&quot;&gt;Made By &lt;a href=&quot;http://liranbg.github.io/JceManager/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;JceManager&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</string>
</property> </property>

View file

@ -3,18 +3,17 @@
/** /**
* @brief jceSSLClient::jceSSLClient Constructer, setting the signals * @brief jceSSLClient::jceSSLClient Constructer, setting the signals
*/ */
jceSSLClient::jceSSLClient() : flag(false), packet(""), networkConf(), reConnection(false) jceSSLClient::jceSSLClient() : flag(false), packet(""),networkConf(), reConnection(false)
{ {
//setting signals //setting signals
connect(this,SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(checkErrors(QAbstractSocket::SocketError))); connect(this,SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(checkErrors(QAbstractSocket::SocketError)));
connect(this,SIGNAL(connected()),this,SLOT(setConnected())); connect(this,SIGNAL(connected()),this,SLOT(setConnected()));
connect(this,SIGNAL(encrypted()),this,SLOT(setEncrypted())); connect(this,SIGNAL(encrypted()),this,SLOT(setEncrypted()));
connect(this,SIGNAL(disconnected()),this,SLOT(setDisconnected())); connect(this,SIGNAL(disconnected()),this,SLOT(setDisconnected()));
connect(&networkConf,SIGNAL(onlineStateChanged(bool)),this,SLOT(setOnlineState(bool))); connect(&networkConf,SIGNAL(onlineStateChanged(bool)),this,SLOT(setOnlineState(bool)));
//loop event will connect the server, and when it is connected, it will quit - but connection will be open
//loop event will connect the server, and when it is connected, it will quit - but connection will be open connect(this, SIGNAL(encrypted()), &loop, SLOT(quit()));
connect(this, SIGNAL(encrypted()), &loop, SLOT(quit())); connect(this, SIGNAL(error(QAbstractSocket::SocketError)),&loop,SLOT(quit()));
connect(this, SIGNAL(error(QAbstractSocket::SocketError)),&loop,SLOT(quit()));
} }
/** /**
@ -25,34 +24,48 @@ jceSSLClient::jceSSLClient() : flag(false), packet(""), networkConf(), reConnect
*/ */
bool jceSSLClient::makeConnect(QString server, int port) bool jceSSLClient::makeConnect(QString server, int port)
{ {
if (this->networkConf.isOnline() == false) if (this->supportsSsl() == false)
return false;
if (reConnection) //reset reconnectiong flag
{ {
qDebug() << Q_FUNC_INFO << "Making Reconnection"; qCritical() << Q_FUNC_INFO << "Couldnt load ssl package. ERROR";
return false;
} }
else else
qDebug() << Q_FUNC_INFO << "Making Connection"; qDebug() << Q_FUNC_INFO << "ssl loaded.";
if (isConnected()) if (isConnectedToNetwork() == false)
{ {
qDebug() << Q_FUNC_INFO << "flag=true, calling makeDisconnect()"; qDebug() << Q_FUNC_INFO << "return false. not online";
makeDiconnect(); return false;
}
else
qDebug() << Q_FUNC_INFO << "we're online";
if (reConnection) //reset reconnectiong flag
{
qDebug() << Q_FUNC_INFO << "Making Reconnection";
}
else
qDebug() << Q_FUNC_INFO << "Making Connection";
if (isConnected())
{
qDebug() << Q_FUNC_INFO << "flag=true, calling makeDisconnect()";
makeDiconnect();
} }
qDebug() << Q_FUNC_INFO << "Connection to: " << server << "On Port: " << port; qDebug() << Q_FUNC_INFO << "Connection to: " << server << "On Port: " << port;
connectToHostEncrypted(server.toStdString().c_str(), port); connectToHostEncrypted(server.toStdString().c_str(), port);
loop.exec(); //starting connection, waiting to encryption and then it ends loop.exec(); //starting connection, waiting to encryption and then it ends
qDebug() << Q_FUNC_INFO << "returning the connection status: " << isConnected(); qDebug() << Q_FUNC_INFO << "returning the connection status: " << isConnected();
if (reConnection) if (reConnection)
{ {
reConnection = false; reConnection = false;
emit serverDisconnectedbyRemote(); emit serverDisconnectedbyRemote();
} }
return isConnected(); return isConnected();
} }
/** /**
@ -61,15 +74,15 @@ bool jceSSLClient::makeConnect(QString server, int port)
*/ */
bool jceSSLClient::makeDiconnect() bool jceSSLClient::makeDiconnect()
{ {
if (loop.isRunning()) if (loop.isRunning())
{ {
qWarning() << Q_FUNC_INFO << "Killing connection thread"; qWarning() << Q_FUNC_INFO << "Killing connection thread";
loop.exit(); loop.exit();
} }
qDebug() << Q_FUNC_INFO << "disconnecting from host and emitting disconnected()"; qDebug() << Q_FUNC_INFO << "disconnecting from host and emitting disconnected()";
this->disconnectFromHost(); //emits disconnected > setDisconnected this->disconnectFromHost(); //emits disconnected > setDisconnected
setSocketState(QAbstractSocket::SocketState::UnconnectedState); setSocketState(QAbstractSocket::SocketState::UnconnectedState);
return (!isConnected()); return (!isConnected());
} }
@ -79,30 +92,30 @@ bool jceSSLClient::makeDiconnect()
*/ */
bool jceSSLClient::isConnected() bool jceSSLClient::isConnected()
{ {
bool tempFlag; bool tempFlag = false;
//checking state before returning flag! //checking state before returning flag!
if (state() == QAbstractSocket::SocketState::UnconnectedState) if (state() == QAbstractSocket::SocketState::UnconnectedState)
{ {
tempFlag = false; tempFlag = false;
} }
else if (state() == QAbstractSocket::SocketState::ClosingState) else if (state() == QAbstractSocket::SocketState::ClosingState)
{ {
tempFlag = false; tempFlag = false;
} }
else if (state() == QAbstractSocket::SocketState::ConnectedState) else if (state() == QAbstractSocket::SocketState::ConnectedState)
{ {
if (this->networkConf.isOnline()) if (isConnectedToNetwork())
tempFlag = true; tempFlag = true;
else else
{ {
this->setSocketState(QAbstractSocket::SocketState::UnconnectedState); this->setSocketState(QAbstractSocket::SocketState::UnconnectedState);
tempFlag = false; tempFlag = false;
} }
} }
if (!this->networkConf.isOnline()) //no link, ethernet\wifi if (!isConnectedToNetwork()) //no link, ethernet\wifi
tempFlag = false; tempFlag = false;
return ((flag) && (tempFlag)); return ((flag) && (tempFlag));
} }
/** /**
* @brief jceSSLClient::sendData - given string, send it to server * @brief jceSSLClient::sendData - given string, send it to server
@ -111,15 +124,16 @@ bool jceSSLClient::isConnected()
*/ */
bool jceSSLClient::sendData(QString str) bool jceSSLClient::sendData(QString str)
{ {
bool sendDataFlag = false; bool sendDataFlag = false;
if (isConnected()) //if connected
if (isConnected()) //if connected
{ {
write(str.toStdString().c_str(),str.length()); write(str.toStdString().c_str(),str.length());
if (waitForBytesWritten()) if (waitForBytesWritten())
sendDataFlag = true; sendDataFlag = true;
} }
qDebug() << Q_FUNC_INFO << "Sending Data status is: " << sendDataFlag; qDebug() << Q_FUNC_INFO << "Sending Data status is: " << sendDataFlag;
return sendDataFlag; return sendDataFlag;
} }
/** /**
* @brief jceSSLClient::recieveData * @brief jceSSLClient::recieveData
@ -129,39 +143,39 @@ bool jceSSLClient::sendData(QString str)
*/ */
bool jceSSLClient::recieveData(QString &str, bool fast) bool jceSSLClient::recieveData(QString &str, bool fast)
{ {
qDebug() << Q_FUNC_INFO << "Data receiving!"; qDebug() << Q_FUNC_INFO << "Data receiving!";
packet = ""; packet = "";
bool sflag = false; bool sflag = false;
if (fast) //fast mode connection, good only for login step!!!! if (fast) //fast mode connection, good only for login step!!!!
{ {
qDebug() << "jceSSLClient::recieveData login step receiving"; qDebug() << "jceSSLClient::recieveData login step receiving";
QEventLoop loop; QEventLoop loop;
connect(this, SIGNAL(readyRead()), &loop, SLOT(quit())); connect(this, SIGNAL(readyRead()), &loop, SLOT(quit()));
connect(this, SIGNAL(readyRead()), this, SLOT(readIt())); connect(this, SIGNAL(readyRead()), this, SLOT(readIt()));
loop.exec(); loop.exec();
disconnect(this, SIGNAL(readyRead()), &loop, SLOT(quit())); disconnect(this, SIGNAL(readyRead()), &loop, SLOT(quit()));
disconnect(this, SIGNAL(readyRead()), this, SLOT(readIt())); disconnect(this, SIGNAL(readyRead()), this, SLOT(readIt()));
} }
else else
{ {
qDebug() << "jceSSLClient::recieveData normal receiving"; qDebug() << "jceSSLClient::recieveData normal receiving";
QString p; QString p;
while (waitForReadyRead(milisTimeOut)) while (waitForReadyRead(milisTimeOut))
{ {
do do
{ {
p = readAll(); p = readAll();
packet.append(p); packet.append(p);
}while (p.size() > 0); }while (p.size() > 0);
} }
} }
str = packet; str = packet;
qDebug() << Q_FUNC_INFO << "received bytes: " << str.length() ; qDebug() << Q_FUNC_INFO << "received bytes: " << str.length() ;
if (str.length() > 0) if (str.length() > 0)
sflag = true; sflag = true;
qDebug() << Q_FUNC_INFO << "return with flag: " << sflag; qDebug() << Q_FUNC_INFO << "return with flag: " << sflag;
return sflag; return sflag;
} }
/** /**
@ -169,29 +183,29 @@ bool jceSSLClient::recieveData(QString &str, bool fast)
*/ */
void jceSSLClient::readIt() void jceSSLClient::readIt()
{ {
QString p; QString p;
do do
{ {
p = readAll(); p = readAll();
packet.append(p); packet.append(p);
}while (p.size() > 0); }while (p.size() > 0);
} }
void jceSSLClient::setOnlineState(bool isOnline) void jceSSLClient::setOnlineState(bool isOnline)
{ {
qWarning() << Q_FUNC_INFO << "isOnline status change: " << isOnline; qWarning() << Q_FUNC_INFO << "isOnline status change: " << isOnline;
if (isOnline) //to be added later if (isOnline) //to be added later
{ {
qDebug() << Q_FUNC_INFO << "Online Statue has been changed. we are online"; qDebug() << Q_FUNC_INFO << "Online Statue has been changed. we are online";
//we can add here auto reconnect if wifi\ethernet link has appear //we can add here auto reconnect if wifi\ethernet link has appear
//will be added next version //will be added next version
} }
else else
{ {
qWarning() << Q_FUNC_INFO << "Online State has been changed. emitting NoInternetLink"; qWarning() << Q_FUNC_INFO << "Online State has been changed. emitting NoInternetLink";
this->makeDiconnect(); this->makeDiconnect();
emit noInternetLink(); emit noInternetLink();
} }
} }
@ -200,19 +214,19 @@ void jceSSLClient::setOnlineState(bool isOnline)
*/ */
void jceSSLClient::setConnected() void jceSSLClient::setConnected()
{ {
waitForEncrypted(); waitForEncrypted();
} }
/** /**
* @brief jceSSLClient::setDisconnected closing socket, updating state and setting flag to false * @brief jceSSLClient::setDisconnected closing socket, updating state and setting flag to false
*/ */
void jceSSLClient::setDisconnected() void jceSSLClient::setDisconnected()
{ {
qDebug() << Q_FUNC_INFO << "connection has been DISCONNECTED"; qDebug() << Q_FUNC_INFO << "connection has been DISCONNECTED";
this->setSocketState(QAbstractSocket::SocketState::UnconnectedState); this->setSocketState(QAbstractSocket::SocketState::UnconnectedState);
packet.clear(); packet.clear();
flag = false; flag = false;
if (reConnection) if (reConnection)
makeConnect(); makeConnect();
} }
@ -221,14 +235,14 @@ void jceSSLClient::setDisconnected()
*/ */
void jceSSLClient::setEncrypted() void jceSSLClient::setEncrypted()
{ {
qDebug() << Q_FUNC_INFO << "connection has been ENCRYPTED"; qDebug() << Q_FUNC_INFO << "connection has been ENCRYPTED";
setReadBufferSize(10000); setReadBufferSize(10000);
setSocketOption(QAbstractSocket::KeepAliveOption,true); setSocketOption(QAbstractSocket::KeepAliveOption,true);
flag = true; flag = true;
if (!isConnected()) if (!isConnected())
{ {
qWarning() << Q_FUNC_INFO << "Connection status didnt change! reseting flag to false"; qWarning() << Q_FUNC_INFO << "Connection status didnt change! reseting flag to false";
flag = false; flag = false;
} }
} }
@ -239,116 +253,116 @@ void jceSSLClient::setEncrypted()
*/ */
void jceSSLClient::showIfErrorMsg() void jceSSLClient::showIfErrorMsg()
{ {
QMessageBox msgBox; QMessageBox msgBox;
SocketError enumError = error(); SocketError enumError = error();
QString errorString; QString errorString;
bool relevantError = false; bool relevantError = false;
switch (enumError) switch (enumError)
{ {
case QAbstractSocket::SocketError::ConnectionRefusedError: /**/ case QAbstractSocket::SocketError::ConnectionRefusedError: /**/
errorString = QObject::tr("ConnectionRefusedError"); errorString = QObject::tr("ConnectionRefusedError");
//The connection was refused by the peer (or timed out). //The connection was refused by the peer (or timed out).
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::RemoteHostClosedError: /**/ case QAbstractSocket::SocketError::RemoteHostClosedError: /**/
errorString = QObject::tr("RemoteHostClosedError"); errorString = QObject::tr("RemoteHostClosedError");
//The remote host closed the connection //The remote host closed the connection
if (networkConf.isOnline()) //we can reconnect if (isConnectedToNetwork()) //we can reconnect
{ {
reConnection = true; reConnection = true;
} }
else else
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::HostNotFoundError: /**/ case QAbstractSocket::SocketError::HostNotFoundError: /**/
errorString = QObject::tr("HostNotFoundError"); errorString = QObject::tr("HostNotFoundError");
//The host address was not found. //The host address was not found.
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::SocketAccessError: /**/ case QAbstractSocket::SocketError::SocketAccessError: /**/
errorString = QObject::tr("SocketAccessError"); errorString = QObject::tr("SocketAccessError");
//The socket operation failed because the application lacked the required privileges. //The socket operation failed because the application lacked the required privileges.
break; break;
case QAbstractSocket::SocketError::SocketTimeoutError: /**/ case QAbstractSocket::SocketError::SocketTimeoutError: /**/
errorString = QObject::tr("SocketTimeoutError"); errorString = QObject::tr("SocketTimeoutError");
//The socket operation timed out. //The socket operation timed out.
if (isConnected()); //ignore it if connected. if (isConnected()); //ignore it if connected.
else else
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::NetworkError: /**/ case QAbstractSocket::SocketError::NetworkError: /**/
errorString = QObject::tr("NetworkError"); errorString = QObject::tr("NetworkError");
//An error occurred with the network (e.g., the network cable was accidentally plugged out). //An error occurred with the network (e.g., the network cable was accidentally plugged out).
if (networkConf.isOnline()) //we can reconnect if (isConnectedToNetwork()) //we can reconnect
{ {
} }
else else
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::SslHandshakeFailedError: /**/ case QAbstractSocket::SocketError::SslHandshakeFailedError: /**/
errorString = QObject::tr("SslHandshakeFailedError"); errorString = QObject::tr("SslHandshakeFailedError");
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::SslInternalError: /**/ case QAbstractSocket::SocketError::SslInternalError: /**/
errorString = QObject::tr("SslInternalError"); errorString = QObject::tr("SslInternalError");
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::SslInvalidUserDataError: /**/ case QAbstractSocket::SocketError::SslInvalidUserDataError: /**/
errorString = QObject::tr("SslInvalidUserDataError"); errorString = QObject::tr("SslInvalidUserDataError");
relevantError = true; relevantError = true;
break; break;
case QAbstractSocket::SocketError::DatagramTooLargeError: //not relevant to us case QAbstractSocket::SocketError::DatagramTooLargeError: //not relevant to us
errorString = QObject::tr("DatagramTooLargeError"); errorString = QObject::tr("DatagramTooLargeError");
break; break;
case QAbstractSocket::SocketError::SocketResourceError: //not relevant to us case QAbstractSocket::SocketError::SocketResourceError: //not relevant to us
break; break;
case QAbstractSocket::SocketError::OperationError: //not relevant, except for debug case QAbstractSocket::SocketError::OperationError: //not relevant, except for debug
errorString = QObject::tr("OperationError"); errorString = QObject::tr("OperationError");
break; break;
case QAbstractSocket::SocketError::AddressInUseError: //not relevant to us case QAbstractSocket::SocketError::AddressInUseError: //not relevant to us
errorString = QObject::tr("AddressInUseError"); errorString = QObject::tr("AddressInUseError");
break; break;
case QAbstractSocket::SocketError::SocketAddressNotAvailableError: //not relevant to us case QAbstractSocket::SocketError::SocketAddressNotAvailableError: //not relevant to us
errorString = QObject::tr("SocketAddressNotAvailableError"); errorString = QObject::tr("SocketAddressNotAvailableError");
break; break;
case QAbstractSocket::SocketError::UnsupportedSocketOperationError: //for very old computers, not relevant to us case QAbstractSocket::SocketError::UnsupportedSocketOperationError: //for very old computers, not relevant to us
errorString = QObject::tr("UnsupportedSocketOperationError"); errorString = QObject::tr("UnsupportedSocketOperationError");
break; break;
case QAbstractSocket::SocketError::ProxyAuthenticationRequiredError: //not relevant to us case QAbstractSocket::SocketError::ProxyAuthenticationRequiredError: //not relevant to us
errorString = QObject::tr("ProxyAuthenticationRequiredError"); errorString = QObject::tr("ProxyAuthenticationRequiredError");
break; break;
case QAbstractSocket::SocketError::ProxyConnectionRefusedError: //not relevant to us case QAbstractSocket::SocketError::ProxyConnectionRefusedError: //not relevant to us
errorString = QObject::tr("ProxyConnectionRefusedError"); errorString = QObject::tr("ProxyConnectionRefusedError");
break; break;
case QAbstractSocket::SocketError::UnfinishedSocketOperationError: //not relevant to us case QAbstractSocket::SocketError::UnfinishedSocketOperationError: //not relevant to us
errorString = QObject::tr("UnfinishedSocketOperationError"); errorString = QObject::tr("UnfinishedSocketOperationError");
break; break;
case QAbstractSocket::SocketError::ProxyConnectionClosedError: //not relevant to us case QAbstractSocket::SocketError::ProxyConnectionClosedError: //not relevant to us
errorString = QObject::tr("ProxyConnectionClosedError"); errorString = QObject::tr("ProxyConnectionClosedError");
break; break;
case QAbstractSocket::SocketError::ProxyConnectionTimeoutError: //not relevant to us case QAbstractSocket::SocketError::ProxyConnectionTimeoutError: //not relevant to us
errorString = QObject::tr("ProxyConnectionTimeoutError"); errorString = QObject::tr("ProxyConnectionTimeoutError");
break; break;
case QAbstractSocket::SocketError::ProxyNotFoundError: //not relevant to us case QAbstractSocket::SocketError::ProxyNotFoundError: //not relevant to us
errorString = QObject::tr("ProxyNotFoundError"); errorString = QObject::tr("ProxyNotFoundError");
break; break;
case QAbstractSocket::SocketError::ProxyProtocolError: //not relevant to us case QAbstractSocket::SocketError::ProxyProtocolError: //not relevant to us
errorString = QObject::tr("ProxyProtocolError"); errorString = QObject::tr("ProxyProtocolError");
break; break;
case QAbstractSocket::SocketError::TemporaryError: //not relevant to us case QAbstractSocket::SocketError::TemporaryError: //not relevant to us
errorString = QObject::tr("TemporaryError"); errorString = QObject::tr("TemporaryError");
break; break;
case QAbstractSocket::SocketError::UnknownSocketError: //not relevant, except for debug case QAbstractSocket::SocketError::UnknownSocketError: //not relevant, except for debug
errorString = QObject::tr("UnknownSocketError"); errorString = QObject::tr("UnknownSocketError");
relevantError = true; relevantError = true;
break; break;
} }
if (relevantError) //informative string to be shown if (relevantError) //informative string to be shown
{ {
qDebug() << Q_FUNC_INFO << "relevant error."; qDebug() << Q_FUNC_INFO << "relevant error.";
msgBox.setIcon(QMessageBox::Warning); msgBox.setIcon(QMessageBox::Warning);
msgBox.setText(errorString); msgBox.setText(errorString);
msgBox.exec(); msgBox.exec();
} }
} }
/** /**
@ -357,14 +371,46 @@ void jceSSLClient::showIfErrorMsg()
*/ */
void jceSSLClient::checkErrors(QAbstractSocket::SocketError a) void jceSSLClient::checkErrors(QAbstractSocket::SocketError a)
{ {
//ignore this stupid error //ignore this stupid error
if (!((isConnected()) && (a == QAbstractSocket::SocketError::SocketTimeoutError))) bool timeout = (a == QAbstractSocket::SocketError::SocketTimeoutError);
if (!((isConnected()) && (timeout)))
{ {
qWarning() << Q_FUNC_INFO << "isOnline?: " << this->networkConf.isOnline(); qWarning() << Q_FUNC_INFO << "isOnline?: " << isConnectedToNetwork();
qWarning() << Q_FUNC_INFO << "state is: " << state(); qWarning() << Q_FUNC_INFO << "state is: " << state();
qWarning() << Q_FUNC_INFO << "Var Error: " << a; qWarning() << Q_FUNC_INFO << "Var Error: " << a;
qWarning() << Q_FUNC_INFO << "Error: " << errorString(); qWarning() << Q_FUNC_INFO << "Error: " << errorString();
} }
showIfErrorMsg(); else
{
qDebug() << Q_FUNC_INFO << "isConnected?: " << isConnected() << "is timeout?" << timeout;
qWarning() << Q_FUNC_INFO << "isOnline?: " << isConnectedToNetwork();
qWarning() << Q_FUNC_INFO << "state is: " << state();
qWarning() << Q_FUNC_INFO << "Var Error: " << a;
qWarning() << Q_FUNC_INFO << "Error: " << errorString();
}
showIfErrorMsg();
}
/** written by KARAN BALKAR
* @brief jceSSLClient::isConnectedToNetwork
* @return
*/
bool jceSSLClient::isConnectedToNetwork(){
QList<QNetworkInterface> ifaces = QNetworkInterface::allInterfaces();
bool result = false;
for (int i = 0; i < ifaces.count(); ++i)
{
QNetworkInterface iface = ifaces.at(i);
if ( iface.flags().testFlag(QNetworkInterface::IsUp) && !iface.flags().testFlag(QNetworkInterface::IsLoopBack))
for (int j=0; j < iface.addressEntries().count(); ++j)
// got an interface which is up, and has an ip address
if (result == false)
result = true;
}
return result;
} }

View file

@ -7,6 +7,7 @@
#include <QEventLoop> #include <QEventLoop>
#include <QMessageBox> #include <QMessageBox>
#include <QNetworkConfigurationManager> #include <QNetworkConfigurationManager>
#include <QtNetwork/QNetworkInterface>
#define milisTimeOut 4000 #define milisTimeOut 4000
@ -37,6 +38,7 @@ private slots:
void setOnlineState(bool isOnline); void setOnlineState(bool isOnline);
private: private:
bool isConnectedToNetwork(); //checking if online
bool flag; bool flag;
QString packet; QString packet;
QEventLoop loop; //handle the connection as thread QEventLoop loop; //handle the connection as thread