Last change
on this file since 4c71262 was
4c71262,
checked in by rudmanmrrod <rudman22@…>, 8 years ago
|
Arreglado bug en los encadenamientos
|
-
Property mode set to
100644
|
File size:
880 bytes
|
Line | |
---|
1 | /* |
---|
2 | Creado bajo la Licencia GPL v.2.0 de la Free Software Foundation. |
---|
3 | Autor: Rodrigo Boet |
---|
4 | Fecha: 01/08/2016 |
---|
5 | */ |
---|
6 | |
---|
7 | #include <genericFunctions.h> |
---|
8 | |
---|
9 | /* |
---|
10 | Función que permite obtener los elementos distintos en una lista |
---|
11 | Autor: Rodrigo Boet |
---|
12 | Fecha: 01/08/2016 |
---|
13 | */ |
---|
14 | int diferent_elements(QStringList my_list) |
---|
15 | { |
---|
16 | QStringList elements; |
---|
17 | foreach (QString item, my_list) { |
---|
18 | if(!elements.contains(item)) |
---|
19 | { |
---|
20 | elements.append(item); |
---|
21 | } |
---|
22 | } |
---|
23 | return elements.count(); |
---|
24 | } |
---|
25 | |
---|
26 | /* |
---|
27 | Función que permite agregar un mensaje en el label cuando se selecciona la opción de componentes |
---|
28 | Autor: Rodrigo Boet |
---|
29 | Fecha: 29/07/2016 |
---|
30 | */ |
---|
31 | QStringList get_list(QTableWidget *tw, int row, int init, int end) |
---|
32 | { |
---|
33 | QStringList elements; |
---|
34 | for(int i=init;i<end;i++) |
---|
35 | { |
---|
36 | elements.append(tw->item(row,i)->text()); |
---|
37 | } |
---|
38 | return elements; |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.