equal
deleted
inserted
replaced
219 BtnTeamSave->setText(QPushButton::tr("Save")); |
219 BtnTeamSave->setText(QPushButton::tr("Save")); |
220 pageLayout->addWidget(BtnTeamSave, 4, 2); |
220 pageLayout->addWidget(BtnTeamSave, 4, 2); |
221 |
221 |
222 |
222 |
223 QDir tmpdir; |
223 QDir tmpdir; |
224 tmpdir.cd(DATA_PATH); |
224 tmpdir.cd(datadir->absolutePath()); |
225 tmpdir.cd("Forts"); |
225 tmpdir.cd("Forts"); |
226 tmpdir.setFilter(QDir::Files); |
226 tmpdir.setFilter(QDir::Files); |
227 |
227 |
228 CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L.png"), "\\1")); |
228 CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L.png"), "\\1")); |
229 tmpdir.cd("../Graphics/Graves"); |
229 tmpdir.cd("../Graphics/Graves"); |
237 connect(CBFort, SIGNAL(activated(const QString &)), this, SLOT(CBFort_activated(const QString &))); |
237 connect(CBFort, SIGNAL(activated(const QString &)), this, SLOT(CBFort_activated(const QString &))); |
238 } |
238 } |
239 |
239 |
240 void PageEditTeam::CBGrave_activated(const QString & gravename) |
240 void PageEditTeam::CBGrave_activated(const QString & gravename) |
241 { |
241 { |
242 QPixmap pix(QString(DATA_PATH) + "/Graphics/Graves/" + gravename + ".png"); |
242 QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + gravename + ".png"); |
243 GravePreview->setPixmap(pix.copy(0, 0, 32, 32)); |
243 GravePreview->setPixmap(pix.copy(0, 0, 32, 32)); |
244 } |
244 } |
245 |
245 |
246 void PageEditTeam::CBFort_activated(const QString & fortname) |
246 void PageEditTeam::CBFort_activated(const QString & fortname) |
247 { |
247 { |
248 QPixmap pix(QString(DATA_PATH) + "/Forts/" + fortname + "L.png"); |
248 QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png"); |
249 FortPreview->setPixmap(pix); |
249 FortPreview->setPixmap(pix); |
250 } |
250 } |
251 |
251 |
252 PageMultiplayer::PageMultiplayer(QWidget* parent) : QWidget(parent) |
252 PageMultiplayer::PageMultiplayer(QWidget* parent) : QWidget(parent) |
253 { |
253 { |