57 QPushButton * goToSchemePage = new QPushButton(GBoxOptions); |
57 QPushButton * goToSchemePage = new QPushButton(GBoxOptions); |
58 goToSchemePage->setToolTip(tr("Edit schemes")); |
58 goToSchemePage->setToolTip(tr("Edit schemes")); |
59 goToSchemePage->setIconSize(pmEdit.size()); |
59 goToSchemePage->setIconSize(pmEdit.size()); |
60 goToSchemePage->setIcon(pmEdit); |
60 goToSchemePage->setIcon(pmEdit); |
61 goToSchemePage->setMaximumWidth(pmEdit.width() + 6); |
61 goToSchemePage->setMaximumWidth(pmEdit.width() + 6); |
62 GBoxOptionsLayout->addWidget(goToSchemePage, 0, 2); |
62 GBoxOptionsLayout->addWidget(goToSchemePage, 0, 3); |
63 connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes())); |
63 connect(goToSchemePage, SIGNAL(clicked()), this, SLOT(jumpToSchemes())); |
64 |
64 |
65 GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0); |
65 GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0); |
66 |
66 |
67 WeaponsName = new QComboBox(GBoxOptions); |
67 WeaponsName = new QComboBox(GBoxOptions); |
68 GBoxOptionsLayout->addWidget(WeaponsName, 1, 1); |
68 GBoxOptionsLayout->addWidget(WeaponsName, 1, 2); |
69 |
69 |
70 connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int))); |
70 connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int))); |
71 |
71 |
72 QPushButton * goToWeaponPage = new QPushButton(GBoxOptions); |
72 QPushButton * goToWeaponPage = new QPushButton(GBoxOptions); |
73 goToWeaponPage->setToolTip(tr("Edit weapons")); |
73 goToWeaponPage->setToolTip(tr("Edit weapons")); |
74 goToWeaponPage->setIconSize(pmEdit.size()); |
74 goToWeaponPage->setIconSize(pmEdit.size()); |
75 goToWeaponPage->setIcon(pmEdit); |
75 goToWeaponPage->setIcon(pmEdit); |
76 goToWeaponPage->setMaximumWidth(pmEdit.width() + 6); |
76 goToWeaponPage->setMaximumWidth(pmEdit.width() + 6); |
77 GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 2); |
77 GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 3); |
78 |
|
79 connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons())); |
78 connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons())); |
80 |
79 |
81 GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Bind schemes and weapons"), GBoxOptions), 2, 0); |
80 //GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Bind schemes with weapons"), GBoxOptions), 2, 0); |
82 |
81 |
83 bindEntries = new QCheckBox(GBoxOptions); |
82 bindEntries = new QCheckBox(GBoxOptions); |
84 bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa)")); |
83 bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon")); |
85 bindEntries->setChecked(true); |
84 bindEntries->setChecked(true); |
86 GBoxOptionsLayout->addWidget(bindEntries, 2, 2); |
85 bindEntries->setMaximumWidth(42); |
|
86 bindEntries->setStyleSheet( "QCheckBox::indicator:checked { image: url(\":/res/lock.png\"); }" |
|
87 "QCheckBox::indicator:unchecked { image: url(\":/res/unlock.png\"); }" ); |
|
88 GBoxOptionsLayout->addWidget(bindEntries, 0, 1, 0, 1, Qt::AlignVCenter); |
|
89 //GBoxOptionsLayout->addWidget(bindEntries, 2, 2); |
87 |
90 |
88 connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &))); |
91 connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &))); |
89 connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &))); |
92 connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &))); |
90 connect(pMapContainer, SIGNAL(mapgenChanged(MapGenerator)), this, SLOT(mapgenChanged(MapGenerator))); |
93 connect(pMapContainer, SIGNAL(mapgenChanged(MapGenerator)), this, SLOT(mapgenChanged(MapGenerator))); |
91 connect(pMapContainer, SIGNAL(maze_sizeChanged(int)), this, SLOT(maze_sizeChanged(int))); |
94 connect(pMapContainer, SIGNAL(maze_sizeChanged(int)), this, SLOT(maze_sizeChanged(int))); |
92 connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &))); |
95 connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &))); |
93 connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int))); |
96 connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int))); |
|
97 } |
|
98 |
|
99 void GameCFGWidget::jumpToSchemes() |
|
100 { |
|
101 emit goToSchemes(GameSchemes->currentIndex()); |
94 } |
102 } |
95 |
103 |
96 void GameCFGWidget::jumpToWeapons() |
104 void GameCFGWidget::jumpToWeapons() |
97 { |
105 { |
98 emit goToWeapons(WeaponsName->currentText()); |
106 emit goToWeapons(WeaponsName->currentText()); |