Index: palm/trunk/UTIL/mrungui/about.ui
===================================================================
--- palm/trunk/UTIL/mrungui/about.ui	(revision 793)
+++ palm/trunk/UTIL/mrungui/about.ui	(revision 793)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>about</class>
+ <widget class="QDialog" name="about">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>280</width>
+    <height>128</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>About MRUN gui</string>
+  </property>
+  <widget class="QPushButton" name="button_ok">
+   <property name="geometry">
+    <rect>
+     <x>180</x>
+     <y>95</y>
+     <width>91</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>85</y>
+     <width>141</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Based on Qt 4.7.4</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>0</y>
+     <width>261</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>16</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>MRUN gui 1.00</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_4">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>105</y>
+     <width>141</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Built on Dec 08 2011</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_5">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>45</y>
+     <width>261</width>
+     <height>31</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Written by the PALM group. Visit us at                                    http://palm.muk.uni-hannover.de/</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_ok</sender>
+   <signal>clicked()</signal>
+   <receiver>about</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>80</x>
+     <y>197</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>196</x>
+     <y>204</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: palm/trunk/UTIL/mrungui/help.ui
===================================================================
--- palm/trunk/UTIL/mrungui/help.ui	(revision 793)
+++ palm/trunk/UTIL/mrungui/help.ui	(revision 793)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>child_help</class>
+ <widget class="QDialog" name="child_help">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>359</width>
+    <height>129</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>5</y>
+     <width>171</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>16</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>MRUN gui Help</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="button_ok">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>100</y>
+     <width>91</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>45</y>
+     <width>311</width>
+     <height>36</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Please find help on the official PALM web page:</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QTextBrowser" name="textBrowser">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>65</y>
+     <width>261</width>
+     <height>31</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <italic>false</italic>
+     <underline>false</underline>
+     <kerning>false</kerning>
+    </font>
+   </property>
+   <property name="focusPolicy">
+    <enum>Qt::NoFocus</enum>
+   </property>
+   <property name="contextMenuPolicy">
+    <enum>Qt::NoContextMenu</enum>
+   </property>
+   <property name="acceptDrops">
+    <bool>false</bool>
+   </property>
+   <property name="layoutDirection">
+    <enum>Qt::LeftToRight</enum>
+   </property>
+   <property name="frameShape">
+    <enum>QFrame::StyledPanel</enum>
+   </property>
+   <property name="frameShadow">
+    <enum>QFrame::Plain</enum>
+   </property>
+   <property name="lineWidth">
+    <number>0</number>
+   </property>
+   <property name="readOnly">
+    <bool>true</bool>
+   </property>
+   <property name="html">
+    <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://palm.muk.uni-hannover.de/wiki/doc/app/jobcontrol#GraphicaluserinterfaceGUIformrun&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;http://palm.muk.uni-hannover.de/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   </property>
+   <property name="acceptRichText">
+    <bool>true</bool>
+   </property>
+   <property name="openExternalLinks">
+    <bool>true</bool>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_ok</sender>
+   <signal>clicked()</signal>
+   <receiver>child_help</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>187</x>
+     <y>111</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>253</x>
+     <y>104</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: palm/trunk/UTIL/mrungui/main.cpp
===================================================================
--- palm/trunk/UTIL/mrungui/main.cpp	(revision 793)
+++ palm/trunk/UTIL/mrungui/main.cpp	(revision 793)
@@ -0,0 +1,34 @@
+//----------------------------------------------------------------------------//
+// Current revisions:
+// -----------------
+// Initial revision
+//
+// Former revisions:
+// -----------------
+// $Id$
+//
+// Description:
+// ------------
+// Graphical user-interface (GUI) for the mrun script. All routines are placed
+// in mainwindow.cpp. There are three windows: mainwindow; and two childs:
+// about window and a help window (files ending with .ui). The initial code was
+// written using Qt Creator 2.3.0.
+//----------------------------------------------------------------------------//
+
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+#include <QProcess>
+
+int main(int argc, char *argv[])
+{
+
+    QApplication app(argc, argv);
+//  app.setWindowIcon(QIcon("./mrungui.png"));
+
+    MainWindow w;
+    w.show();
+
+    return app.exec();
+}
+
+
Index: palm/trunk/UTIL/mrungui/mainwindow.cpp
===================================================================
--- palm/trunk/UTIL/mrungui/mainwindow.cpp	(revision 793)
+++ palm/trunk/UTIL/mrungui/mainwindow.cpp	(revision 793)
@@ -0,0 +1,1715 @@
+//----------------------------------------------------------------------------//
+// Current revisions:
+// -----------------
+// Initial revision
+//
+// Former revisions:
+// -----------------
+// $Id$
+//
+// Description:
+// ------------
+// All subroutines for mrungui
+//----------------------------------------------------------------------------//
+
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+#include "ui_about.h"
+#include "ui_help.h"
+#include <QString>
+#include <QFileDialog>
+#include <QDateTime>
+#include "stdlib.h"
+#include <QProcess>
+#include <QTextStream>
+
+
+// Define username on host as global variable
+QString username = getenv("USER");
+// Define variable branch (location of mrungui, e.g.
+// "/home/user/palm/current_version"
+QString branch;
+
+
+//****************************************************************************//
+//  Initialization of the main window
+MainWindow::MainWindow(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::MainWindow)
+{
+    ui->setupUi(this);
+
+//  Empty the mrun command line (hereafter mrunline)
+    ui->commandline->setText("");
+
+//  Get path of the program and set default file
+    branch = QCoreApplication::applicationDirPath();
+    branch = branch.left(branch.length() - 14);
+
+
+    QFile file(branch+"/.mrun.gui.default");
+
+//  Read default settings
+    if ( file.exists() == true && file.size() > 10)
+    {
+
+       QString mrunline;
+       if ( file.open(QIODevice::ReadOnly | QIODevice::Text ) )
+       {
+
+//        File opened successfully
+          QTextStream in(&file);
+
+          QString line = in.readLine();
+          while (!line.isNull())
+          {
+             mrunline = line;
+             line = in.readLine();
+          }
+
+          file.close();
+       }
+
+       mrunline = mrunline.right(mrunline.length() - 17);
+       ui->commandline->setText(mrunline);
+
+       setup_gui(mrunline);
+
+    }
+
+//  Load jobs into the recent jobs list
+    recent_jobs(10);
+}
+
+
+//****************************************************************************//
+//  Routine for listing jobs in the recent jobs list
+int MainWindow::recent_jobs(int noj)
+{
+    branch = QCoreApplication::applicationDirPath();
+    branch = branch.left(branch.length() - 14);
+
+    QFile file(branch+"/.mrun.history");
+    QString listitem, timestamp;
+
+//  Read mrun history and select the last used jobs
+    if ( file.exists() == true && file.size() > 10)
+    {
+
+//     Open history
+       QStringList history, tmphistory;
+       if ( file.open(QIODevice::ReadOnly | QIODevice::Text ) )
+       {
+
+//        file opened successfully
+          QTextStream in(&file);
+
+          QString line = in.readLine();
+          while (!line.isNull())
+          {
+             history.append(line);
+             line = in.readLine();
+          }
+
+          file.close();
+       }
+
+       int j = 0;
+
+       ui->list_jobname->clear();
+
+//     Read history entries and append to recent job list
+       for (int i=history.count(); i>=1; i--)
+       {
+           timestamp = history[i-1].left(16);
+           listitem = history[i-1].right(history[i-1].length() - 17);
+           listitem = listitem.split("-d ", QString::SkipEmptyParts)[1];
+           listitem = listitem.split(" -", QString::SkipEmptyParts)[0];
+           listitem = listitem.replace(" ","");
+
+           QList<QListWidgetItem *> matchitems = \
+                   ui->list_jobname->findItems(listitem, Qt::MatchExactly);
+
+           if ( matchitems.count() == 0 )
+           {
+              ui->list_jobname->addItem(listitem);
+              tmphistory.append(listitem+" ("+timestamp+")");
+              j++;
+           }
+           if ( j == noj )
+           {
+               break;
+           }
+       }
+
+//     Send to list
+       ui->list_jobname->clear();
+       for (int i=tmphistory.count(); i>=1; i--)
+       {
+           ui->list_jobname->addItem(tmphistory[i-1]);
+       }
+
+    }
+    return 0;
+}
+
+//****************************************************************************//
+//  Exit program
+MainWindow::~MainWindow()
+{
+
+    delete ui;
+}
+
+
+//****************************************************************************//
+//  Start the mrun command via xterm
+int MainWindow::startmrun()
+{
+
+    QString xtermoutput;
+    QString mrunline_save;
+    QString history_line;
+    QString mrunline = ui->commandline->text();
+    QString userline = ui->line_user->text();
+
+//  Check for empty line
+    mrunline_save = mrunline;
+    if (userline != "")
+    {
+        mrunline = mrunline + " " + userline;
+    }
+    history_line = mrunline;
+
+//  Disable the main window
+    ui->group_job->setEnabled(false);
+    ui->group_execution->setEnabled(false);
+    ui->group_runcontrol->setEnabled(false);
+    ui->group_advanced->setEnabled(false);
+    ui->check_advanced->setEnabled(false);
+    ui->check_verbose->setEnabled(false);
+    ui->button_start->setEnabled(false);
+    ui->button_start->setText("wait...");
+
+    branch = QCoreApplication::applicationDirPath();
+    branch = branch.left(branch.length() - 14);
+
+    ui->commandline->setText("Executing MRUN in xterm...");
+
+//  Wait until all commands have been executed (ugly)
+    for(int i=0; i<20; i++)
+       qApp->processEvents();
+
+//  Start xterm as QProcess
+    QProcess mrun;
+    mrun.setProcessChannelMode(QProcess::MergedChannels);
+    mrun.setWorkingDirectory(branch);
+
+    mrunline = " -title \"Executing MRUN...\" -geometry \"100x55+970+0\" -e \""\
+          +mrunline.replace("\"","\'")\
+          +";echo -n '--> Press Enter to continue...';read yesno\"";
+
+    mrun.start("xterm"+mrunline);
+
+    if(!mrun.waitForStarted())
+        return 0;
+
+//    while(mrun.waitForReadyRead())
+//        xtermoutput = xtermoutput+mrun.readAllStandardOutput();
+
+//  Wait until mrun has finished or wait for 20 minutes
+    mrun.waitForFinished(1200000);
+
+
+//  Jobs has been submitted or aborted. Continuing...
+//  Save the mrun command to history file
+    QString filename = branch+"/.mrun.history";
+
+    QDateTime time = QDateTime::currentDateTime();
+    QString tmptime = time.toString("yyyy/MM/dd hh:mm");
+
+    QFile file(filename);
+    file.open(QIODevice::Append | QIODevice::Text);
+    QTextStream out(&file);
+    out << tmptime + " " + history_line + "\n";
+    file.close();
+
+//  Enable main window again
+    ui->group_job->setEnabled(true);
+    ui->group_execution->setEnabled(true);
+    ui->group_runcontrol->setEnabled(true);
+    if ( ui->check_advanced->isChecked() == true)
+    {
+       ui->group_advanced->setEnabled(true);
+    }
+    ui->check_advanced->setEnabled(true);
+    ui->check_verbose->setEnabled(true);
+    ui->button_start->setEnabled(true);
+    ui->action_save->setEnabled(true);
+    ui->button_start->setText("MRUN Start");
+    ui->commandline->setText(mrunline_save);
+
+//  Reload recent jobs
+    recent_jobs(10);
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Disable/Enable advanced settings dialog
+int MainWindow::enable_advanced()
+{
+    bool status;
+
+    status = ui->group_advanced->isEnabled();
+    if (status == true)
+    {
+       ui->group_advanced->setEnabled(false);
+    }
+    else
+    {
+       ui->group_advanced->setEnabled(true);
+    }
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Disable/enable dialog for coupled runs
+int MainWindow::enable_coupled()
+{
+    QString status;
+
+    status = ui->drop_job->currentText();
+    if (status == "Coupled restart")
+    {
+       ui->label_coupled1->setEnabled(true);
+       ui->label_coupled2->setEnabled(true);
+       ui->label_coupled3->setEnabled(true);
+       ui->line_PE_atmos->setEnabled(true);
+       ui->line_PE_ocean->setEnabled(true);
+
+       QString pe_total = ui->line_pe->text();
+       QString pe_atmos = ui->line_PE_atmos->text();
+       QString pe_ocean = ui->line_PE_ocean->text();
+       if (pe_total != "")
+       {
+           int PE_split = pe_total.toInt()/2;
+           ui->line_PE_atmos->setText(QString::number(PE_split));
+           ui->line_PE_ocean->setText(QString::number(PE_split));
+       }
+    }
+    else
+    {
+        ui->label_coupled1->setEnabled(false);
+        ui->label_coupled2->setEnabled(false);
+        ui->label_coupled3->setEnabled(false);
+        ui->line_PE_atmos->setEnabled(false);
+        ui->line_PE_ocean->setEnabled(false);
+    }
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Choose job from dialog
+int MainWindow::choosejob()
+{
+    QString filename;
+    branch = QCoreApplication::applicationDirPath();
+    branch = branch.left(branch.length() - 14);
+
+    QString jobdir = branch+"/JOBS";
+
+
+//  Pick a job from dialog
+    filename = QFileDialog::getExistingDirectory(this, \
+                            tr("Choose a job directory"), branch+"/JOBS", \
+               QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks | \
+               QFileDialog::DontUseNativeDialog | QFileDialog::ReadOnly | \
+               QFileDialog::DontConfirmOverwrite);
+
+
+
+
+
+//  If a file was selected, load it into mainwindow
+    if ( filename != "")
+    {
+        filename = filename.right(filename.length() - jobdir.length() - 1);
+
+        ui->line_jobname->setText(filename);
+        ui->list_jobname->clearSelection();
+
+//      Change mrunline accordingly
+        change_commandline("d","");
+        change_commandline("r","");
+        return 0;
+    }
+    else
+    {
+        return 1;
+    }
+}
+
+
+//****************************************************************************//
+//  Choose job from the recent job list and load all settings
+int MainWindow::choosejob_list()
+{
+    QString filename, timestamp, jobname;
+
+//  Get selected item from list
+    filename = ui->list_jobname->currentItem()->text();
+    int itemint = ui->list_jobname->currentRow();
+
+//  Reload list
+    ui->setupUi(this);
+    recent_jobs(10);
+
+//  Set selected item to jobname
+    ui->list_jobname->item(itemint)->setSelected(true);
+
+    timestamp = filename.right(17).left(16);
+    jobname = filename.left(filename.length() - 19);
+
+    branch = QCoreApplication::applicationDirPath();
+    branch = branch.left(branch.length() - 14);
+    QFile file(branch+"/.mrun.history");
+    QString listitem;
+
+//  Load history
+    if ( file.exists() == true && file.size() > 10)
+    {
+
+       QStringList history;
+       if ( file.open(QIODevice::ReadOnly | QIODevice::Text ) )
+       {
+
+//        file opened successfully
+          QTextStream in(&file);
+
+          QString line = in.readLine();
+          while (!line.isNull())
+          {
+             history.append(line);
+             line = in.readLine();
+          }
+
+          file.close();
+       }
+
+       for (int i=history.count(); i>=1; i--)
+       {
+           listitem = history[i-1].right(history[i-1].length() - 17);
+           listitem = listitem.split("-d ", QString::SkipEmptyParts)[1];
+           listitem = listitem.split(" -", QString::SkipEmptyParts)[0];
+           listitem = listitem.replace(" ","");
+
+
+//         Select command line with correct timestamp and jobname
+           if (history[i-1].left(16) == timestamp && listitem == jobname)
+           {
+              QString mrunline = history[i-1];
+              mrunline = mrunline.right(mrunline.length() - 17);
+              ui->commandline->setText(mrunline);
+
+              setup_gui(mrunline);
+           }
+       }
+    }
+
+     return 0;
+}
+
+
+//****************************************************************************//
+//  Change run identifer (initial, restart, coupled...)
+int MainWindow::change_rc_list()
+{
+
+
+   QString drop_job = ui->drop_job->currentText();
+
+   change_commandline("r","");
+
+// Enable PE distribution for atmosphere/ocean
+   if ( drop_job == "Coupled restart")
+   {
+       QString drop_atmos = ui->line_PE_atmos->text();
+       QString drop_ocean = ui->line_PE_ocean->text();
+
+       change_commandline("Y",drop_atmos+" "+drop_ocean);
+   }
+
+// Check of ocean runs
+   else
+   {
+      delete_commandline("Y");
+      if (drop_job == "Precursor run (Ocean)")
+      {
+          activate_flag("y");
+      }
+      else
+      {
+          deactivate_flag("y");
+      }
+   }
+
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Routine for processing any changes in the mainwindow settings
+int MainWindow::change_commandline(QString id,QString fwstring)
+{
+
+//  First get the mrunline
+    QString newmrunline;
+    bool    initialize=false;
+
+    QString mrunline = ui->commandline->text();
+
+    QStringList splitline = mrunline.split(" -"+id+"", QString::SkipEmptyParts);
+    if ( splitline.count() == 1)
+    {
+        splitline.append(" ");
+    }
+    else if ( splitline.count() == 0 )
+    {
+       splitline.append("mrun");
+       splitline.append(" ");
+       initialize = true;
+    }
+
+    QStringList param = splitline[1].split("-");
+
+//  Change in parameter "d" (jobname)
+    if (id == "d")
+    {
+       QString filename = ui->line_jobname->text();
+
+       param[0] = filename.replace(" ","");
+
+       if ( initialize == true && ui->group_runcontrol->isEnabled() == true )
+       {
+           ui->group_runcontrol->setEnabled(true);
+           ui->group_execution->setEnabled(true);
+           ui->drop_job->setEnabled(true);
+           ui->check_advanced->setEnabled(true);
+           ui->button_start->setEnabled(true);
+           ui->action_save->setEnabled(true);
+       }
+       else if ( param[0] == "")
+       {
+           ui->group_runcontrol->setEnabled(false);
+           ui->group_execution->setEnabled(false);
+           ui->drop_job->setEnabled(false);
+           ui->button_start->setEnabled(false);
+           ui->action_save->setEnabled(false);
+           ui->group_advanced->setEnabled(false);
+           ui->check_advanced->setEnabled(false);
+           delete_commandline("d");
+           change_commandline("r","remove");
+           ui->label_usercode->setText("");
+           return 1;
+       }
+       else
+       {
+
+//         Check if user code is available
+           branch = QCoreApplication::applicationDirPath();
+           branch = branch.left(branch.length() - 14);
+           QDir usercode = branch+"/USER_CODE/"+param[0];
+           if (usercode.exists() == true)
+           {
+               ui->label_usercode->setText("User code found.");
+           }
+           else
+           {
+               ui->label_usercode->setText("Warning: no user code found!");
+           }
+
+//         Check if _pdf file is available, otherwise notice user
+           if (ui->check_restarts->checkState() == 2)
+           {
+              QString jobname = ui->line_jobname->text();
+              QFile restartfile(branch+"/JOBS/"+jobname+"/INPUT/"+jobname+"_p3df");
+              if (restartfile.exists() == true)
+              {
+                 ui->label_restart->setText("");
+              }
+              else
+              {
+                 ui->label_restart->setText("Warning: No p3df file found!");
+              }
+           }
+
+           ui->group_runcontrol->setEnabled(true);
+           ui->group_execution->setEnabled(true);
+           ui->drop_job->setEnabled(true);
+           ui->check_advanced->setEnabled(true);
+
+           if ( ui->check_advanced->isChecked() == true )
+           {
+              ui->group_advanced->setEnabled(true);
+              if ( ui->line_i->text() != "" || ui->line_o->text() != "")
+              {
+                 change_commandline("r","remove");
+                 ui->group_runcontrol->setEnabled(false);
+              }
+           }
+       }
+
+    }
+
+//  Change in parameter "r" (run control list)
+    else if (id == "r")
+    {
+        int status_ts = ui->check_ts->checkState();
+        int status_pr = ui->check_pr->checkState();
+        int status_xy = ui->check_xy->checkState();
+        int status_xz = ui->check_xz->checkState();
+        int status_yz = ui->check_yz->checkState();
+        int status_3d = ui->check_3d->checkState();
+        int status_ma = ui->check_ma->checkState();
+        int status_sp = ui->check_sp->checkState();
+        int status_pts = ui->check_pts->checkState();
+        int status_prt = ui->check_prt->checkState();
+
+        QString drop_job = ui->drop_job->currentText();
+        QString rc_flag = "#";
+
+        if (drop_job == "Initial run")
+        {
+            rc_flag = "#";
+        }
+        else if (drop_job == "Restart run")
+        {
+            rc_flag = "f";
+        }
+        else if (drop_job == "Precursor run (Atmosphere)")
+        {
+            rc_flag = "#";
+        }
+        else if (drop_job == "Precursor run (Ocean)")
+        {
+           rc_flag = "o#";
+        }
+        else if (drop_job == "Coupled restart")
+        {
+           rc_flag = "f";
+        }
+
+        param[0] = "\"d3"+rc_flag;
+
+        if (status_ts == 2)
+        {
+            param[0] = param[0]+" ts"+rc_flag;
+        }
+        if (status_pr == 2)
+        {
+           param[0] = param[0]+" pr"+rc_flag;
+        }
+        if (status_xy == 2)
+        {
+           param[0] = param[0]+" xy"+rc_flag;
+        }
+        if (status_xz == 2)
+        {
+           param[0] = param[0]+" xz"+rc_flag;
+        }
+        if (status_yz == 2)
+        {
+           param[0] = param[0]+" yz"+rc_flag;
+        }
+        if (status_3d == 2)
+        {
+           param[0] = param[0]+" 3d"+rc_flag;
+        }
+        if (status_ma == 2)
+        {
+           param[0] = param[0]+" ma"+rc_flag;
+        }
+        if (status_sp == 2)
+        {
+           param[0] = param[0]+" sp"+rc_flag;
+        }
+        if (status_prt == 2)
+        {
+           param[0] = param[0]+" prt"+rc_flag;
+        }
+        if (status_pts == 2)
+        {
+           param[0] = param[0]+" pts"+rc_flag;
+        }
+
+        if (drop_job == "Coupled restart")
+        {
+            rc_flag = "of";
+            param[0] = param[0]+" d3"+rc_flag;
+
+            if (status_ts == 2)
+            {
+                param[0] = param[0]+" ts"+rc_flag;
+            }
+            if (status_pr == 2)
+            {
+               param[0] = param[0]+" pr"+rc_flag;
+            }
+            if (status_xy == 2)
+            {
+               param[0] = param[0]+" xy"+rc_flag;
+            }
+            if (status_xz == 2)
+            {
+               param[0] = param[0]+" xz"+rc_flag;
+            }
+            if (status_yz == 2)
+            {
+               param[0] = param[0]+" yz"+rc_flag;
+            }
+            if (status_3d == 2)
+            {
+               param[0] = param[0]+" 3d"+rc_flag;
+            }
+            if (status_ma == 2)
+            {
+               param[0] = param[0]+" ma"+rc_flag;
+            }
+            if (status_sp == 2)
+            {
+               param[0] = param[0]+" sp"+rc_flag;
+            }
+            if (status_prt == 2)
+            {
+               param[0] = param[0]+" prt"+rc_flag;
+            }
+            if (status_pts == 2)
+            {
+               param[0] = param[0]+" pts"+rc_flag;
+            }
+        }
+
+        int status_restarts = ui->check_restarts->checkState();
+
+
+
+        if (status_restarts == 2)
+        {
+            param[0]=param[0]+" restart";
+
+//          Check if _pdf file is available, otherwise notice user
+            if (ui->check_restarts->checkState() == 2)
+            {
+               QString jobname = ui->line_jobname->text();
+               branch = QCoreApplication::applicationDirPath();
+               branch = branch.left(branch.length() - 14);
+               QFile restartfile(branch+"/JOBS/"+jobname+"/INPUT/"+jobname+ \
+                                 "_p3df");
+               if (restartfile.exists() == true)
+               {
+                  ui->label_restart->setText("");
+               }
+               else
+               {
+                  ui->label_restart->setText("Warning: No p3df file found!");
+               }
+            }
+
+        }
+        else  {
+          ui->label_restart->setText("");
+        }
+
+        param[0]=param[0]+"\" ";
+
+        if ( fwstring == "remove")
+        {
+            delete_commandline(id);
+            return 1;
+        }
+        else
+        {
+           ui->button_start->setEnabled(true);
+           ui->action_save->setEnabled(true);
+        }
+    }
+//  Change in any other parameter
+    else
+    {
+        if ( fwstring != "")
+        {
+           param[0] = "\""+fwstring+"\"";
+        }
+        else
+        {
+            delete_commandline(id);
+            return 1;
+        }
+
+    }
+    param[0] = param[0] + " ";
+
+//  Join the new mrunline
+    splitline[1]= param.join("-");
+    newmrunline = splitline.join(" -"+id+" ");
+
+//  Print the new mrunline to mainwindow
+    newmrunline.replace("  "," ");
+    ui->commandline->setText(newmrunline);
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Get all signals from mainwindow and perform change via change_commandline()
+int MainWindow::change_lineinput()
+{
+    QString tmptext;
+
+    if ( sender() == ui->line_host )
+    {
+        tmptext = ui->line_host->text();
+        change_commandline("h",tmptext);
+    }
+    else if ( sender() == ui->line_jobname)
+    {
+        tmptext = ui->line_jobname->text();
+        change_commandline("d",tmptext);
+    }
+    else if ( sender() == ui->line_q)
+    {
+        tmptext = ui->line_q->text();
+        change_commandline("q",tmptext);
+    }
+    else if ( sender() == ui->line_account)
+    {
+        tmptext = ui->line_account->text();
+        change_commandline("u",tmptext);
+    }
+    else if ( sender() ==  ui->line_pe)
+    {
+        tmptext = ui->line_pe->text();
+        change_commandline("X",tmptext);
+    }
+    else if ( sender() == ui->line_tpn)
+    {
+        tmptext = ui->line_tpn->text();
+        change_commandline("T",tmptext);
+    }
+    else if ( sender() == ui->line_branch)
+    {
+        tmptext = ui->line_branch->text();
+        change_commandline("K",tmptext);
+    }
+    else if ( sender() == ui->line_time)
+    {
+        tmptext = ui->line_time->text();
+        change_commandline("t",tmptext);
+    }
+    else if ( sender() == ui->line_M)
+    {
+        tmptext = ui->line_M->text();
+        change_commandline("M",tmptext);
+    }
+    else if ( sender() == ui->line_m)
+    {
+        tmptext = ui->line_m->text();
+        change_commandline("m",tmptext);
+    }
+    else if ( sender() == ui->line_a)
+    {
+        tmptext = ui->line_a->text();
+        change_commandline("a",tmptext);
+    }
+    else if ( sender() == ui->line_D)
+    {
+        tmptext = ui->line_D->text();
+        change_commandline("D",tmptext);
+    }
+    else if ( sender() == ui->line_c)
+    {
+        tmptext = ui->line_c->text();
+        if ( tmptext == ".mrun.config")
+        {
+            tmptext = "";
+        }
+        change_commandline("c",tmptext);
+    }
+    else if ( sender() == ui->line_p)
+    {
+        tmptext = ui->line_p->text();
+        change_commandline("p",tmptext);
+    }
+    else if ( sender() == ui->line_s)
+    {
+        tmptext = ui->line_s->text();
+        change_commandline("s",tmptext);
+    }
+    else if ( sender() == ui->line_i)
+    {
+        tmptext = ui->line_i->text();
+        if ( tmptext != "")
+        {
+            change_commandline("r","remove");
+            ui->group_runcontrol->setEnabled(false);
+
+            ui->button_start->setEnabled(true);
+            ui->action_save->setEnabled(true);
+        }
+        else if (ui->line_o->text() == "" )
+        {
+           ui->group_runcontrol->setEnabled(true);
+           change_commandline("r","");
+        }
+
+        change_commandline("i",tmptext);
+    }
+    else if ( sender() == ui->line_o)
+    {
+        tmptext = ui->line_o->text();
+        if ( tmptext != "")
+        {
+            change_commandline("r","remove");
+            ui->button_start->setEnabled(true);
+            ui->action_save->setEnabled(true);
+            ui->group_runcontrol->setEnabled(false);
+        }
+        else if (ui->line_i->text() == "" )
+        {
+           ui->group_runcontrol->setEnabled(true);
+           change_commandline("r","");
+        }
+
+        change_commandline("o",tmptext);
+
+    }
+    else if ( sender() == ui->line_w)
+    {
+        tmptext = ui->line_w->text();
+        change_commandline("w",tmptext);
+    }
+    else if ( sender() == ui->line_PE_atmos || sender() == ui->line_PE_ocean)
+    {
+        tmptext = ui->line_PE_atmos->text() + " "  + ui->line_PE_ocean->text();
+        change_commandline("Y",tmptext);
+        int PE_total = ui->line_PE_atmos->text().toInt() + \
+                        ui->line_PE_ocean->text().toInt();
+        ui->line_pe->setText(QString::number(PE_total));
+        change_commandline("X",QString::number(PE_total));
+    }
+
+    else if ( sender() == ui->combo_n)
+    {
+        tmptext = ui->combo_n->currentText();
+        if ( tmptext == "default")
+        {
+            tmptext = "";
+        }
+        change_commandline("n",tmptext);
+    }
+    else if ( sender() == ui->line_user)
+    {
+       return 0;
+    }
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Delete a parameter from mrunline
+int MainWindow::delete_commandline(QString id)
+{
+
+//  Read mrunline
+    QString newmrunline;
+    QString mrunline = ui->commandline->text();
+    QStringList splitline = mrunline.split(" -"+id, QString::SkipEmptyParts);
+    if ( splitline.count() == 1)
+    {
+       return 0;
+    }
+    else
+    {
+       QStringList param = splitline[1].split("-");
+       param[0] = "";
+       splitline[1]= param.join(" -");
+       newmrunline = splitline.join("");
+
+//     Print new mrunline to screen
+       ui->commandline->setText(newmrunline);
+
+       return 0;
+    }
+}
+
+
+//****************************************************************************//
+//  Check routine for all flag parameters
+int MainWindow::check_flags()
+{
+
+    int status = ui->check_delete_tmp_files->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("B");
+    }
+    else
+    {
+        deactivate_flag("B");
+    }
+
+    status = ui->check_verbose->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("v");
+    }
+    else
+    {
+        deactivate_flag("v");
+    }
+
+    status = ui->check_A->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("A");
+    }
+    else
+    {
+        deactivate_flag("A");
+    }
+
+    status = ui->check_b->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("b");
+    }
+    else
+    {
+        deactivate_flag("b");
+    }
+
+    status = ui->check_F->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("F");
+    }
+    else
+    {
+        deactivate_flag("F");
+    }
+    status = ui->check_I->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("I");
+    }
+    else
+    {
+        deactivate_flag("I");
+    }
+    status = ui->check_k->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("k");
+    }
+    else
+    {
+        deactivate_flag("k");
+    }
+    status = ui->check_O->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("O");
+    }
+    else
+    {
+        deactivate_flag("O");
+    }
+    status = ui->check_S->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("S");
+    }
+    else
+    {
+        deactivate_flag("S");
+    }
+    status = ui->check_x->checkState();
+
+    if (status == 2)
+    {
+        activate_flag("x");
+    }
+    else
+    {
+        deactivate_flag("x");
+    }
+    return 0;
+
+}
+
+
+//****************************************************************************//
+//  Activate flag
+int MainWindow::activate_flag(QString id)
+{
+    QString newmrunline;
+
+    QString mrunline = ui->commandline->text();
+
+    QStringList splitline = mrunline.split(" -"+id, QString::SkipEmptyParts);
+    if ( splitline.count() == 1)
+    {
+        splitline.append("");
+        newmrunline = splitline.join(" -"+id);
+
+ //     print new commandline to screen
+        newmrunline.replace("  "," ");
+        ui->commandline->setText(newmrunline);
+
+       return 0;
+    }
+    else
+    {
+       return 0;
+    }
+}
+
+
+//****************************************************************************//
+//  Deactivate flag
+int MainWindow::deactivate_flag(QString id)
+{
+    QString newmrunline;
+
+    QString mrunline = ui->commandline->text();
+
+    QStringList splitline = mrunline.split(" -"+id, QString::SkipEmptyParts);
+
+    newmrunline = splitline.join("");
+//  print new commandline to screen
+    newmrunline.replace("  "," ");
+    ui->commandline->setText(newmrunline);
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Mainwindow reset
+int MainWindow::reset_window()
+{
+    ui->setupUi(this);
+    recent_jobs(10);
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Save current setting as default
+int MainWindow::save_default()
+{
+
+//  Get mrunline
+    QString mrunline_save;
+    QString mrunline = ui->commandline->text();
+    QString userline = ui->line_user->text();
+
+    mrunline_save = mrunline;
+    if (userline != "")
+    {
+        mrunline = mrunline + " " + userline;
+    }
+
+
+//  Define filename
+    branch = QCoreApplication::applicationDirPath();
+    branch = branch.left(branch.length() - 14);
+
+    QString filename = branch+"/.mrun.gui.default";
+
+//  Prepare data output
+    QDateTime time = QDateTime::currentDateTime();
+    QString tmptime = time.toString("yyyy/MM/dd hh:mm");
+
+//  Write to file
+    QFile file(filename);
+    file.open(QIODevice::WriteOnly | QIODevice::Text);
+    QTextStream out(&file);
+    if ( mrunline == "" || mrunline == " ")
+    {
+        out << "";
+    }
+    else
+    {
+       out << tmptime + " " + mrunline;
+    }
+
+    file.close();
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Save current settings to a file of choice
+int MainWindow::save_to_file()
+{
+
+//  Get mrunline
+    QString mrunline_save;
+    QString mrunline = ui->commandline->text();
+    QString userline = ui->line_user->text();
+
+    mrunline_save = mrunline;
+    if (userline != "")
+    {
+        mrunline = mrunline + " " + userline;
+    }
+
+//  Define a filename
+    QString filename = QFileDialog::getSaveFileName(this, tr("Save to file"), \
+                                    "", tr("Save files (*.sav)"));
+    QString extension = filename.right(4);
+
+    if ( extension != ".sav" )
+    {
+        filename = filename + ".sav";
+    }
+
+//  Prepare data output
+    QDateTime time = QDateTime::currentDateTime();
+    QString tmptime = time.toString("yyyy/MM/dd hh:mm");
+
+//  Write to file
+    QFile file(filename);
+    file.open(QIODevice::WriteOnly | QIODevice::Text);
+    QTextStream out(&file);
+    out << tmptime + " " + mrunline;
+    file.close();
+
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Open job from file (previously saved by the user)
+int MainWindow::open_from_file()
+{
+
+//  Select filename and open it
+    QString filename = QFileDialog::getOpenFileName(this, tr("Open File"), \
+                                    "", tr("Save files (*.sav)"));
+
+    QFile file(filename);
+    QString mrunline;
+    if ( filename != "")
+    {
+       if ( file.open(QIODevice::ReadOnly | QIODevice::Text ) )
+       {
+
+//        File opened successfully
+          QTextStream in(&file);
+
+          QString line = in.readLine();
+          while (!line.isNull())
+          {
+             mrunline = line;
+             line = in.readLine();
+          }
+          file.close();
+       }
+
+//     In case a mrunline was found, load it to mainwindow
+       if ( mrunline != "")
+       {
+
+          mrunline = mrunline.right(mrunline.length() - 17);
+          ui->commandline->setText(mrunline);
+
+          setup_gui(mrunline);
+       }
+    }
+    return 0;
+}
+
+
+//****************************************************************************//
+//  Open the last submitted job
+int MainWindow::open_last()
+{
+    branch = QCoreApplication::applicationDirPath();
+    branch = branch.left(branch.length() - 14);
+
+    QFile file(branch+"/.mrun.history");
+
+//  Load mrun history
+    QString mrunline;
+    if ( file.open(QIODevice::ReadOnly | QIODevice::Text ) )
+    {
+
+//     file opened successfully
+       QTextStream in(&file);
+
+       QString line = in.readLine();
+       while (!line.isNull())
+       {
+          mrunline = line;
+          line = in.readLine();
+       }
+
+       file.close();
+    }
+
+//  Select the last submitted job and print it to mainwindow
+    if ( mrunline != "" )
+    {
+       mrunline = mrunline.right(mrunline.length() - 17);
+       ui->commandline->setText(mrunline);
+
+       setup_gui(mrunline);
+    }
+    return 0;
+}
+
+//****************************************************************************//
+//  Display help window
+int MainWindow::help()
+{
+
+    QDialog *child_help = new QDialog;
+    Ui::child_help ui;
+    ui.setupUi(child_help);
+    child_help->show();
+
+
+    return 0;
+}
+
+//****************************************************************************//
+//  Display about window
+int MainWindow::about_gui()
+{
+
+    QDialog *about = new QDialog;
+    Ui::about ui;
+    ui.setupUi(about);
+    about->show();
+
+    return 0;
+}
+
+//****************************************************************************//
+//  Setup mainwindow according to a given mrunline
+int MainWindow::setup_gui(QString mrunline)
+{
+
+//  Some initial settings
+    QString user = "";
+
+    bool coupled_run = false;
+    bool ocean_run   = false;
+    bool advanced    = false;
+    bool nojob       = false;
+    bool rc_manual   = false;
+
+//  Split parameters in mrunline
+    QStringList splitline = mrunline.split(" -", QString::SkipEmptyParts);
+
+    if ( splitline[0] != "mrun")
+    {
+        return 1;
+
+    }
+    else
+    {
+        ui->group_job->setEnabled(true);
+
+//      Loop for all parameters in mrunline
+        for(int i=splitline.count()-1; i>=1; i--)
+        {
+
+//          Determine parameter
+            QStringList splitparameter = splitline[i].split(" ", \
+                                                      QString::SkipEmptyParts);
+
+            QString parameter = splitparameter[0];
+            splitparameter.removeFirst();
+            QString options = splitparameter.join(" ");
+            options = options.replace("\"","");
+
+//          Check for suitable switch
+            if ( parameter == "d")
+            {
+               if ( options != "")
+               {
+                  ui->line_jobname->setText(options);
+                  nojob = false;
+               }
+               else
+               {
+                  nojob = true;
+               }
+            }
+            else if ( parameter == "h")
+            {
+               ui->line_host->setText(options);
+            }
+            else if ( parameter == "q")
+            {
+               ui->line_q->setText(options);
+            }
+            else if ( parameter == "K")
+            {
+               ui->line_branch->setText(options);
+            }
+            else if ( parameter == "u")
+            {
+               ui->line_account->setText(options);
+            }
+            else if ( parameter == "X")
+            {
+               ui->line_pe->setText(options);
+            }
+            else if ( parameter == "T")
+            {
+               ui->line_tpn->setText(options);
+            }
+            else if ( parameter == "t")
+            {
+               ui->line_time->setText(options);
+            }
+            else if ( parameter == "B")
+            {
+               ui->check_delete_tmp_files->setChecked(true);
+            }
+            else if ( parameter == "v")
+            {
+               ui->check_verbose->setChecked(true);
+            }
+            else if ( parameter == "A")
+            {
+               ui->check_A->setChecked(true);
+
+            }
+            else if ( parameter == "b")
+            {
+               ui->check_b->setChecked(true);
+               advanced = true;
+            }
+            else if ( parameter == "F")
+            {
+               ui->check_F->setChecked(true);
+               advanced = true;
+            }
+            else if ( parameter == "I")
+            {
+               ui->check_I->setChecked(true);
+               advanced = true;
+            }
+            else if ( parameter == "k")
+            {
+               ui->check_k->setChecked(true);
+               advanced = true;
+            }
+            else if ( parameter == "O")
+            {
+               ui->check_O->setChecked(true);
+               advanced = true;
+            }
+            else if ( parameter == "S")
+            {
+               ui->check_S->setChecked(true);
+               advanced = true;
+            }
+            else if ( parameter == "x")
+            {
+               ui->check_x->setChecked(true);
+               advanced = true;
+            }
+            else if ( parameter == "m")
+            {
+               ui->line_m->setText(options);
+               advanced = true;
+            }
+            else if ( parameter == "M")
+            {
+               ui->line_M->setText(options);
+               advanced = true;
+            }
+            else if ( parameter == "a")
+            {
+               ui->line_a->setText(options);
+               advanced = true;
+            }
+            else if ( parameter == "D")
+            {
+               ui->line_D->setText(options);
+               advanced = true;
+            }
+            else if ( parameter == "c")
+            {
+               ui->line_c->setText(options);
+               advanced = true;
+            }
+            else if ( parameter == "p")
+            {
+               ui->line_p->setText(options);
+               advanced = true;
+            }
+            else if ( parameter == "s")
+            {
+               ui->line_s->setText(options);
+               advanced = true;
+            }
+            else if ( parameter == "i")
+            {
+               ui->line_i->setText(options);
+               advanced = true;
+               rc_manual = true;
+            }
+            else if ( parameter == "o")
+            {
+               ui->line_o->setText(options);
+               advanced = true;
+               rc_manual = true;
+            }
+            else if ( parameter == "w")
+            {
+               ui->line_w->setText(options);
+               advanced = true;
+            }
+
+//          Determine settings for coupled restart runs
+            else if ( parameter == "Y")
+            {
+                QStringList optionssplit = options.split(" ", \
+                                                   QString::SkipEmptyParts);
+
+                ui->line_PE_atmos->setEnabled(true);
+                ui->line_PE_ocean->setEnabled(true);
+                ui->label_coupled1->setEnabled(true);
+                ui->label_coupled2->setEnabled(true);
+                ui->label_coupled3->setEnabled(true);
+                ui->label_coupling->setEnabled(true);
+
+                if (optionssplit.count() == 2)
+                {
+                   ui->line_PE_atmos->setText(optionssplit[0]);
+                   ui->line_PE_ocean->setText(optionssplit[1]);
+                }
+                else
+                {
+                   ui->line_PE_atmos->setText("");
+                   ui->line_PE_ocean->setText("");
+                }
+                coupled_run = true;
+            }
+            else if ( parameter == "n")
+            {
+                if ( options == "shared")
+                {
+                    ui->combo_n->setCurrentIndex(1);
+                }
+                else if ( options == "non_shared")
+                {
+                    ui->combo_n->setCurrentIndex(2);
+                }
+                else
+                {
+                    ui->combo_n->setCurrentIndex(0);
+                }
+            }
+            else if ( parameter == "y")
+            {
+               ui->drop_job->setCurrentIndex(3);
+            }
+
+//          Determine settings for the run control list
+            else if ( parameter == "r")
+            {
+               QStringList optionssplit = options.split(" ", \
+                                          QString::SkipEmptyParts);
+
+               QString options_2;
+               QString options_all;
+               for (int j=0; j<optionssplit.count(); j++)
+               {
+                   options_all = optionssplit[j];
+                   options_2 = optionssplit[j].left(2);
+                   if (options_2 == "ts")
+                   {
+                       ui->check_ts->setChecked(true);
+                   }
+                   if (options_2 == "pr" && options_all.left(3) != "prt")
+                   {
+                       ui->check_pr->setChecked(true);
+                   }
+                   if (options_2 == "xy")
+                   {
+                       ui->check_xy->setChecked(true);
+                   }
+                   if (options_2 == "xz")
+                   {
+                       ui->check_xz->setChecked(true);
+                   }
+                   if (options_2 == "yz")
+                   {
+                       ui->check_yz->setChecked(true);
+                   }
+                   if (options_2 == "3d")
+                   {
+                       ui->check_3d->setChecked(true);
+                   }
+                   if (options_2 == "ma")
+                   {
+                       ui->check_ma->setChecked(true);
+                   }
+                   if (options_2 == "sp")
+                   {
+                       ui->check_sp->setChecked(true);
+                   }
+                   if (options_all.left(3) == "prt")
+                   {
+                       ui->check_prt->setChecked(true);
+                   }
+                   if (options_all.left(3) == "pts")
+                   {
+                       ui->check_pts->setChecked(true);
+                   }
+                   if (options_2 == "d3")
+                   {
+                       if (options_all.left(3).right(1) == "#")
+                       {
+                          ui->drop_job->setCurrentIndex(0);
+                       }
+                       else if (options_all.left(3).right(1) == "f")
+                       {
+                          ui->drop_job->setCurrentIndex(1);
+                       }
+                       else if (options_all.left(3).right(1) == "o")
+                       {
+                          ocean_run = true;
+                       }
+                   }
+                   if (options_all == "restart")
+                   {
+                      ui->check_restarts->setChecked(true);
+//                    Check if _pdf file is available, otherwise notice user
+                      QString jobname = ui->line_jobname->text();
+                      branch = QCoreApplication::applicationDirPath();
+                      branch = branch.left(branch.length() - 14);
+
+                      QFile restartfile(branch+"/JOBS/"+jobname+"/INPUT/"+ \
+                                        jobname+"_p3df");
+                      if (restartfile.exists() == true)
+                      {
+                         ui->label_restart->setText("");
+                      }
+                      else
+                      {
+                         ui->label_restart->setText("Warning: No p3df file \
+                                                    found!");
+                      }
+                   }
+
+               }
+
+            }
+
+//          All unknown parameters are set as extra user parameters
+            else
+            {
+                user = user + "-" + parameter + " \"" + options + "\" ";
+                splitline.removeAt(i);
+            }
+        }
+
+//      Change drop box state in case of ocean precursor or coupled restart runs
+        if ( ocean_run == true )
+        {
+           if ( coupled_run == true )
+           {
+             ui->drop_job->setCurrentIndex(4);
+           }
+           else
+           {
+              ui->drop_job->setCurrentIndex(3);
+           }
+        }
+
+        if ( user != "")
+        {
+           ui->line_user->setText(user);
+        }
+
+//      Join mrunline and post it to mainwindow
+        mrunline = splitline.join(" -");
+        ui->commandline->setText(mrunline);
+
+//      Check if advanced settings are used and enable advanced dialog
+        if ( advanced == true )
+        {
+           ui->check_advanced->setChecked(true);
+        }
+
+//      Disable mainwindow if no job was found, otherwise enable
+        if ( nojob == true )
+        {
+           ui->group_execution->setEnabled(false);
+           ui->group_runcontrol->setEnabled(false);
+           ui->button_start->setEnabled(false);
+           ui->action_save->setEnabled(false);
+           ui->drop_job->setEnabled(false);
+           ui->group_advanced->setEnabled(false);
+           ui->check_advanced->setEnabled(false);
+        }
+        else
+        {
+           ui->group_execution->setEnabled(true);
+           ui->group_runcontrol->setEnabled(true);
+           ui->button_start->setEnabled(true);
+           ui->action_save->setEnabled(true);
+           ui->check_advanced->setEnabled(true);
+           ui->drop_job->setEnabled(true);
+           if ( advanced == true )
+           {
+              ui->group_advanced->setEnabled(true);
+           }
+           else
+           {
+              ui->group_advanced->setEnabled(false);
+           }
+        }
+
+//      Disable run control box, if manual settings of -i and -o are used
+        if ( rc_manual == true )
+        {
+           ui->group_runcontrol->setEnabled(false);
+           change_commandline("r","remove");
+           ui->button_start->setEnabled(true);
+           ui->action_save->setEnabled(true);
+        }
+
+    }
+
+    return 0;
+}
Index: palm/trunk/UTIL/mrungui/mainwindow.h
===================================================================
--- palm/trunk/UTIL/mrungui/mainwindow.h	(revision 793)
+++ palm/trunk/UTIL/mrungui/mainwindow.h	(revision 793)
@@ -0,0 +1,66 @@
+//----------------------------------------------------------------------------//
+// Current revisions:
+// -----------------
+// Initial revision
+//
+// Former revisions:
+// -----------------
+// $Id$
+//
+// Description:
+// ------------
+// UI mainwindow header file
+//----------------------------------------------------------------------------//
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+
+namespace Ui {
+    class MainWindow;
+}
+
+
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+
+public:
+    explicit MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+
+private:
+    Ui::MainWindow *ui;
+    int change_commandline(QString id,QString fwstring);
+    int delete_commandline(QString id);
+    int activate_flag(QString id);
+    int deactivate_flag(QString id);
+    int setup_gui(QString mrunline);
+    int recent_jobs(int noj);
+
+
+private slots:
+    int startmrun();
+    int enable_advanced();
+    int enable_coupled();
+    int choosejob();
+    int choosejob_list();
+    int change_rc_list();
+    int check_flags();
+    int change_lineinput();
+    int reset_window();
+    int save_to_file();
+    int save_default();
+    int open_from_file();
+    int open_last();
+    int help();
+    int about_gui();
+};
+
+#endif // MAINWINDOW_H
+
+
Index: palm/trunk/UTIL/mrungui/mainwindow.ui
===================================================================
--- palm/trunk/UTIL/mrungui/mainwindow.ui	(revision 793)
+++ palm/trunk/UTIL/mrungui/mainwindow.ui	(revision 793)
@@ -0,0 +1,2425 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>917</width>
+    <height>689</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>960</width>
+    <height>730</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>MRUN gui</string>
+  </property>
+  <property name="iconSize">
+   <size>
+    <width>72</width>
+    <height>72</height>
+   </size>
+  </property>
+  <property name="toolButtonStyle">
+   <enum>Qt::ToolButtonIconOnly</enum>
+  </property>
+  <property name="animated">
+   <bool>false</bool>
+  </property>
+  <property name="documentMode">
+   <bool>false</bool>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <widget class="QGroupBox" name="groupBox">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>590</y>
+      <width>901</width>
+      <height>71</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Main control</string>
+    </property>
+    <widget class="QPushButton" name="button_exit">
+     <property name="geometry">
+      <rect>
+       <x>120</x>
+       <y>10</y>
+       <width>100</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Quit</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="button_start">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>100</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>MRUN Start</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="commandline">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>40</y>
+       <width>881</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="mouseTracking">
+      <bool>false</bool>
+     </property>
+     <property name="acceptDrops">
+      <bool>false</bool>
+     </property>
+     <property name="frame">
+      <bool>false</bool>
+     </property>
+     <property name="readOnly">
+      <bool>true</bool>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="button_clear">
+     <property name="geometry">
+      <rect>
+       <x>230</x>
+       <y>10</y>
+       <width>100</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Clear</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QGroupBox" name="group_runcontrol">
+    <property name="enabled">
+     <bool>false</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>360</x>
+      <y>0</y>
+      <width>141</width>
+      <height>326</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Run control list</string>
+    </property>
+    <widget class="QCheckBox" name="check_pr">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>55</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Profiles</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_3d">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>155</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>3D</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_xy">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>80</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>XY</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_ts">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>30</y>
+       <width>121</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Timeseries (TS)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_ma">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>180</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Masks</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_sp">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>205</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Spectra</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_prt">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>230</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Particles</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_xz">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>105</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>XZ</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_yz">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>130</y>
+       <width>87</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>YZ</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_pts">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>250</y>
+       <width>131</width>
+       <height>36</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Particle TS</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QGroupBox" name="group_job">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>0</y>
+      <width>351</width>
+      <height>326</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Job name</string>
+    </property>
+    <widget class="QLineEdit" name="line_jobname">
+     <property name="geometry">
+      <rect>
+       <x>90</x>
+       <y>30</y>
+       <width>251</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>30</y>
+       <width>71</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Select</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>65</y>
+       <width>101</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Recent 10 jobs:</string>
+     </property>
+    </widget>
+    <widget class="QListWidget" name="list_jobname">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>85</y>
+       <width>331</width>
+       <height>181</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QComboBox" name="drop_job">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>265</y>
+       <width>251</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <item>
+      <property name="text">
+       <string>Initial run</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Restart run</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Precursor run (Atmosphere)</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Precursor run (Ocean)</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Coupled restart</string>
+      </property>
+     </item>
+    </widget>
+    <widget class="QLabel" name="label_usercode">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>295</y>
+       <width>241</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QGroupBox" name="group_execution">
+    <property name="enabled">
+     <bool>false</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>325</y>
+      <width>491</width>
+      <height>261</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Execution</string>
+    </property>
+    <widget class="QLineEdit" name="line_q">
+     <property name="geometry">
+      <rect>
+       <x>290</x>
+       <y>30</y>
+       <width>91</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_2">
+     <property name="geometry">
+      <rect>
+       <x>250</x>
+       <y>35</y>
+       <width>41</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Queue:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_pe">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>80</y>
+       <width>51</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_3">
+     <property name="geometry">
+      <rect>
+       <x>40</x>
+       <y>85</y>
+       <width>31</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PEs:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_tpn">
+     <property name="geometry">
+      <rect>
+       <x>290</x>
+       <y>80</y>
+       <width>41</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_4">
+     <property name="geometry">
+      <rect>
+       <x>210</x>
+       <y>85</y>
+       <width>81</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Tasks / node:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_account">
+     <property name="geometry">
+      <rect>
+       <x>290</x>
+       <y>55</y>
+       <width>91</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_5">
+     <property name="geometry">
+      <rect>
+       <x>230</x>
+       <y>60</y>
+       <width>61</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Account:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_6">
+     <property name="geometry">
+      <rect>
+       <x>0</x>
+       <y>110</y>
+       <width>71</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>CPU time:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_time">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>105</y>
+       <width>131</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_7">
+     <property name="geometry">
+      <rect>
+       <x>30</x>
+       <y>35</y>
+       <width>41</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Host:</string>
+     </property>
+     <property name="scaledContents">
+      <bool>false</bool>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_host">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>30</y>
+       <width>131</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_coupled1">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>135</y>
+       <width>161</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="autoFillBackground">
+      <bool>false</bool>
+     </property>
+     <property name="text">
+      <string>PEs (Atmosphere / Ocean):</string>
+     </property>
+     <property name="scaledContents">
+      <bool>false</bool>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_PE_atmos">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>130</y>
+       <width>61</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+     <property name="frame">
+      <bool>true</bool>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_PE_ocean">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>290</x>
+       <y>130</y>
+       <width>61</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_coupled2">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>180</x>
+       <y>135</y>
+       <width>21</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>A:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_coupled3">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>270</x>
+       <y>135</y>
+       <width>21</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>O:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="Line" name="line">
+     <property name="geometry">
+      <rect>
+       <x>7</x>
+       <y>160</y>
+       <width>481</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_restarts">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>180</y>
+       <width>121</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Allow restarts</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_delete_tmp_files">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>205</y>
+       <width>271</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Do not delete temporary directory at end</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_branch">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>55</y>
+       <width>131</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_11">
+     <property name="geometry">
+      <rect>
+       <x>20</x>
+       <y>60</y>
+       <width>51</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Branch:</string>
+     </property>
+     <property name="scaledContents">
+      <bool>false</bool>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_coupling">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>350</x>
+       <y>135</y>
+       <width>55</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_verbose">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>230</y>
+       <width>261</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>No prompt on confirmation</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_restart">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>130</x>
+       <y>190</y>
+       <width>241</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QGroupBox" name="group_advanced">
+    <property name="enabled">
+     <bool>false</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>510</x>
+      <y>30</y>
+      <width>401</width>
+      <height>556</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Advanced settings</string>
+    </property>
+    <widget class="QCheckBox" name="check_x">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>200</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-x  (tracing of mrun for debug purposes)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_S">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>175</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-S  (config file interpreted by shellscript)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_O">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>150</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-O  (use OpenMP)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_k">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>125</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-k  (keep data from previous run)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_I">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>100</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-I  (archiving errors of previous batch-jobs will be ignored)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_F">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>75</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-F (create remote job file only)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_b">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>50</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-b  (batch-job on local machine)</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="check_A">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>25</y>
+       <width>421</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>-A  archiving when using file-attribute fl</string>
+     </property>
+    </widget>
+    <widget class="QComboBox" name="combo_n">
+     <property name="geometry">
+      <rect>
+       <x>280</x>
+       <y>235</y>
+       <width>111</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <item>
+      <property name="text">
+       <string>default</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>shared</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>non_shared</string>
+      </property>
+     </item>
+    </widget>
+    <widget class="QLineEdit" name="line_D">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>315</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_a">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>290</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_14">
+     <property name="geometry">
+      <rect>
+       <x>60</x>
+       <y>460</y>
+       <width>131</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>OUTPUT control list:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="Line" name="line_2">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>220</y>
+       <width>381</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_16">
+     <property name="geometry">
+      <rect>
+       <x>100</x>
+       <y>240</y>
+       <width>91</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Memory (MB):</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_m">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>235</y>
+       <width>71</width>
+       <height>25</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_13">
+     <property name="geometry">
+      <rect>
+       <x>30</x>
+       <y>295</y>
+       <width>161</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Base name of input files:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_18">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>320</y>
+       <width>181</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Preprocessor directives (cpp):</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_8">
+     <property name="geometry">
+      <rect>
+       <x>20</x>
+       <y>345</y>
+       <width>171</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Configuration file:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_c">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>340</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_9">
+     <property name="geometry">
+      <rect>
+       <x>60</x>
+       <y>370</y>
+       <width>131</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Software package list:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_p">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>365</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_19">
+     <property name="geometry">
+      <rect>
+       <x>20</x>
+       <y>395</y>
+       <width>171</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Filenames of routines to be
+ compiled:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_s">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>405</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_15">
+     <property name="geometry">
+      <rect>
+       <x>60</x>
+       <y>435</y>
+       <width>131</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>INPUT control list:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_i">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>430</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_o">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>455</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_w">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>480</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_17">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>485</y>
+       <width>181</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Number of parallel I/O streams</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="Line" name="line_3">
+     <property name="geometry">
+      <rect>
+       <x>0</x>
+       <y>505</y>
+       <width>441</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_user">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>525</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_20">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>530</y>
+       <width>181</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>User parameters (no preview):</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_21">
+     <property name="geometry">
+      <rect>
+       <x>30</x>
+       <y>265</y>
+       <width>161</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Makefile:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="line_M">
+     <property name="geometry">
+      <rect>
+       <x>200</x>
+       <y>260</y>
+       <width>191</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QCheckBox" name="check_advanced">
+    <property name="enabled">
+     <bool>false</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>510</x>
+      <y>5</y>
+      <width>201</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Enable advanced settings</string>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>917</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuStart">
+    <property name="geometry">
+     <rect>
+      <x>2190</x>
+      <y>99</y>
+      <width>133</width>
+      <height>182</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Start</string>
+    </property>
+    <property name="separatorsCollapsible">
+     <bool>false</bool>
+    </property>
+    <addaction name="action_open"/>
+    <addaction name="separator"/>
+    <addaction name="action_last"/>
+    <addaction name="action_save"/>
+    <addaction name="action_default"/>
+    <addaction name="action_quit"/>
+   </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>Help</string>
+    </property>
+    <addaction name="action_help"/>
+    <addaction name="action_about"/>
+   </widget>
+   <widget class="QMenu" name="menuTools">
+    <property name="title">
+     <string>Tools</string>
+    </property>
+    <addaction name="actionCheck_parameter_file"/>
+   </widget>
+   <addaction name="menuStart"/>
+   <addaction name="menuTools"/>
+   <addaction name="menuHelp"/>
+  </widget>
+  <action name="action_open">
+   <property name="text">
+    <string>Open from File</string>
+   </property>
+  </action>
+  <action name="action_save">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Save to File</string>
+   </property>
+  </action>
+  <action name="action_last">
+   <property name="text">
+    <string>Load Last Job</string>
+   </property>
+  </action>
+  <action name="action_quit">
+   <property name="text">
+    <string>Quit</string>
+   </property>
+  </action>
+  <action name="action_help">
+   <property name="text">
+    <string>Help</string>
+   </property>
+  </action>
+  <action name="action_about">
+   <property name="text">
+    <string>About MRUN gui</string>
+   </property>
+  </action>
+  <action name="action_default">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Save as Default</string>
+   </property>
+  </action>
+  <action name="actionCheck_parameter_file">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Check parameter file</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <tabstops>
+  <tabstop>pushButton</tabstop>
+  <tabstop>line_jobname</tabstop>
+  <tabstop>list_jobname</tabstop>
+  <tabstop>drop_job</tabstop>
+  <tabstop>line_host</tabstop>
+  <tabstop>line_q</tabstop>
+  <tabstop>line_branch</tabstop>
+  <tabstop>line_account</tabstop>
+  <tabstop>line_pe</tabstop>
+  <tabstop>line_tpn</tabstop>
+  <tabstop>line_time</tabstop>
+  <tabstop>line_PE_atmos</tabstop>
+  <tabstop>line_PE_ocean</tabstop>
+  <tabstop>check_ts</tabstop>
+  <tabstop>check_pr</tabstop>
+  <tabstop>check_xy</tabstop>
+  <tabstop>check_xz</tabstop>
+  <tabstop>check_yz</tabstop>
+  <tabstop>check_3d</tabstop>
+  <tabstop>check_ma</tabstop>
+  <tabstop>check_sp</tabstop>
+  <tabstop>check_prt</tabstop>
+  <tabstop>check_pts</tabstop>
+  <tabstop>check_restarts</tabstop>
+  <tabstop>check_delete_tmp_files</tabstop>
+  <tabstop>check_verbose</tabstop>
+  <tabstop>button_start</tabstop>
+  <tabstop>button_clear</tabstop>
+  <tabstop>check_advanced</tabstop>
+  <tabstop>check_A</tabstop>
+  <tabstop>check_b</tabstop>
+  <tabstop>check_F</tabstop>
+  <tabstop>check_I</tabstop>
+  <tabstop>check_k</tabstop>
+  <tabstop>check_O</tabstop>
+  <tabstop>check_S</tabstop>
+  <tabstop>check_x</tabstop>
+  <tabstop>line_m</tabstop>
+  <tabstop>combo_n</tabstop>
+  <tabstop>line_M</tabstop>
+  <tabstop>line_a</tabstop>
+  <tabstop>line_D</tabstop>
+  <tabstop>line_c</tabstop>
+  <tabstop>line_p</tabstop>
+  <tabstop>line_s</tabstop>
+  <tabstop>line_i</tabstop>
+  <tabstop>line_o</tabstop>
+  <tabstop>line_w</tabstop>
+  <tabstop>line_user</tabstop>
+  <tabstop>commandline</tabstop>
+  <tabstop>button_exit</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_exit</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>160</x>
+     <y>687</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>16</x>
+     <y>19</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_start</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>startmrun()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>73</x>
+     <y>687</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>14</x>
+     <y>63</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_advanced</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>enable_advanced()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>595</x>
+     <y>43</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>628</x>
+     <y>10</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>drop_job</sender>
+   <signal>activated(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>enable_coupled()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>222</x>
+     <y>296</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>261</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pushButton</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>choosejob()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>53</x>
+     <y>77</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>535</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>list_jobname</sender>
+   <signal>itemActivated(QListWidgetItem*)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>choosejob_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>313</x>
+     <y>178</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>430</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_ts</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>440</x>
+     <y>73</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>63</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_pr</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>427</x>
+     <y>96</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>90</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_xy</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>417</x>
+     <y>121</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>116</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_xz</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>413</x>
+     <y>141</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>142</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_yz</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>409</x>
+     <y>169</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>167</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_3d</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>418</x>
+     <y>196</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>194</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_ma</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>416</x>
+     <y>217</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>219</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_prt</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>429</x>
+     <y>281</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>247</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_sp</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>431</x>
+     <y>256</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>503</x>
+     <y>304</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_pts</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>415</x>
+     <y>314</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>330</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>drop_job</sender>
+   <signal>currentIndexChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>270</x>
+     <y>295</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>334</x>
+     <y>356</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_restarts</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>72</x>
+     <y>571</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1</x>
+     <y>530</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_delete_tmp_files</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>76</x>
+     <y>596</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>3</x>
+     <y>562</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_verbose</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>53</x>
+     <y>626</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>5</x>
+     <y>623</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_A</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>531</x>
+     <y>98</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>952</x>
+     <y>41</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_b</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>556</x>
+     <y>119</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>954</x>
+     <y>67</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_F</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>574</x>
+     <y>150</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>954</x>
+     <y>103</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_I</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>586</x>
+     <y>172</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>956</x>
+     <y>129</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_k</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>593</x>
+     <y>195</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>957</x>
+     <y>158</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_O</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>606</x>
+     <y>216</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>188</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_S</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>604</x>
+     <y>244</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>221</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_x</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>617</x>
+     <y>266</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>255</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_host</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>119</x>
+     <y>407</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>26</x>
+     <y>362</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_branch</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>149</x>
+     <y>431</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>405</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_pe</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>95</x>
+     <y>451</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>5</x>
+     <y>440</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_time</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>179</x>
+     <y>482</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>480</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_q</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>338</x>
+     <y>400</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>507</x>
+     <y>387</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_account</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>361</x>
+     <y>429</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>416</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_tpn</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>328</x>
+     <y>453</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>447</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_PE_atmos</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>262</x>
+     <y>508</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>507</x>
+     <y>482</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_PE_ocean</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>324</x>
+     <y>504</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>513</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_m</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>756</x>
+     <y>303</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>954</x>
+     <y>328</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_a</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>796</x>
+     <y>358</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>365</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_D</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>805</x>
+     <y>389</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>396</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_c</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>850</x>
+     <y>410</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>956</x>
+     <y>421</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_p</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>868</x>
+     <y>448</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>958</x>
+     <y>482</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_s</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>885</x>
+     <y>488</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>522</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_i</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>906</x>
+     <y>513</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>551</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_o</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>919</x>
+     <y>538</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>954</x>
+     <y>578</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_w</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>917</x>
+     <y>563</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>956</x>
+     <y>612</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>combo_n</sender>
+   <signal>currentIndexChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>887</x>
+     <y>303</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>310</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_user</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>812</x>
+     <y>592</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>955</x>
+     <y>650</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_clear</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>reset_window()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>307</x>
+     <y>675</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>956</x>
+     <y>689</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_M</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>904</x>
+     <y>333</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>953</x>
+     <y>287</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_quit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_save</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>save_to_file()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_last</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>open_last()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_open</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>open_from_file()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_help</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>help()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_about</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>about_gui()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_default</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>save_default()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_jobname</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>175</x>
+     <y>66</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>122</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>startmrun()</slot>
+  <slot>enable_advanced()</slot>
+  <slot>enable_coupled()</slot>
+  <slot>choosejob()</slot>
+  <slot>choosejob_list()</slot>
+  <slot>change_rc_list()</slot>
+  <slot>check_flags()</slot>
+  <slot>change_lineinput()</slot>
+  <slot>reset_window()</slot>
+  <slot>save_to_file()</slot>
+  <slot>open_from_file()</slot>
+  <slot>open_last()</slot>
+  <slot>about()</slot>
+  <slot>about_gui()</slot>
+  <slot>save_default()</slot>
+  <slot>help()</slot>
+ </slots>
+</ui>
Index: palm/trunk/UTIL/mrungui/mrungui.pro
===================================================================
--- palm/trunk/UTIL/mrungui/mrungui.pro	(revision 793)
+++ palm/trunk/UTIL/mrungui/mrungui.pro	(revision 793)
@@ -0,0 +1,29 @@
+#!/bin/ksh
+#------------------------------------------------------------------------------#
+# Current revisions:
+# -----------------
+# Initial revision
+#
+# Former revisions:
+# -----------------
+# $Id$
+#
+# Description:
+# ------------
+# Project file for mrungui (qmake instructions)
+#------------------------------------------------------------------------------#
+
+QT       += core gui
+
+TARGET = mrungui.x
+DESTDIR = ../../SCRIPTS/
+TEMPLATE = app
+
+SOURCES += main.cpp\
+        mainwindow.cpp
+
+HEADERS  += mainwindow.h
+
+FORMS    += mainwindow.ui \
+    help.ui \
+    about.ui
