00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef ODINDIALOG_IDEA_H
00019 #define ODINDIALOG_IDEA_H
00020
00021
00022 #include <qobject.h>
00023 #include <odinqt/jdxwidget.h>
00024
00025 #include <odinpara/jdxblock.h>
00026 #include <odinpara/jdxtypes.h>
00027 #include <odinpara/jdxnumbers.h>
00028
00029
00030 #include "odinconf.h"
00031
00032 struct IdeaOpts : JcampDxBlock {
00033
00034 IdeaOpts();
00035
00036 void set_defaults(const OdinConf& conf, QWidget *parent);
00037
00038 STD_string get_vxworks_postfix() const;
00039 STD_string get_vxworks_ext() const;
00040 STD_string get_vxworks_Makefile() const;
00041 STD_string get_vxworks_cxx() const {return odindir+"/bin/cxxwrapper.exe";}
00042
00043 STD_string get_ideadir_slash() const {return replaceStr(ideadir,"\\","/");}
00044 STD_string get_odindir_slash() const {return replaceStr(odindir,"\\","/");}
00045
00046
00047 JDXfileName arch;
00048
00049 JDXfileName ideadir;
00050 JDXfileName odindir;
00051
00052 JDXfileName msvcdir;
00053
00054 JDXfileName seqdir;
00055 JDXstring odin2idea_label;
00056
00057 JDXfileName icedir;
00058
00059 JDXenum vxworks_cpu;
00060 JDXint vxworks_heap_size;
00061 JDXbool debug_vxworks_host;
00062
00063 JDXint make_jobs;
00064 JDXbool make_clean;
00065
00066
00067
00068
00069 JDXfileName vxworks_dir;
00070 JDXstring vxworks_flags;
00071 JDXstring vxworks_opts;
00072 JDXfileName vxworks_path;
00073 JDXfileName win_cxx;
00074 JDXstring hostd_flags;
00075 JDXstring host_flags;
00076
00077 };
00078
00079
00081
00082
00083 class IdeaDialog : public QObject, public GuiDialog {
00084 Q_OBJECT
00085
00086 public:
00087 IdeaDialog(QWidget *parent, IdeaOpts& opts, const OdinConf& conf);
00088 ~IdeaDialog();
00089
00090 signals:
00091 void changed();
00092
00093 private slots:
00094 void cancel();
00095 void defaults();
00096 void compile();
00097 void update();
00098
00099 private:
00100 void do_compile();
00101 void error_msg(const STD_string& msg);
00102 int find_in_alternatives(const STD_string& findstr, const STD_list<STD_string>& alternatives);
00103 bool execute_make(const STD_string& make, const STD_string& target);
00104 STD_string hosttarget(bool debug, const STD_string& build_includes, const STD_string& global_conf, const STD_string& mprefix, const STD_string& make_install) const;
00105 static STD_string errcodes_src(const STD_string& msgfile);
00106
00107
00108
00109 IdeaOpts& opts_cache;
00110 const OdinConf& conf_cache;
00111 GuiGridLayout* grid;
00112 GuiButton* pb_cancel;
00113 GuiButton* pb_defaults;
00114 GuiButton* pb_compile;
00115 JDXwidget* optswidget;
00116
00117 };
00118
00120
00121 class IdeaMethodDialog : public QObject, public GuiDialog {
00122 Q_OBJECT
00123
00124 public:
00125 IdeaMethodDialog(const STD_string& methdir, sarray& selectedMethods, const STD_string& install_prefix, const IdeaOpts& ideaopts, QWidget *parent);
00126 ~IdeaMethodDialog();
00127
00128
00129 private slots:
00130 void make();
00131 void emitDone();
00132
00133 private:
00134
00135 GuiButton* pb_make;
00136 GuiButton* pb_cancel;
00137 GuiGridLayout* grid;
00138
00139 GuiListView* method_list;
00140 STD_list<GuiListItem*> method_checks;
00141
00142 sarray& selMeth;
00143 STD_string methrootdir;
00144 STD_string install_dir;
00145
00146 const IdeaOpts& ideaopts_cache;
00147 };
00148
00149
00150
00151 #endif