No Description

mainwindow.h 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <vector>
  4. #include <QMainWindow>
  5. #include <string>
  6. #include <QLabel>
  7. #include <QCheckBox>
  8. using namespace std;
  9. ///
  10. /// This class contains all the fucntions necessary to run
  11. /// the PasswordStrength lab.
  12. ///
  13. namespace Ui {
  14. class MainWindow;
  15. }
  16. class MainWindow : public QMainWindow
  17. {
  18. Q_OBJECT
  19. public:
  20. explicit MainWindow(QWidget *parent = 0);
  21. ~MainWindow();
  22. vector<char> V;
  23. /// \fn void MainWindow::readPass(const string &pass)
  24. /// \~English
  25. /// \brief Main function, where all the other PasswordStrength
  26. /// functions are executed
  27. /// \param pass string by reference to analyze
  28. /// \~Spanish
  29. /// \brief Funcion principal, donde todas las otras funciones de fortaleza
  30. /// de passwords son ejecutadas.
  31. /// \param pass cadena de caracteres por referencia a analizar.
  32. void readPass(const string &pass);
  33. /// \fn void MainWindow::strengthDisplay(string strength, int totalScore)
  34. /// \~English
  35. /// \brief Function to set the computed strength and total score password
  36. /// strength in the GUI.
  37. /// \param strength Computed strenght of the password.
  38. /// \param totalScore Total score of the strength of the password.
  39. /// \~Spanish
  40. /// \brief Funcion para establecer la fuerza y la puntuacion total calculada de la contrasena.
  41. /// \param strength Fuerza computada de la contrasena.
  42. /// \param totalScore Puntuacion total de la fuerza de la contrasena.
  43. void strengthDisplay(string strength, int totalScore);
  44. /// \fn void MainWindow::setNumberOfCharacters(int count, int score)
  45. /// \~English
  46. /// \brief Function to set the number of characters and score in the GUI
  47. /// \param count the number of characters found.
  48. /// \param score the score given by the count of characters found.
  49. /// \~Spanish
  50. /// \brief Funcion para establecer el number de caracteres y la puntuacion en el GUI
  51. /// \param count el numero de letras encontrado.
  52. void setNumberOfCharacters(int count, int score) ;
  53. /// \fn void MainWindow::setUpperCharacters(int count, int score)
  54. /// \~English
  55. /// \brief Function to set the number of upper case characters and score in the GUI
  56. /// \param count the number of upper case characters found.
  57. /// \param score the score given by the count of upper case characters.
  58. /// \~Spanish
  59. /// \brief Funcion para establecer el number de caracteres mayusculas y la puntuacion en el GUI
  60. /// \param count el numero de letras mayusculas encontrado.
  61. /// \param score le puntuacion dada por la cuenta de letras mayusculas encontrada.
  62. void setUpperCharacters(int count, int score) ;
  63. /// \fn void MainWindow::setLowerCharacters(int count, int score)
  64. /// \~English
  65. /// \brief Function to set the number of lower case characters and score in the GUI
  66. /// \param count the number of lower case characters found.
  67. /// \param score the score given by the count of lower case characters.
  68. /// \~Spanish
  69. /// \brief Funcion para establecer el number de caracteres minusculas y la puntuacion en el GUI
  70. /// \param count el numero de letras minusculas encontrado.
  71. /// \param score le puntuacion dada por la cuenta de letras minusculas encontrada.
  72. void setLowerCharacters(int count, int score) ;
  73. /// \fn void MainWindow::setDigits(int count, int score)
  74. /// \~English
  75. /// \brief Function to set the number of digits characters and score in the GUI
  76. /// \param count the number of digits found.
  77. /// \param score the score given by the count of digit characters.
  78. /// \~Spanish
  79. /// \brief Funcion para establecer el number de digitos y la puntuacion en el GUI
  80. /// \param count el numero de digitos encontrado.
  81. /// \param score le puntuacion dada por la cuenta de digitos encontrada.
  82. void setDigits(int count, int score) ;
  83. /// \fn void MainWindow::setSymbols(int count, int score)
  84. /// \~English
  85. /// \brief Function to set the number of symbols characters and score in the GUI
  86. /// \param count the number of symbols found.
  87. /// \param score the score given by the count of symbols.
  88. /// \~Spanish
  89. /// \brief Funcion para establecer el number de simbolos y la puntuacion en el GUI
  90. /// \param count el numero de simbolos encontrado.
  91. /// \param score le puntuacion dada por la cuenta de simbolos encontrada.
  92. void setSymbols(int count, int score) ;
  93. /// \fn void MainWindow::setMiddleDigitsOrSymbols(int count, int score)
  94. /// \~English
  95. /// \brief Function to set the number of middle digits or symbols and score in the GUI
  96. /// \param count the number of middle digits or symbols found.
  97. /// \param score the score given by the count of middle digits or symbols.
  98. /// \~Spanish
  99. /// \brief Funcion para establecer el number de simbolos o digitos entre medio y la puntuacion en el GUI
  100. /// \param count el numero de simbolos y digitos entre medio encontrado.
  101. /// \param score le puntuacion dada por la cuenta de simbolos y digitos entre medio encontrada.
  102. void setMiddleDigitsOrSymbols(int count, int score) ;
  103. /// \fn void MainWindow::setRequirements(int count, int score)
  104. /// \~English
  105. /// \brief Function to set the number password strength requirements met and score in the GUI
  106. /// \param count the number of requirements met.
  107. /// \param score the score given by requirements.
  108. /// \~Spanish
  109. /// \brief Funcion para establecer el number de requisitos cumplidos para password fuertes
  110. /// y la puntuacion en el GUI
  111. /// \param count el numero de requisitos .
  112. /// \param score le puntuacion dada por la cuenta requisitos.
  113. void setRequirements(int count, int score) ;
  114. /// \fn void MainWindow::setLettersOnly(int count, int score)
  115. /// \~English
  116. /// \brief Function to set the number of letters if there were only letters and score in the GUI
  117. /// \param count the number of letters only found.
  118. /// \param score the score given by letters only found.
  119. /// \~Spanish
  120. /// \brief Funcion para establecer el number de letras si solo habían letras
  121. /// y la puntuacion en el GUI
  122. /// \param count el numero de letras solamente encontradas .
  123. /// \param score le puntuacion dada por la cuenta solamente de letras encontradas.
  124. void setLettersOnly(int count, int score) ;
  125. /// \fn void MainWindow::setDigitsOnly(int count, int score)
  126. /// \~English
  127. /// \brief Function to set the number of digits if there were only digits and score in the GUI
  128. /// \param count the number of digits only found.
  129. /// \param score the score given by digits only found.
  130. /// \~Spanish
  131. /// \brief Funcion para establecer el number de digitos si solo habían digitos
  132. /// y la puntuacion en el GUI
  133. /// \param count el numero de digitos solamente encontradas .
  134. /// \param score le puntuacion dada por la cuenta solamente de digitos encontradas.
  135. void setDigitsOnly(int count, int score) ;
  136. /// \fn void MainWindow::setConsecutiveUpper(int count, int score)
  137. /// \~English
  138. /// \brief Function to set the number of consecutive upper characters and score in the GUI
  139. /// \param count the number of consecutive upper characters found.
  140. /// \param score the score given by the count of consecutive upper characters found.
  141. /// \~Spanish
  142. /// \brief Funcion para establecer el number de letras mayusculas consecutivas y la puntuacion en el GUI
  143. /// \param count el numero de letras mayusculas consecutivas encontrado.
  144. /// \param score le puntuacion dada por la cuenta de las letras mayusculas consecutivas.
  145. void setConsecutiveUpper(int count, int score) ;
  146. /// \fn void MainWindow::setConsecutiveLower(int count, int score)
  147. /// \~English
  148. /// \brief Function to set the number of consecutive lower characters and score in the GUI
  149. /// \param count the number of consecutive lower characters found.
  150. /// \param score the score given by the count of consecutive lower characters found.
  151. /// \~Spanish
  152. /// \brief Funcion para establecer el number de letras minusculas consecutivas y la puntuacion en el GUI
  153. /// \param count el numero de letras minusculas consecutivas encontrado.
  154. /// \param score le puntuacion dada por la cuenta de las letras minusculas consecutivas.
  155. void setConsecutiveLower(int count, int score) ;
  156. /// \fn void MainWindow::setConsecutiveDigits(int count, int score)
  157. /// \~English
  158. /// \brief Function to set the number of consecutive digits and score in the GUI
  159. /// \param count the number of consecutive digits found.
  160. /// \param score the score given by the count of consecutive digits found.
  161. /// \~Spanish
  162. /// \brief Funcion para establecer el number de digitos consecutivos y la puntuacion en el GUI
  163. /// \param count el numero de digitos consecutivos encontrado.
  164. /// \param score le puntuacion dada por la cuenta de los digitos consecutivos.
  165. void setConsecutiveDigits(int count, int score) ;
  166. private slots:
  167. void on_lineEdit_textChanged(const QString &arg1);
  168. void on_HiddenCheckBox_clicked(bool checked);
  169. private:
  170. Ui::MainWindow *ui;
  171. };
  172. #endif // MAINWINDOW_H