OpenStructure
Loading...
Searching...
No Matches
transition_guard.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// This file is part of the OpenStructure project <www.openstructure.org>
3//
4// Copyright (C) 2008-2020 by the OpenStructure authors
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License as published by the Free
8// Software Foundation; either version 3.0 of the License, or (at your option)
9// any later version.
10// This library is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this library; if not, write to the Free Software Foundation, Inc.,
17// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18//------------------------------------------------------------------------------
19
20#ifndef TRANSITION_GUARD_HH
21#define TRANSITION_GUARD_HH
22
23#include "python_shell_fw.hh"
24#include "python_interpreter.hh"
25#include <QObject>
26
27namespace ost { namespace gui {
28
29
30//fw decl
31 class ShellHistory;
32 class PythonShellWidget;
33
34
35class TransitionGuard: public QObject
36{
37Q_OBJECT
38
39public:
41 virtual bool check();
42};
43
44
45
47{
48public:
50 virtual bool check();
51protected:
54};
55
57{
58public:
68 EditPositionGuard(PythonShellWidget* shell,int flags1, int flags2=ALWAYSTRUE);
69 virtual bool check();
70protected:
71 virtual bool check_flag(int flag);
75};
76
78{
79public:
81 virtual bool check();
82protected:
85};
86
87
88
89}} //ns
90
91
92#endif // TRANSITION_GUARD_HH
BlockStatusGuard(PythonShellWidget *shell, int status)
EditPositionGuard(PythonShellWidget *shell, int flags1, int flags2=ALWAYSTRUE)
virtual bool check_flag(int flag)
HistoryGuard(ShellHistory *history, BlockEditMode mode)
virtual bool check()
Definition base.dox:1