annotate gui/src/backend/OctaveMainThread.cpp @ 13674:c0e66d6e3dc8

Updated license headers and moved to AGPLv3.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Sun, 25 Sep 2011 10:52:42 +0200
parents ddc3c20d0e2f
children 5dcfb705ce12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
1 /* OctaveGUI - A graphical user interface for Octave
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13665
diff changeset
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com)
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
3 *
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
4 * This program is free software: you can redistribute it and/or modify
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13665
diff changeset
5 * it under the terms of the GNU Affero General Public License as
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13665
diff changeset
6 * published by the Free Software Foundation, either version 3 of the
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13665
diff changeset
7 * License, or (at your option) any later version.
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
8 *
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
9 * This program is distributed in the hope that it will be useful,
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13665
diff changeset
12 * GNU Affero General Public License for more details.
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
13 *
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13665
diff changeset
14 * You should have received a copy of the GNU Affero General Public License
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13665
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
16 */
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
17
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
18 #include "OctaveMainThread.h"
13541
b48ac9ad8de0 Highly improved separation of model and view classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13540
diff changeset
19 #include "OctaveLink.h"
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
20
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
21 OctaveMainThread::OctaveMainThread (QObject * parent):QThread (parent)
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
22 {
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
23 }
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
24
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
25 void
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
26 OctaveMainThread::run ()
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
27 {
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
28 int argc = 3;
13552
324adf6109e7 Isolated and eliminated class ProcessInfo.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13543
diff changeset
29 const char *argv[] = { "OctaveGUI", "--interactive", "--line-editing" };
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
30 octave_main (argc, (char **) argv, 1);
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
31 emit ready();
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
32 main_loop ();
13665
ddc3c20d0e2f Implemented highlighting of octave keywords in terminal.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13552
diff changeset
33 // TODO: Close application on quit.
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
34 clean_up_and_exit (0);
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
35 }