src/toolsets/extprogramtoolset.h

changeset 971
c00f9665a9f8
parent 970
c8aae45afd85
child 1012
413ecd6b9801
equal deleted inserted replaced
970:c8aae45afd85 971:c00f9665a9f8
33 }; 33 };
34 34
35 struct ExtProgramInfo 35 struct ExtProgramInfo
36 { 36 {
37 QString name; 37 QString name;
38 QString* path;
39 bool* wine;
40 }; 38 };
41 39
42 class ExtProgramToolset : public Toolset 40 class ExtProgramToolset : public Toolset
43 { 41 {
42 Q_OBJECT
43
44 public: 44 public:
45 ExtProgramToolset (MainWindow* parent); 45 ExtProgramToolset (MainWindow* parent);
46 46
47 Q_INVOKABLE void coverer(); 47 Q_INVOKABLE void coverer();
48 Q_INVOKABLE void edger2(); 48 Q_INVOKABLE void edger2();
49 Q_INVOKABLE void intersector(); 49 Q_INVOKABLE void intersector();
50 Q_INVOKABLE void isecalc(); 50 Q_INVOKABLE void isecalc();
51 Q_INVOKABLE void rectifier(); 51 Q_INVOKABLE void rectifier();
52 Q_INVOKABLE void ytruder(); 52 Q_INVOKABLE void ytruder();
53
54 bool programUsesWine (ExtProgramType program);
55 QString externalProgramName (ExtProgramType program);
56 QString getPathSetting (ExtProgramType program);
57 bool getWineSetting (ExtProgramType program);
58 void setPathSetting (ExtProgramType program, QString value);
59 void setWineSetting (ExtProgramType program, bool value);
53 60
54 private: 61 private:
55 QString externalProgramName (ExtProgramType program); 62 bool checkExtProgramPath(ExtProgramType program);
56 bool programUsesWine (ExtProgramType program); 63 bool makeTempFile (class QTemporaryFile& tmp, QString& fname);
57 QString checkExtProgramPath (ExtProgramType program);
58 bool makeTempFile (QTemporaryFile& tmp, QString& fname);
59 bool runExtProgram (ExtProgramType prog, QString argvstr); 64 bool runExtProgram (ExtProgramType prog, QString argvstr);
60 QString errorCodeString (ExtProgramType program, class QProcess& process); 65 QString errorCodeString (ExtProgramType program, class QProcess& process);
61 void insertOutput (QString fname, bool replace, QList<LDColor> colorsToReplace); 66 void insertOutput (QString fname, bool replace, QList<LDColor> colorsToReplace);
62 void writeColorGroup (LDColor color, QString fname); 67 void writeColorGroup (LDColor color, QString fname);
63 void writeObjects (const LDObjectList& objects, QFile& f); 68 void writeObjects (const LDObjectList& objects, QFile& f);
64 void writeObjects (const LDObjectList& objects, QString fname); 69 void writeObjects (const LDObjectList& objects, QString fname);
65 void writeSelection (QString fname); 70 void writeSelection (QString fname);
66 bool& getWineSetting (ExtProgramType program);
67 QString getPathSetting (ExtProgramType program);
68 71
69 ExtProgramInfo extProgramInfo[NumExternalPrograms]; 72 ExtProgramInfo extProgramInfo[NumExternalPrograms];
70 }; 73 };

mercurial