3 ** Copyright 2010 Mikko Keinänen
5 ** This file is part of EmuFront.
8 ** EmuFront is free software: you can redistribute it and/or modify
9 ** it under the terms of the GNU General Public License version 2 as published by
10 ** the Free Software Foundation and appearing in the file gpl.txt included in the
11 ** packaging of this file.
13 ** EmuFront is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ** GNU General Public License for more details.
18 ** You should have received a copy of the GNU General Public License
19 ** along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
22 #include "filepathobject.h"
25 FilePathObject::FilePathObject(int type)
26 : EmuFrontObject(), type(type), setup(0)
29 FilePathObject::FilePathObject(int id, QString name, int filetype)
30 : EmuFrontObject(id, name), type(filetype), setup(0) {}
32 FilePathObject::FilePathObject(int id, QString name, int filetype, Setup *setup)
33 : EmuFrontObject(id, name), type(filetype), setup(setup) {}
35 FilePathObject::~FilePathObject()
37 if (setup) delete setup;
40 FilePathObject::FilePathObject(const FilePathObject &fpobj)
41 : EmuFrontObject(fpobj), type(fpobj.type)
43 Setup *s = fpobj.setup;
44 setup = new Setup(*s);
47 FilePathObject& FilePathObject::operator =(const FilePathObject &fpobj)
49 if (this == &fpobj) return *this;
53 if (setup) delete setup;
54 Setup *sup = fpobj.setup;
55 setup = new Setup(*sup);
59 Setup* FilePathObject::getSetup() const
61 void FilePathObject::setSetup(Setup *sup)
64 int FilePathObject::getType() const
66 void FilePathObject::setType(int t)