// along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
#include <QtGui>
+#include <QSqlTableModel>
#include "emulauncher.h"
+#include "db/dbmediatype.h"
+#include "db/dbplatform.h"
EmuLauncher::EmuLauncher(QWidget *parent) :
QWidget(parent)
{
+ dbPlatform = 0;
+ dbMediaType = 0;
initWidgets();
layout();
//connectSignals();
platformSelectBox = new QComboBox;
selectButton = new QPushButton(tr("&Update"));
//populateMediaTypeSelectBox();
- //populatePlatformSelectBox();
+ populatePlatformSelectBox();
}
void EmuLauncher::layout()
void EmuLauncher::populateMediaTypeSelectBox()
{
-}
+ }
void EmuLauncher::populatePlatformSelectBox()
{
+ if (!dbPlatform)
+
+ dbPlatform = new DbPlatform(this);
+ QSqlQueryModel *model = dbPlatform->getDataModel();
+ if (!model)
+ return;
+ platformSelectBox->setModel(model);
+ platformSelectBox->setModelColumn(DbPlatform::EmuFrontFileObject_Name);
}
+
void EmuLauncher::updateMediaImageContainers()
{
}
class QTableView;
class QComboBox;
class QPushButton;
+class DbMediaType;
+class DbPlatform;
class EmuLauncher : public QWidget
{
QComboBox *platformSelectBox;
QComboBox *mediaTypeSelectBox;
QPushButton *selectButton;
+ DbPlatform *dbPlatform;
+ DbMediaType *dbMediaType;
void initWidgets();
void layout();
void connectSignals();