diff --git a/modules/config/base.hh b/modules/config/base.hh index 02bdc2b4c97929fedc6b5742ec59860c1e7190e6..2019437b5b47828492ec8de2422a77287d650092 100644 --- a/modules/config/base.hh +++ b/modules/config/base.hh @@ -19,7 +19,6 @@ #ifndef OST_BASE_HH #define OST_BASE_HH -#include <string> #include <cmath> #include <math.h> #include <complex> diff --git a/modules/gui/src/python_shell/gutter.cc b/modules/gui/src/python_shell/gutter.cc index bb8cb98ee3748e8ecccc22396bc2a0725715127b..eed96f4573cc1b8ea35d5d5e51cd8de0ae1c257e 100644 --- a/modules/gui/src/python_shell/gutter.cc +++ b/modules/gui/src/python_shell/gutter.cc @@ -49,7 +49,7 @@ void Gutter::paintEvent(QPaintEvent* paint_event) QPainter painter(this); painter.setPen(QPen(Qt::black)); painter.fillRect(paint_event->rect(), QBrush(Qt::lightGray)); - for (GutterBlockList::const_iterator it=blocks.begin(); + for (GutterBlockList::const_iterator it=blocks.begin(); it!=blocks.end(); ++it) { if (it->type & BLOCKTYPE_ACTIVE) { QColor green(Qt::green); diff --git a/modules/gui/src/python_shell/python_completer.cc b/modules/gui/src/python_shell/python_completer.cc index 9ec41df66d7a4e57fdf61a5a30809a5b3a596504..af7f93d380726b0d520f496645a2f519f2fd09b8 100644 --- a/modules/gui/src/python_shell/python_completer.cc +++ b/modules/gui/src/python_shell/python_completer.cc @@ -20,10 +20,10 @@ Authors: Marco Biasini, Andreas Schenk */ -#include <iostream> #include "python_completer.hh" #include "python_namespace_tree_model.hh" +#include <iostream> #include <QStringList> diff --git a/modules/gui/src/python_shell/python_context_parser.hh b/modules/gui/src/python_shell/python_context_parser.hh index ddc2c93ddd19b9bf65169fb062dac94a0999ba93..0e5df593f494fb57edb1c3dc188ca5e5b32533b6 100644 --- a/modules/gui/src/python_shell/python_context_parser.hh +++ b/modules/gui/src/python_shell/python_context_parser.hh @@ -23,10 +23,10 @@ Author: Marco Biasini */ +#include "python_tokenizer.hh" #include <vector> #include <iostream> -#include "python_tokenizer.hh" namespace ost { namespace gui { diff --git a/modules/gui/src/python_shell/python_interpreter.hh b/modules/gui/src/python_shell/python_interpreter.hh index 5f12d6bbde982697f00350bcf2a1160992000e73..3cbe055cbb6dc0afd060a19b1c54b495e4372bb2 100644 --- a/modules/gui/src/python_shell/python_interpreter.hh +++ b/modules/gui/src/python_shell/python_interpreter.hh @@ -27,14 +27,11 @@ #ifndef PYTHON_INTERPRETER_HH #define PYTHON_INTERPRETER_HH -#include <vector> -#include <ost/gui/module_config.hh> - -#include <ost/gui/module_config.hh> #include "python_interpreter_worker.hh" #include "output_redirector.hh" #include "main_thread_runner.hh" +#include <ost/gui/module_config.hh> #include <QQueue> #include <QMetaType> diff --git a/modules/gui/src/python_shell/python_interpreter_worker.cc b/modules/gui/src/python_shell/python_interpreter_worker.cc index 68f38a247f0026555ee87ff9d12da4b41579c217..e75f484600f3b749756042783316ece6697991fb 100644 --- a/modules/gui/src/python_shell/python_interpreter_worker.cc +++ b/modules/gui/src/python_shell/python_interpreter_worker.cc @@ -1,3 +1,23 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + + #include "python_interpreter_worker.hh" #include "python_interpreter.hh" diff --git a/modules/gui/src/python_shell/python_interpreter_worker.hh b/modules/gui/src/python_shell/python_interpreter_worker.hh index ed80f6fe78b308f1269a5a723bffe46883fbe35b..557604900e046dee0c46fec77550a4b1e2292ad4 100644 --- a/modules/gui/src/python_shell/python_interpreter_worker.hh +++ b/modules/gui/src/python_shell/python_interpreter_worker.hh @@ -1,14 +1,34 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + + #ifndef PYTHON_INTERPRETER_WORKER_HH #define PYTHON_INTERPRETER_WORKER_HH -#include <csignal> -#include <utility> // workaround for QTBUG-22829: https://bugreports.qt-project.org/browse/QTBUG-22829 #ifndef Q_MOC_RUN #include <boost/python.hpp> #include <boost/shared_ptr.hpp> #endif #include "output_redirector.hh" +#include <csignal> +#include <utility> #include <QObject> #include <QQueue> diff --git a/modules/gui/src/python_shell/python_namespace_tree_item.cc b/modules/gui/src/python_shell/python_namespace_tree_item.cc index e16bbede4c7b3726bff8bec166f8b8caa8988477..5c59e235810eb61c730cc36b11989aa416c46901 100644 --- a/modules/gui/src/python_shell/python_namespace_tree_item.cc +++ b/modules/gui/src/python_shell/python_namespace_tree_item.cc @@ -17,9 +17,9 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ +#include "python_namespace_tree_item.hh" #include <ost/base.hh> -#include "python_namespace_tree_item.hh" diff --git a/modules/gui/src/python_shell/python_shell.cc b/modules/gui/src/python_shell/python_shell.cc index cdd9c28c3315058b54bcfa4c9e1a206b4a20fcbc..6690506d2953caa46bdbcfe3218e2b372fc02f96 100644 --- a/modules/gui/src/python_shell/python_shell.cc +++ b/modules/gui/src/python_shell/python_shell.cc @@ -21,11 +21,11 @@ Author: Marco Biasini */ +#include "python_shell.hh" +#include "python_shell_widget.hh" #include <ost/gui/gosty_app.hh> #include <ost/gui/widget_registry.hh> -#include "python_shell.hh" -#include "python_shell_widget.hh" #include <QVBoxLayout> namespace ost { namespace gui { diff --git a/modules/gui/src/python_shell/python_shell_fw.hh b/modules/gui/src/python_shell/python_shell_fw.hh index d70eb83d841be3ab6e26fe941e81702c0bd41177..9abb7cae16532955fe0d1177fab66a4988b91492 100644 --- a/modules/gui/src/python_shell/python_shell_fw.hh +++ b/modules/gui/src/python_shell/python_shell_fw.hh @@ -23,7 +23,6 @@ Author: Andreas Schenk */ -#include <vector> namespace ost { namespace gui { // fw decl @@ -51,7 +50,6 @@ struct GutterBlock{ BlockType type; }; -typedef std::vector<GutterBlock> GutterBlockList; }}//ns diff --git a/modules/gui/src/python_shell/python_shell_widget.cc b/modules/gui/src/python_shell/python_shell_widget.cc index 9adafdd7c764e8727f3a7dab0912c4b82347bbd3..9c816f5dcb6585bfba7af6ec202bae17e08ad75a 100644 --- a/modules/gui/src/python_shell/python_shell_widget.cc +++ b/modules/gui/src/python_shell/python_shell_widget.cc @@ -20,21 +20,20 @@ Authors: Marco Biasini, Andreas Schenk */ -#include <iostream> #include "python_shell_widget.hh" - +#include "state_machine.hh" +#include "state.hh" #include "gutter.hh" - #include "string_literal_positions.hh" - #include "python_shell_text_document_layout.hh" - #include "python_completer.hh" #include "path_completer.hh" #include "transition.hh" +#include <iostream> + #include <QApplication> #include <QFontMetrics> #include <QClipboard> diff --git a/modules/gui/src/python_shell/python_shell_widget.hh b/modules/gui/src/python_shell/python_shell_widget.hh index f2b2dbcedefc22696a6b5f1d7cf0b0f4753f0fdf..090272bbbd00e3b5155a917e2fc566c2c41cfc44 100644 --- a/modules/gui/src/python_shell/python_shell_widget.hh +++ b/modules/gui/src/python_shell/python_shell_widget.hh @@ -25,13 +25,11 @@ #define OST_GUI_PYTHON_SHELL_WIDGET_HH -#include <ost/gui/module_config.hh> #include "python_interpreter.hh" #include "shell_history.hh" #include "python_shell_fw.hh" #include "python_syntax_highlighter.hh" -#include "state_machine.hh" -#include "state.hh" +#include <ost/gui/module_config.hh> #include <QPlainTextEdit> #include <QHash> @@ -41,7 +39,10 @@ namespace ost { namespace gui { class Gutter; class PythonCompleter; class PathCompleter; +class State; +class StateMachine; +typedef std::vector<GutterBlock> GutterBlockList; class DLLEXPORT_OST_GUI PythonShellWidget : public QPlainTextEdit { diff --git a/modules/gui/src/python_shell/python_syntax_highlighter.cc b/modules/gui/src/python_shell/python_syntax_highlighter.cc index cca2c0b8b088550a007c4aacf7c6789961a279ad..72ab4be2a096a3cab15fc0849eff8fcbb42dbc6d 100644 --- a/modules/gui/src/python_shell/python_syntax_highlighter.cc +++ b/modules/gui/src/python_shell/python_syntax_highlighter.cc @@ -20,14 +20,13 @@ Authors: Marco Biasini, Andreas Schenk */ -#include <iostream> #include "python_shell.hh" #include "string_literal_positions.hh" - #include "python_syntax_highlighter.hh" #include "python_context_parser.hh" +#include <iostream> #include <QDebug> #include <QTextCursor> diff --git a/modules/gui/src/python_shell/shell_history.hh b/modules/gui/src/python_shell/shell_history.hh index 20e0405afe4aec3b1d17b7533b9750c0b50af57e..87e082af623c137959144216a5778698a545630d 100644 --- a/modules/gui/src/python_shell/shell_history.hh +++ b/modules/gui/src/python_shell/shell_history.hh @@ -22,8 +22,8 @@ Author: Andreas Schenk */ -#include <vector> #include "python_shell_fw.hh" +#include <vector> #include <QString> namespace ost { namespace gui { diff --git a/modules/gui/src/python_shell/state.cc b/modules/gui/src/python_shell/state.cc index 381fffff4d120cf891fa2b5e552258cdfafc5274..f5b7c522306c5f96df8b0817005f30f02a70800a 100644 --- a/modules/gui/src/python_shell/state.cc +++ b/modules/gui/src/python_shell/state.cc @@ -1,7 +1,26 @@ -#include <cassert> +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + #include "transition.hh" #include "state.hh" #include "state_machine.hh" +#include <cassert> namespace ost { namespace gui { diff --git a/modules/gui/src/python_shell/state.hh b/modules/gui/src/python_shell/state.hh index a6c05c36b3b6fc94db8498caf41a0fa71f90323f..679542078d8a17086c099b0dfa6e9df04173ae68 100644 --- a/modules/gui/src/python_shell/state.hh +++ b/modules/gui/src/python_shell/state.hh @@ -1,3 +1,22 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + #ifndef PYTHON_SHELL_STATE_HH #define PYTHON_SHELL_STATE_HH diff --git a/modules/gui/src/python_shell/state_machine.cc b/modules/gui/src/python_shell/state_machine.cc index 9ce3f37bc85946686bcb1d34f3593b37789336ce..048ed68eb83a0bdd2324d451e7f4f6f7aea65ed2 100644 --- a/modules/gui/src/python_shell/state_machine.cc +++ b/modules/gui/src/python_shell/state_machine.cc @@ -1,3 +1,22 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + #include <QEvent> #include <QKeyEvent> #include <QMouseEvent> diff --git a/modules/gui/src/python_shell/state_machine.hh b/modules/gui/src/python_shell/state_machine.hh index ac265dfd91e898d3af9ef483de11076a846cafdb..8db26c10a64f521ab5e27021e78e4db391b7b245 100644 --- a/modules/gui/src/python_shell/state_machine.hh +++ b/modules/gui/src/python_shell/state_machine.hh @@ -1,3 +1,22 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + #ifndef PYTHON_SHELL_STATE_MACHINE_HH #define PYTHON_SHELL_STATE_MACHINE_HH diff --git a/modules/gui/src/python_shell/transition.cc b/modules/gui/src/python_shell/transition.cc index b2a07eb6b724273523dbf78121b768f260977f12..9916657713fe9be0a0c56913cffaf5dc312b468c 100644 --- a/modules/gui/src/python_shell/transition.cc +++ b/modules/gui/src/python_shell/transition.cc @@ -1,7 +1,26 @@ -#include <cassert> +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + #include "python_shell_widget.hh" #include "transition.hh" #include "state.hh" +#include <cassert> #include <QKeyEvent> #include <QMouseEvent> diff --git a/modules/gui/src/python_shell/transition.hh b/modules/gui/src/python_shell/transition.hh index a17b38ee5c55b85b2915651bb2b1e9e28020fae0..a3550f4280f8f186023f5750aeb7feee8fb5da92 100644 --- a/modules/gui/src/python_shell/transition.hh +++ b/modules/gui/src/python_shell/transition.hh @@ -1,12 +1,31 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + #ifndef PYTHON_SHELL_TRANSITION_HH #define PYTHON_SHELL_TRANSITION_HH -#include <utility> #include <ost/gui/python_shell/python_interpreter.hh> +#include "transition_guard.hh" +#include <utility> #include <QObject> #include <QEvent> -#include "transition_guard.hh" //fw decl class QKeyEvent; class QMouseEvent; diff --git a/modules/gui/src/python_shell/transition_guard.cc b/modules/gui/src/python_shell/transition_guard.cc index 940d5bba15a96f7605ffa90348cf6f64933f9994..acf6ff2c95a35cef4b689c22a3c22822e82ff7c0 100644 --- a/modules/gui/src/python_shell/transition_guard.cc +++ b/modules/gui/src/python_shell/transition_guard.cc @@ -1,7 +1,27 @@ -#include <iostream> +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + + #include "transition_guard.hh" #include "python_shell_widget.hh" #include "shell_history.hh" +#include <iostream> namespace ost { namespace gui { diff --git a/modules/gui/src/python_shell/transition_guard.hh b/modules/gui/src/python_shell/transition_guard.hh index 5a2906481c36da41fc7ef1d5aefecfc853d76ad9..c3b20201a7d5f7a3b0e1c2d21c34f819a7294ac3 100644 --- a/modules/gui/src/python_shell/transition_guard.hh +++ b/modules/gui/src/python_shell/transition_guard.hh @@ -1,3 +1,22 @@ +//------------------------------------------------------------------------------ +// This file is part of the OpenStructure project <www.openstructure.org> +// +// Copyright (C) 2008-2014 by the OpenStructure authors +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation; either version 3.0 of the License, or (at your option) +// any later version. +// This library is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +//------------------------------------------------------------------------------ + #ifndef TRANSITION_GUARD_HH #define TRANSITION_GUARD_HH