CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Libs
Scripting
Python
Widgets
ctkPythonConsole.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Library: CTK
4
5
Copyright (c) Kitware Inc.
6
7
Licensed under the Apache License, Version 2.0 (the "License");
8
you may not use this file except in compliance with the License.
9
You may obtain a copy of the License at
10
11
http://www.apache.org/licenses/LICENSE-2.0.txt
12
13
Unless required by applicable law or agreed to in writing, software
14
distributed under the License is distributed on an "AS IS" BASIS,
15
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
See the License for the specific language governing permissions and
17
limitations under the License.
18
19
=========================================================================*/
20
/*=========================================================================
21
22
Program: ParaView
23
24
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
25
All rights reserved.
26
27
ParaView is a free software; you can redistribute it and/or modify it
28
under the terms of the ParaView license version 1.2.
29
30
See http://www.paraview.org/paraview/project/license.html for the full ParaView license.
31
A copy of this license can be obtained by contacting
32
Kitware Inc.
33
28 Corporate Drive
34
Clifton Park, NY 12065
35
USA
36
37
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
41
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
42
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
43
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
44
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
45
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
46
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
47
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48
49
=========================================================================*/
50
51
#ifndef __ctkPythonConsole_h
52
#define __ctkPythonConsole_h
53
54
// CTK includes
55
#include <
ctkConsole.h
>
56
#include "ctkScriptingPythonWidgetsExport.h"
57
65
66
class
ctkPythonConsolePrivate;
67
class
ctkAbstractPythonManager
;
68
69
class
CTK_SCRIPTING_PYTHON_WIDGETS_EXPORT
ctkPythonConsole
:
public
ctkConsole
70
{
71
Q_OBJECT
72
73
public
:
74
typedef
ctkConsole
Superclass
;
75
ctkPythonConsole
(QWidget* parentObject = 0);
76
virtual
~
ctkPythonConsole
();
77
79
void
initialize(
ctkAbstractPythonManager
* newPythonManager);
80
82
virtual
QString
ps1
()
const
;
83
85
virtual
void
setPs1
(
const
QString& newPs1);
86
88
virtual
QString
ps2
()
const
;
89
91
virtual
void
setPs2
(
const
QString& newPs2);
92
93
public
Q_SLOTS:
94
95
// void executeScript(const QString&);
96
98
virtual
void
reset
();
99
100
protected
:
101
virtual
void
executeCommand
(
const
QString& command);
102
103
private
:
104
Q_DECLARE_PRIVATE(
ctkPythonConsole
);
105
Q_DISABLE_COPY(
ctkPythonConsole
);
106
};
107
108
#endif
109
ctkPythonConsole
Definition:
ctkPythonConsole.h:69
ctkConsole
Definition:
ctkConsole.h:67
ctkConsole::ps2
QString ps2
Definition:
ctkConsole.h:78
ctkConsole::setPs2
virtual void setPs2(const QString &newPs2)
Set the string used as secondary prompt.
ctkConsole.h
ctkPythonConsole::Superclass
ctkConsole Superclass
Definition:
ctkPythonConsole.h:74
ctkConsole::executeCommand
virtual void executeCommand(const QString &Command)
Called whenever the user enters a command.
ctkAbstractPythonManager
Definition:
ctkAbstractPythonManager.h:41
ctkConsole::reset
virtual void reset()
Clears the contents of the console and display welcome message.
ctkConsole::setPs1
virtual void setPs1(const QString &newPs1)
Set the string used as primary prompt.
ctkConsole::ps1
QString ps1
Definition:
ctkConsole.h:77
Generated on Tue Jan 28 2020 00:00:00 for CTK by
1.8.17