source: mmcs/stackwidget.C @ 9dd61b1

matrices
Last change on this file since 9dd61b1 was 9dd61b1, checked in by rboet <rboet@…>, 9 years ago

Avance del proyecto 60%

  • Property mode set to 100644
File size: 846 bytes
Line 
1#include "stackwidget.H"
2
3StackWidget::StackWidget(int accountNumber, QWidget *parent) :
4    QWidget(parent)
5{
6    layoutMain = new QVBoxLayout;
7
8    comboAccount = new QComboBox(this);
9
10    stackedWidget = new QStackedWidget(this);
11
12    stackedWidget->setObjectName("StackAccount");
13
14    for (int i = 0;i < accountNumber; ++i)
15    {
16        comboAccount->addItem(QString("Cuenta %1").arg(i + 1));
17
18        comboAccount->setObjectName(QString("Cuenta %1").arg(i+1));
19
20        AccountWidget * widget = new AccountWidget(i,stackedWidget);
21
22        stackedWidget->addWidget(widget);
23
24        widgetList.append(widget);
25
26    }
27
28    layoutMain->addWidget(comboAccount);
29    layoutMain->addWidget(stackedWidget);
30
31
32    setLayout(layoutMain);
33
34    connect(comboAccount, SIGNAL(activated(int)),
35            stackedWidget, SLOT(setCurrentIndex(int)));
36}
37
Note: See TracBrowser for help on using the repository browser.