OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
stage
include
ost
gui
python_shell
transition_guard.hh
Go to the documentation of this file.
1
#ifndef TRANSITION_GUARD_HH
2
#define TRANSITION_GUARD_HH
3
4
#include "
python_shell_fw.hh
"
5
#include "
python_interpreter.hh
"
6
#include <QObject>
7
8
namespace
ost {
namespace
gui {
9
10
11
//fw decl
12
class
ShellHistory;
13
class
PythonShellWidget;
14
15
16
class
TransitionGuard
:
public
QObject
17
{
18
Q_OBJECT
19
20
public
:
21
TransitionGuard
();
22
virtual
bool
check
();
23
};
24
25
26
27
class
HistoryGuard
:
public
TransitionGuard
28
{
29
public
:
30
HistoryGuard
(
ShellHistory
* history,
BlockEditMode
mode);
31
virtual
bool
check
();
32
protected
:
33
ShellHistory
*
history_
;
34
BlockEditMode
mode_
;
35
};
36
37
class
EditPositionGuard
:
public
TransitionGuard
38
{
39
public
:
40
enum
FLAGS
{
41
ALWAYSTRUE
=0,
42
SMALLER
=1,
43
EQUAL
=2,
44
BIGGER
=4,
45
ANCHORSMALLER
=8,
46
ANCHOREQUAL
=16,
47
ANCHORBIGGER
=32
48
};
49
EditPositionGuard
(
PythonShellWidget
* shell,
int
flags1,
int
flags2=
ALWAYSTRUE
);
50
virtual
bool
check
();
51
protected
:
52
virtual
bool
check_flag
(
int
flag);
53
PythonShellWidget
*
shell_
;
54
int
flags1_
;
55
int
flags2_
;
56
};
57
58
class
BlockStatusGuard
:
public
TransitionGuard
59
{
60
public
:
61
BlockStatusGuard
(
PythonShellWidget
* shell,
int
status);
62
virtual
bool
check
();
63
protected
:
64
PythonShellWidget
*
shell_
;
65
int
status_
;
66
};
67
68
69
70
}}
//ns
71
72
73
#endif // TRANSITION_GUARD_HH
Generated on Mon Nov 11 2013 09:56:11 for OpenStructure by
1.8.1.1