QTfrontend/pages.cpp
changeset 4153 6bd94e4c5d65
parent 4147 5efa80494e31
child 4166 1b68bdad0336
equal deleted inserted replaced
4152:07008cb354f9 4153:6bd94e4c5d65
  1620     SB_SuddenDeath->setValue(15);
  1620     SB_SuddenDeath->setValue(15);
  1621     SB_SuddenDeath->setSingleStep(3);
  1621     SB_SuddenDeath->setSingleStep(3);
  1622     glBSLayout->addWidget(SB_SuddenDeath,3,2,1,1);
  1622     glBSLayout->addWidget(SB_SuddenDeath,3,2,1,1);
  1623 
  1623 
  1624     l = new QLabel(gbBasicSettings);
  1624     l = new QLabel(gbBasicSettings);
       
  1625     l->setText(QLabel::tr("Sudden Death Water Rise"));
       
  1626     l->setWordWrap(true);
       
  1627     glBSLayout->addWidget(l,4,0,1,1);
       
  1628     l = new QLabel(gbBasicSettings);
       
  1629     l->setFixedSize(32,32);
       
  1630     l->setPixmap(QPixmap(":/res/iconSuddenDeath.png")); // TODO: icon
       
  1631     glBSLayout->addWidget(l,4,1,1,1);
       
  1632     SB_WaterRise = new QSpinBox(gbBasicSettings);
       
  1633     SB_WaterRise->setRange(0, 100);
       
  1634     SB_WaterRise->setValue(47);
       
  1635     SB_WaterRise->setSingleStep(5);
       
  1636     glBSLayout->addWidget(SB_WaterRise,4,2,1,1);
       
  1637 
       
  1638     l = new QLabel(gbBasicSettings);
       
  1639     l->setText(QLabel::tr("Sudden Death Health Decrease"));
       
  1640     l->setWordWrap(true);
       
  1641     glBSLayout->addWidget(l,5,0,1,1);
       
  1642     l = new QLabel(gbBasicSettings);
       
  1643     l->setFixedSize(32,32);
       
  1644     l->setPixmap(QPixmap(":/res/iconSuddenDeath.png")); // TODO: icon
       
  1645     glBSLayout->addWidget(l,5,1,1,1);
       
  1646     SB_HealthDecrease = new QSpinBox(gbBasicSettings);
       
  1647     SB_HealthDecrease->setRange(0, 100);
       
  1648     SB_HealthDecrease->setValue(5);
       
  1649     SB_HealthDecrease->setSingleStep(1);
       
  1650     glBSLayout->addWidget(SB_HealthDecrease,5,2,1,1);
       
  1651 
       
  1652     l = new QLabel(gbBasicSettings);
  1625     l->setText(QLabel::tr("Crate Drops"));
  1653     l->setText(QLabel::tr("Crate Drops"));
  1626     l->setWordWrap(true);
  1654     l->setWordWrap(true);
  1627     glBSLayout->addWidget(l,4,0,1,1);
  1655     glBSLayout->addWidget(l,6,0,1,1);
  1628     l = new QLabel(gbBasicSettings);
  1656     l = new QLabel(gbBasicSettings);
  1629     l->setFixedSize(32,32);
  1657     l->setFixedSize(32,32);
  1630     l->setPixmap(QPixmap(":/res/iconBox.png"));
  1658     l->setPixmap(QPixmap(":/res/iconBox.png"));
  1631     glBSLayout->addWidget(l,4,1,1,1);
  1659     glBSLayout->addWidget(l,6,1,1,1);
  1632     SB_CaseProb = new FreqSpinBox(gbBasicSettings);
  1660     SB_CaseProb = new FreqSpinBox(gbBasicSettings);
  1633     SB_CaseProb->setRange(0, 9);
  1661     SB_CaseProb->setRange(0, 9);
  1634     SB_CaseProb->setValue(5);
  1662     SB_CaseProb->setValue(5);
  1635     glBSLayout->addWidget(SB_CaseProb,4,2,1,1);
  1663     glBSLayout->addWidget(SB_CaseProb,6,2,1,1);
  1636 
  1664 
  1637     l = new QLabel(gbBasicSettings);
  1665     l = new QLabel(gbBasicSettings);
  1638     l->setText(QLabel::tr("% Health Crates"));
  1666     l->setText(QLabel::tr("% Health Crates"));
  1639     l->setWordWrap(true);
  1667     l->setWordWrap(true);
  1640     glBSLayout->addWidget(l,5,0,1,1);
  1668     glBSLayout->addWidget(l,7,0,1,1);
  1641     l = new QLabel(gbBasicSettings);
  1669     l = new QLabel(gbBasicSettings);
  1642     l->setFixedSize(32,32);
  1670     l->setFixedSize(32,32);
  1643     l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
  1671     l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
  1644     glBSLayout->addWidget(l,5,1,1,1);
  1672     glBSLayout->addWidget(l,7,1,1,1);
  1645     SB_HealthCrates = new QSpinBox(gbBasicSettings);
  1673     SB_HealthCrates = new QSpinBox(gbBasicSettings);
  1646     SB_HealthCrates->setRange(0, 100);
  1674     SB_HealthCrates->setRange(0, 100);
  1647     SB_HealthCrates->setValue(35);
  1675     SB_HealthCrates->setValue(35);
  1648     SB_HealthCrates->setSingleStep(5);
  1676     SB_HealthCrates->setSingleStep(5);
  1649     glBSLayout->addWidget(SB_HealthCrates,5,2,1,1);
  1677     glBSLayout->addWidget(SB_HealthCrates,7,2,1,1);
  1650 
  1678 
  1651     l = new QLabel(gbBasicSettings);
  1679     l = new QLabel(gbBasicSettings);
  1652     l->setText(QLabel::tr("Health in Crates"));
  1680     l->setText(QLabel::tr("Health in Crates"));
  1653     l->setWordWrap(true);
  1681     l->setWordWrap(true);
  1654     glBSLayout->addWidget(l,6,0,1,1);
  1682     glBSLayout->addWidget(l,8,0,1,1);
  1655     l = new QLabel(gbBasicSettings);
  1683     l = new QLabel(gbBasicSettings);
  1656     l->setFixedSize(32,32);
  1684     l->setFixedSize(32,32);
  1657     l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
  1685     l->setPixmap(QPixmap(":/res/iconHealth.png")); // TODO: icon
  1658     glBSLayout->addWidget(l,6,1,1,1);
  1686     glBSLayout->addWidget(l,8,1,1,1);
  1659     SB_CrateHealth = new QSpinBox(gbBasicSettings);
  1687     SB_CrateHealth = new QSpinBox(gbBasicSettings);
  1660     SB_CrateHealth->setRange(0, 200);
  1688     SB_CrateHealth->setRange(0, 200);
  1661     SB_CrateHealth->setValue(25);
  1689     SB_CrateHealth->setValue(25);
  1662     SB_CrateHealth->setSingleStep(5);
  1690     SB_CrateHealth->setSingleStep(5);
  1663     glBSLayout->addWidget(SB_CrateHealth,6,2,1,1);
  1691     glBSLayout->addWidget(SB_CrateHealth,8,2,1,1);
  1664 
  1692 
  1665     l = new QLabel(gbBasicSettings);
  1693     l = new QLabel(gbBasicSettings);
  1666     l->setText(QLabel::tr("Mines Time"));
  1694     l->setText(QLabel::tr("Mines Time"));
  1667     l->setWordWrap(true);
  1695     l->setWordWrap(true);
  1668     glBSLayout->addWidget(l,7,0,1,1);
  1696     glBSLayout->addWidget(l,9,0,1,1);
  1669     l = new QLabel(gbBasicSettings);
  1697     l = new QLabel(gbBasicSettings);
  1670     l->setFixedSize(32,32);
  1698     l->setFixedSize(32,32);
  1671     l->setPixmap(QPixmap(":/res/iconTime.png")); // TODO: icon
  1699     l->setPixmap(QPixmap(":/res/iconTime.png")); // TODO: icon
  1672     glBSLayout->addWidget(l,7,1,1,1);
  1700     glBSLayout->addWidget(l,9,1,1,1);
  1673     SB_MinesTime = new QSpinBox(gbBasicSettings);
  1701     SB_MinesTime = new QSpinBox(gbBasicSettings);
  1674     SB_MinesTime->setRange(-1, 5);
  1702     SB_MinesTime->setRange(-1, 5);
  1675     SB_MinesTime->setValue(3);
  1703     SB_MinesTime->setValue(3);
  1676     SB_MinesTime->setSingleStep(1);
  1704     SB_MinesTime->setSingleStep(1);
  1677     SB_MinesTime->setSpecialValueText(tr("Random"));
  1705     SB_MinesTime->setSpecialValueText(tr("Random"));
  1678     SB_MinesTime->setSuffix(" "+ tr("Seconds"));
  1706     SB_MinesTime->setSuffix(" "+ tr("Seconds"));
  1679     glBSLayout->addWidget(SB_MinesTime,7,2,1,1);
  1707     glBSLayout->addWidget(SB_MinesTime,9,2,1,1);
  1680 
  1708 
  1681     l = new QLabel(gbBasicSettings);
  1709     l = new QLabel(gbBasicSettings);
  1682     l->setText(QLabel::tr("Mines"));
  1710     l->setText(QLabel::tr("Mines"));
  1683     l->setWordWrap(true);
  1711     l->setWordWrap(true);
  1684     glBSLayout->addWidget(l,8,0,1,1);
  1712     glBSLayout->addWidget(l,10,0,1,1);
  1685     l = new QLabel(gbBasicSettings);
  1713     l = new QLabel(gbBasicSettings);
  1686     l->setFixedSize(32,32);
  1714     l->setFixedSize(32,32);
  1687     l->setPixmap(QPixmap(":/res/iconMine.png")); // TODO: icon
  1715     l->setPixmap(QPixmap(":/res/iconMine.png")); // TODO: icon
  1688     glBSLayout->addWidget(l,8,1,1,1);
  1716     glBSLayout->addWidget(l,10,1,1,1);
  1689     SB_Mines = new QSpinBox(gbBasicSettings);
  1717     SB_Mines = new QSpinBox(gbBasicSettings);
  1690     SB_Mines->setRange(0, 80);
  1718     SB_Mines->setRange(0, 80);
  1691     SB_Mines->setValue(0);
  1719     SB_Mines->setValue(0);
  1692     SB_Mines->setSingleStep(5);
  1720     SB_Mines->setSingleStep(5);
  1693     glBSLayout->addWidget(SB_Mines,8,2,1,1);
  1721     glBSLayout->addWidget(SB_Mines,10,2,1,1);
  1694 
  1722 
  1695     l = new QLabel(gbBasicSettings);
  1723     l = new QLabel(gbBasicSettings);
  1696     l->setText(QLabel::tr("% Dud Mines"));
  1724     l->setText(QLabel::tr("% Dud Mines"));
  1697     l->setWordWrap(true);
  1725     l->setWordWrap(true);
  1698     glBSLayout->addWidget(l,9,0,1,1);
  1726     glBSLayout->addWidget(l,11,0,1,1);
  1699     l = new QLabel(gbBasicSettings);
  1727     l = new QLabel(gbBasicSettings);
  1700     l->setFixedSize(32,32);
  1728     l->setFixedSize(32,32);
  1701     l->setPixmap(QPixmap(":/res/iconDud.png"));
  1729     l->setPixmap(QPixmap(":/res/iconDud.png"));
  1702     glBSLayout->addWidget(l,9,1,1,1);
  1730     glBSLayout->addWidget(l,11,1,1,1);
  1703     SB_MineDuds = new QSpinBox(gbBasicSettings);
  1731     SB_MineDuds = new QSpinBox(gbBasicSettings);
  1704     SB_MineDuds->setRange(0, 100);
  1732     SB_MineDuds->setRange(0, 100);
  1705     SB_MineDuds->setValue(0);
  1733     SB_MineDuds->setValue(0);
  1706     SB_MineDuds->setSingleStep(5);
  1734     SB_MineDuds->setSingleStep(5);
  1707     glBSLayout->addWidget(SB_MineDuds,9,2,1,1);
  1735     glBSLayout->addWidget(SB_MineDuds,11,2,1,1);
  1708 
  1736 
  1709 
  1737 
  1710     l = new QLabel(gbBasicSettings);
  1738     l = new QLabel(gbBasicSettings);
  1711     l->setText(QLabel::tr("Explosives"));
  1739     l->setText(QLabel::tr("Explosives"));
  1712     l->setWordWrap(true);
  1740     l->setWordWrap(true);
  1713     glBSLayout->addWidget(l,10,0,1,1);
  1741     glBSLayout->addWidget(l,12,0,1,1);
  1714     l = new QLabel(gbBasicSettings);
  1742     l = new QLabel(gbBasicSettings);
  1715     l->setFixedSize(32,32);
  1743     l->setFixedSize(32,32);
  1716     l->setPixmap(QPixmap(":/res/iconDamage.png"));
  1744     l->setPixmap(QPixmap(":/res/iconDamage.png"));
  1717     glBSLayout->addWidget(l,10,1,1,1);
  1745     glBSLayout->addWidget(l,12,1,1,1);
  1718     SB_Explosives = new QSpinBox(gbBasicSettings);
  1746     SB_Explosives = new QSpinBox(gbBasicSettings);
  1719     SB_Explosives->setRange(0, 40);
  1747     SB_Explosives->setRange(0, 40);
  1720     SB_Explosives->setValue(0);
  1748     SB_Explosives->setValue(0);
  1721     SB_Explosives->setSingleStep(1);
  1749     SB_Explosives->setSingleStep(1);
  1722     glBSLayout->addWidget(SB_Explosives,10,2,1,1);
  1750     glBSLayout->addWidget(SB_Explosives,12,2,1,1);
  1723 
  1751 
  1724 
  1752 
  1725     l = new QLabel(gbBasicSettings);
  1753     l = new QLabel(gbBasicSettings);
  1726     l->setText(QLabel::tr("Scheme Name:"));
  1754     l->setText(QLabel::tr("Scheme Name:"));
  1727 
  1755 
  1781     mapper->addMapping(SB_Mines, 28);
  1809     mapper->addMapping(SB_Mines, 28);
  1782     mapper->addMapping(SB_MineDuds, 29);
  1810     mapper->addMapping(SB_MineDuds, 29);
  1783     mapper->addMapping(SB_Explosives, 30);
  1811     mapper->addMapping(SB_Explosives, 30);
  1784     mapper->addMapping(SB_HealthCrates, 31);
  1812     mapper->addMapping(SB_HealthCrates, 31);
  1785     mapper->addMapping(SB_CrateHealth, 32);
  1813     mapper->addMapping(SB_CrateHealth, 32);
       
  1814     mapper->addMapping(SB_WaterRise, 33);
       
  1815     mapper->addMapping(SB_HealthDecrease, 34);
  1786 
  1816 
  1787     mapper->toFirst();
  1817     mapper->toFirst();
  1788 }
  1818 }
  1789 
  1819 
  1790 void PageScheme::newRow()
  1820 void PageScheme::newRow()