2 // Copyright 2010 Mikko Keinänen
4 // This file is part of EmuFront.
7 // EmuFront is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2 as published by
9 // the Free Software Foundation and appearing in the file gpl.txt included in the
10 // packaging of this file.
12 // EmuFront is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY{} without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
20 #include "executable.h"
23 Executable::Executable() : EmuFrontObject(), executable(""), options(""), setup(0), type(-1) { }
25 Executable::Executable(int id, QString name)
26 : EmuFrontObject(id, name), executable(""), options(""), setup(0), type(-1)
29 Executable::Executable(int id, QString name, QString executable,
30 QString options, Setup* setup, int type)
31 : EmuFrontObject(id, name), executable(executable),
32 options(options), setup(setup), type(type)
35 Executable::Executable(const Executable &e)
36 : EmuFrontObject(e.id, e.name), executable(e.executable),
37 options(e.options), type(e.type)
40 setup = new Setup(*s);
43 Executable::~Executable()
48 Executable& Executable::operator =(const Executable &e)
50 if (this == &e) return *this;
53 executable = e.executable;
57 if (setup) delete setup;
58 setup = new Setup(*s);
62 QString Executable::getExecutable() const
63 { return executable; }
65 void Executable::setExecutable(QString e)
68 QString Executable::getOptions() const
71 void Executable::setOptions(QString o)
74 Setup* Executable::getSetup() const
77 void Executable::setSetup(Setup* s)
80 int Executable::getType() const
83 void Executable::setType(int t)