source: mmcs/stackpreciosnohomogeneos.cpp

Last change on this file was 0b59ba5, checked in by rudmanmrrod <rudman22@…>, 8 years ago

Documentados los archivos adicionales

  • Property mode set to 100755
File size: 1.4 KB
Line 
1/**
2    Sistema de Manejo de Matrices de Contabilidad Social, desarrollado a partir de Mayo de 2015.
3    @file stackpreciosnohomogeneos.cpp
4    @brief Clases y métodos del stack para los precios no homógeneos
5    @date 07/09/2015
6    @author Rodrigo Boet
7    @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a>
8*/
9#include "stackpreciosnohomogeneos.h"
10
11/**
12    @brief Clase principal que realiza la funcionalidad
13    @date 07/09/2015
14    @author Rodrigo Boet
15    @param <Cuentas> Recibe un mapa con las cuenta,componentes como llave,valor
16    @param <parent> Recibe el widget que será el padre
17*/
18StackPreciosNoHomogeneos::StackPreciosNoHomogeneos(QMap<QString,QStringList> Cuentas,QWidget *parent):
19    QWidget(parent)
20{
21    layoutMain = new QHBoxLayout;
22
23    comboAccount = new QComboBox(this);
24
25    stackedWidget = new QStackedWidget(this);
26
27    int i = 0;
28    foreach(QString key, Cuentas.keys())
29    {
30
31        comboAccount->addItem(key);
32
33        comboAccount->setObjectName(QString("CuentaPBH %1").arg(i + 1));
34
35        varPNH = new variablePNH(i,Cuentas[key],stackedWidget);
36
37        stackedWidget->addWidget(varPNH);
38
39        widgetList.append(varPNH);
40
41        i++;
42    }
43
44    layoutMain->addWidget(comboAccount);
45    layoutMain->addWidget(stackedWidget);
46
47    setLayout(layoutMain);
48
49    connect(comboAccount, SIGNAL(activated(int)),
50            stackedWidget, SLOT(setCurrentIndex(int)));
51}
Note: See TracBrowser for help on using the repository browser.