exefile.h
1 //------------------------------------------------------------------------------
2 // exefile.h
3 //------------------------------------------------------------------------------
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301, USA.
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2013 "Zalewa" <zalewapl@gmail.com>
22 //------------------------------------------------------------------------------
23 #ifndef id97064B0C_7D3A_489E_B2241AD6943450FB
24 #define id97064B0C_7D3A_489E_B2241AD6943450FB
25 
26 #include "global.h"
27 #include "dptr.h"
28 #include <QHash>
29 #include <QObject>
30 #include <QString>
31 
32 class Message;
33 
48 class MAIN_EXPORT ExeFile : public QObject
49 {
50  Q_OBJECT
51 
52  public:
53  ExeFile();
54  virtual ~ExeFile();
55 
60  const QString& configKey() const;
64  const QString& exeTypeName() const;
92  virtual Message install(QWidget *parent);
96  const QString& programName() const;
97 
109  virtual QString pathToExe(Message& message);
110 
114  void setConfigKey(const QString& keyName);
118  void setExeTypeName(const QString& name);
122  void setProgramName(const QString& name);
123 
135  virtual QString workingDirectory(Message& message);
136 
137  private:
138  DPtr<ExeFile> d;
139 
140  QString obtainBinary(Message& message) const;
141 };
142 
143 #endif
Message object used to pass messages throughout the Doomseeker's system.
Definition: message.h:62
Access to external program executables (game clients, servers, and so on).
Definition: exefile.h:48