Commit 2ef87135 authored by Jule Marcoueille's avatar Jule Marcoueille

Ajout du multifenêtrage.

parent 4da11064
......@@ -26,7 +26,7 @@ Interface_console::Interface_console(int argc, char ** argv){
int state;
bool useGUI;/* if window interface can be displayed */
_prog_path = argv[0];
Message::set_interface_instance(this);/* define which interface will receive messages */
......@@ -360,3 +360,7 @@ void Interface_console::information(const string s) const{
const string Interface_console::get_filename() const{
return _file_opened;
}
const char* Interface_console::get_progpath() const{
return _prog_path;
}
......@@ -96,13 +96,17 @@ protected:
*\brief A state which corresponds to an export of file.
*/
static const int _STATE_EXPORT_FILE_IN_INTERVAL = 5;
/*!
*\brief This attributes contains the relative user program path.
*/
char* _prog_path;
/*!
*\brief If a file must be opened, this attributes contains its path.
*/
char* _file_opened;
/*!
*\brief If a file must be exported, this attributes contains its path.
*/
......@@ -219,6 +223,12 @@ protected:
*
*/
const std::string get_filename() const;
/*!
* \brief Get the first argument of the program, that is to say the relative user program path.
*
*/
const char* get_progpath() const;
/***********************************
......
......@@ -210,18 +210,16 @@ void Interface_graphic::on_open_triggered(){
if (!filename.isEmpty()){
if(_is_rendering_trace == true){/* Realease the previous trace */
warning("Cannot opening an other file");
/* QString program = QString(get_current_dir_name())+QString("/vite");
cerr << get_current_dir_name() << endl;
QStringList arguments;
arguments << filename.toStdString().c_str();
QProcess *myProcess = new QProcess(NULL);
myProcess->start(program, arguments); */
}
QStringList arguments = (QStringList() << filename);
QString program = QString(get_current_dir_name())+QString(_core->get_progpath()+sizeof(char));
QProcess * new_process = new QProcess();
new_process->startDetached(program, arguments);
cerr << program.toStdString() << " " << filename.toStdString() << endl;
}
else{
opening_file(filename.toStdString());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment