+/*
+ Image Puzzle - A set your pieces straight game
+ Copyright (C) 2009 Timo Härkönen
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#include "settingsdialog.h"
#include "settings.h"
#include "defines.h"
imageCombo_ = new QComboBox;
imageCombo_->addItems(items);
+ imageCombo_->setCurrentIndex(1);
selectedImageLabel_ = new QLabel(tr("n/a"));
setLayout(mainLayout_);
connect(easyButton_, SIGNAL(toggled(bool)), this, SLOT(difficultySelectionChanged(bool)));
- connect(imageCombo_, SIGNAL(currentIndexChanged(QString)), this, SLOT(imageSelectionChanged(QString)));
+ //connect(imageCombo_, SIGNAL(currentIndexChanged(QString)), this, SLOT(imageSelectionChanged(QString)));
+ connect(imageCombo_, SIGNAL(activated(QString)), this, SLOT(imageSelectionChanged(QString)));
}
int SettingsDialog::exec()
qDebug() << "Random image selected";
// Get random image from ~/MyDocs/.images/
+ //TODO: images from other directories
QStringList filters;
filters << "*.jpg" << "*.png" << "*.xpm";
}
}
else {
- qDebug() << "Default image selected";
+ //qDebug() << "Default image selected";
Settings::instance()->setImage(0);
Settings::instance()->setImagePath("default");