nightly (development)
latest release (v5.13.2)
5.13.2
5.13.1
5.13.0
5.12.1
5.12.0
5.11.2
5.11.1
5.11.0
5.10.2
5.10.1
5.10.0
5.9.1
5.9.0
5.8.1
5.8.0
5.7.0
5.6.2
5.5.2
C++
Python
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
c
f
g
i
l
m
n
p
q
r
s
t
v
w
+
Functions
c
g
l
m
n
p
q
r
s
t
v
+
Variables
_
l
m
q
v
Typedefs
Enumerations
+
Enumerator
a
c
g
l
m
n
p
q
r
s
t
v
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
2
3
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
g
i
l
m
n
p
q
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Related Functions
:
a
b
c
d
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
x
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
+
Typedefs
b
c
g
i
k
m
n
o
p
q
s
u
v
z
Enumerations
+
Enumerator
c
k
v
x
y
z
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Qt
Python
pqPythonTabWidget.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3
// SPDX-License-Identifier: BSD-3-Clause
4
5
#ifndef pqPythonTabWidget_h
6
#define pqPythonTabWidget_h
7
8
#include "
pqPythonModule.h
"
9
10
#include "
vtkType.h
"
// For vtkTypeUInt32
11
12
#include <QLabel>
13
#include <QMouseEvent>
14
#include <QStyle>
15
#include <QTabWidget>
16
17
class
pqPythonTextArea
;
18
struct
pqPythonEditorActions
;
19
28
class
PQPYTHON_EXPORT
pqPythonTabWidget
:
public
QTabWidget
29
{
30
Q_OBJECT
31
32
public
:
37
pqPythonTabWidget
(QWidget* parent);
38
42
pqPythonTextArea
* getCurrentTextArea()
const
;
43
47
void
connectActions(
pqPythonEditorActions
& actions);
48
53
void
updateActions(
pqPythonEditorActions
& actions);
54
59
bool
saveOnClose();
60
65
void
updateTrace(
const
QString& str);
66
72
void
stopTrace(
const
QString& str);
73
81
template
<
typename
T>
82
void
linkTo
(T*
/*obj*/
)
83
{
84
static_assert(
sizeof
(T) == 0,
"Only specializations of linkTo(T* t) can be used"
);
85
}
86
87
void
loadFile(
const
QString& filename);
88
89
public
Q_SLOTS:
// NOLINT(readability-redundant-access-specifiers)
93
void
createNewEmptyTab();
94
101
void
addNewTextArea(
102
const
QString& filename, vtkTypeUInt32
location
= 0x10
/*vtkPVSession::CLIENT*/
);
103
107
void
closeCurrentTab();
108
109
Q_SIGNALS:
114
void
fileOpened(
const
QString&);
115
119
void
fileSaved(
const
QString&);
120
121
protected
:
122
void
keyPressEvent(QKeyEvent* keyEvent)
override
;
123
void
mousePressEvent(QMouseEvent* mouseEvent)
override
;
124
125
private
:
126
void
updateTab(QWidget* widget);
127
void
addNewTabWidget();
128
void
setTabCloseButton(
pqPythonTextArea
* widget);
129
void
createParaviewTraceTab();
130
void
generateTabName(
const
pqPythonTextArea
* widget, QString& tabName, QString& elidedTabName,
131
QString& unstyledTabName)
const
;
132
137
int
fileIsOpened(
const
QString& filename)
const
;
138
139
template
<
typename
T>
140
T* getWidget(
int
idx)
const
141
{
142
if
(idx < 0 || idx >= this->count() - 1)
143
{
144
return
nullptr
;
145
}
146
147
return
reinterpret_cast<
T*
>
(this->widget(idx));
148
}
149
150
pqPythonTextArea
* lastFocus =
nullptr
;
151
152
pqPythonTextArea
* TraceWidget =
nullptr
;
153
};
154
155
#include "pqPythonTabWidget.txx"
156
157
#endif // pqPythonTabWidget_h
pqPythonTabWidget
Encapsulates the multitab python editor.
Definition:
pqPythonTabWidget.h:28
location
location
PQPYTHON_EXPORT
#define PQPYTHON_EXPORT
Definition:
pqPythonModule.h:15
pqPythonEditorActions
Definition:
pqPythonEditorActions.h:73
pqPythonModule.h
pqPythonTextArea
A python text editor widget.
Definition:
pqPythonTextArea.h:32
vtkType.h
pqPythonTabWidget::linkTo
void linkTo(T *)
Link the input QTextEdit to one of the tab of the editor.
Definition:
pqPythonTabWidget.h:82
Generated by
1.8.13 on Tue Dec 31 2024