QTfrontend/selectWeapon.cpp
changeset 719 bea32693bd7a
parent 718 f93a38d2c982
child 723 35f7bdb93268
equal deleted inserted replaced
718:f93a38d2c982 719:bea32693bd7a
    45   lbl->setPixmap(QPixmap::fromImage(getAmmoImage(iconNum)));
    45   lbl->setPixmap(QPixmap::fromImage(getAmmoImage(iconNum)));
    46   lbl->setMaximumWidth(30);
    46   lbl->setMaximumWidth(30);
    47   lbl->setGeometry(0, 0, 30, 30);
    47   lbl->setGeometry(0, 0, 30, 30);
    48   hbLayout->addWidget(lbl);
    48   hbLayout->addWidget(lbl);
    49 
    49 
    50   item=new WeaponItem(QImage(":/res/hh25x25.png"), this);
    50   item=new WeaponItem(QImage(":/res/ammopic.png"), this);
    51   item->setItemsNum(wNum);
    51   item->setItemsNum(wNum);
    52   item->setInfinityState(true);
    52   item->setInfinityState(true);
    53   hbLayout->addWidget(item);
    53   hbLayout->addWidget(item);
    54 
    54 
    55   hbLayout->setStretchFactor(lbl, 1);
    55   hbLayout->setStretchFactor(lbl, 1);
    91     weaponItems[i]=new SelWeaponItem(i, currentState[i].digitValue(), this);
    91     weaponItems[i]=new SelWeaponItem(i, currentState[i].digitValue(), this);
    92     pLayout->addWidget(weaponItems[i], j, k%4);
    92     pLayout->addWidget(weaponItems[i], j, k%4);
    93     ++k;
    93     ++k;
    94   }
    94   }
    95 
    95 
       
    96   pLayout->setRowStretch(5, 100);
    96   m_name = new QLineEdit(this);
    97   m_name = new QLineEdit(this);
    97   pLayout->addWidget(m_name, i, 0, 1, 4);
    98   pLayout->addWidget(m_name, i, 0, 1, 5);
    98 }
    99 }
    99 
   100 
   100 void SelWeaponWidget::setWeapons(const QString& ammo)
   101 void SelWeaponWidget::setWeapons(const QString& ammo)
   101 {
   102 {
   102   for(int i=0; i<m_numItems; ++i) {
   103   for(int i=0; i<m_numItems; ++i) {