From b7a6faf658ca54479d523ae5cd21c18fa2b37d07 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mikko=20Kein=C3=A4nen?= Date: Sun, 30 May 2010 01:02:18 +0300 Subject: [PATCH] DbMediaImagePath replaced with more generic DbFilePath --- src/db/dbmediaimagepath.cpp | 63 ------------------------------------------- src/db/dbmediaimagepath.h | 41 ---------------------------- 2 files changed, 104 deletions(-) delete mode 100644 src/db/dbmediaimagepath.cpp delete mode 100644 src/db/dbmediaimagepath.h diff --git a/src/db/dbmediaimagepath.cpp b/src/db/dbmediaimagepath.cpp deleted file mode 100644 index c5a4200..0000000 --- a/src/db/dbmediaimagepath.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// EmuFront -// Copyright 2010 Mikko Keinänen -// -// This file is part of EmuFront. -// -// -// EmuFront 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. -// -// Foobar 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 Foobar. If not, see . - -#include -#include "dbmediaimagepath.h" -#include "../dataobjects/filepathobject.h" - -DbMediaImagePath::DbMediaImagePath(QObject *parent) : DatabaseManager(parent) -{ -} - -QSqlTableModel* DbMediaImagePath::getDataModel() -{ - return sqlTableModel; -} - -EmuFrontObject* DbMediaImagePath::getDataObjectFromModel(QModelIndex *index) -{ - return new FilePathObject; -} - -bool DbMediaImagePath::updateDataObjectToModel(const EmuFrontObject *ob) -{ - return false; -} - -bool DbMediaImagePath::insertDataObjectToModel(const EmuFrontObject *ob) -{ - return false; -} - -int DbMediaImagePath::countDataObjectRefs(int id) const -{ - return 0; -} - -// WARNING: this will delete also all the databindings to selected media image path -bool DbMediaImagePath::deleteDataObjectFromModel(QModelIndex *index) -{ - return false; -} - -QSqlTableModel* DbMediaImagePath::getData() -{ - QSqlTableModel *model = new QSqlTableModel(this); - return model; -} diff --git a/src/db/dbmediaimagepath.h b/src/db/dbmediaimagepath.h deleted file mode 100644 index be36384..0000000 --- a/src/db/dbmediaimagepath.h +++ /dev/null @@ -1,41 +0,0 @@ -// EmuFront -// Copyright 2010 Mikko Keinänen -// -// This file is part of EmuFront. -// -// -// EmuFront 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. -// -// Foobar 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 Foobar. If not, see . - -#ifndef DBMEDIAIMAGEPATH_H -#define DBMEDIAIMAGEPATH_H - -#include "databasemanager.h" - -class DbMediaImagePath : public DatabaseManager -{ -public: - DbMediaImagePath(QObject *); - virtual QSqlTableModel* getDataModel(); - virtual EmuFrontObject* getDataObjectFromModel(QModelIndex*); - virtual bool updateDataObjectToModel(const EmuFrontObject*); - bool insertDataObjectToModel(const EmuFrontObject*); - bool deleteDataObjectFromModel(QModelIndex*); - int countDataObjectRefs(int) const; - -private: - virtual QSqlTableModel* getData(); - -}; - -#endif // DBMEDIAIMAGEPATH_H -- 1.7.9.5