Version: 8.3.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
SALOME GUI Developer
Todo List
Namespaces
Classes
Files
File List
idl
src
CAF
CAM
CASCatch
DDS
Event
GLViewer
GraphicsView
GuiHelpers
HelpBrowser
ImageComposer
LightApp
LogWindow
ObjBrowser
OBJECT
OCCViewer
OpenGLUtils
Plot2d
Prs
PVServerService
PVViewer
PyViewer
QDS
Qtx
Qtx.cxx
Qtx.h
QtxAction.cxx
QtxAction.h
QtxActionGroup.cxx
QtxActionGroup.h
QtxActionMenuMgr.cxx
QtxActionMenuMgr.h
QtxActionMgr.cxx
QtxActionMgr.h
QtxActionSet.cxx
QtxActionSet.h
QtxActionToolMgr.cxx
QtxActionToolMgr.h
QtxBackgroundTool.cxx
QtxBackgroundTool.h
QtxBiColorTool.cxx
QtxBiColorTool.h
QtxColorButton.cxx
QtxColorButton.h
QtxColorScale.cxx
QtxColorScale.h
QtxComboBox.cxx
QtxComboBox.h
QtxDialog.cxx
QtxDialog.h
QtxDockAction.cxx
QtxDockAction.h
QtxDockWidget.cxx
QtxDockWidget.h
QtxDoubleSpinBox.cxx
QtxDoubleSpinBox.h
QtxDoubleSpinSlider.cxx
QtxDoubleSpinSlider.h
QtxEvalExpr.cxx
QtxEvalExpr.h
QtxFontEdit.cxx
QtxFontEdit.h
QtxGridBox.cxx
QtxGridBox.h
QtxGroupBox.cxx
QtxGroupBox.h
QtxIntSpinBox.cxx
QtxIntSpinBox.h
QtxIntSpinSlider.cxx
QtxIntSpinSlider.h
QtxListAction.cxx
QtxListAction.h
QtxListBox.cxx
QtxListBox.h
QtxLogoMgr.cxx
QtxLogoMgr.h
QtxMainWindow.cxx
QtxMainWindow.h
QtxMap.h
QtxMenu.cxx
QtxMenu.h
QtxMRUAction.cxx
QtxMRUAction.h
QtxMultiAction.cxx
QtxMultiAction.h
QtxPagePrefMgr.cxx
QtxPagePrefMgr.h
QtxPathDialog.cxx
QtxPathDialog.h
QtxPathEdit.cxx
QtxPathEdit.h
QtxPathListEdit.cxx
QtxPathListEdit.h
QtxPopupMgr.cxx
QtxPopupMgr.h
QtxPreferenceMgr.cxx
QtxPreferenceMgr.h
QtxResourceMgr.cxx
QtxResourceMgr.h
QtxRubberBand.cxx
QtxRubberBand.h
QtxSearchTool.cxx
QtxSearchTool.h
QtxShortcutEdit.cxx
QtxShortcutEdit.h
QtxSlider.cxx
QtxSlider.h
QtxSplash.cxx
QtxSplash.h
QtxTable.cxx
QtxTable.h
QtxToolBar.cxx
QtxToolBar.h
QtxToolButton.cxx
QtxToolButton.h
QtxToolTip.cxx
QtxToolTip.h
QtxTranslator.cxx
QtxTranslator.h
QtxTreeView.cxx
QtxTreeView.h
QtxValidator.cxx
QtxValidator.h
QtxWebBrowser.cxx
QtxWebBrowser.h
QtxWorkspace.cxx
QtxWorkspace.h
QtxWorkspaceAction.cxx
QtxWorkspaceAction.h
QtxWorkstack.cxx
QtxWorkstack.h
QtxWorkstackAction.cxx
QtxWorkstackAction.h
QxScene
SALOME_PY
SALOME_PYQT
SALOME_SWIG
SalomeApp
Session
SOCC
SPlot2d
STD
Style
SUIT
SUITApp
SVTK
TOOLSGUI
TreeData
ViewerData
ViewerTools
VTKViewer
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
QtxBackgroundTool.h
Go to the documentation of this file.
1
// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2
//
3
// This library is free software; you can redistribute it and/or
4
// modify it under the terms of the GNU Lesser General Public
5
// License as published by the Free Software Foundation; either
6
// version 2.1 of the License, or (at your option) any later version.
7
//
8
// This library is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
// Lesser General Public License for more details.
12
//
13
// You should have received a copy of the GNU Lesser General Public
14
// License along with this library; if not, write to the Free Software
15
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
//
17
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
//
19
20
// File: QtxBackgroundTool.h
21
// Author: Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
22
23
#ifndef QTXBACKGROUNDTOOL_H
24
#define QTXBACKGROUNDTOOL_H
25
26
#include "
Qtx.h
"
27
#include "
QtxDialog.h
"
28
29
#include <QWidget>
30
#include <QMap>
31
32
class
QCheckBox;
33
class
QComboBox
;
34
class
QStackedWidget;
35
class
QLineEdit
;
36
class
QPushButton;
37
class
QtxColorButton
;
38
39
class
QTX_EXPORT
QtxBackgroundTool
:
public
QWidget
40
{
41
enum
{ Color, Gradient };
42
enum
{
TypeRole
= Qt::UserRole,
IdRole
};
43
44
Q_OBJECT
45
46
public
:
47
QtxBackgroundTool
(
QWidget
* = 0 );
48
QtxBackgroundTool
(
Qt::Orientation
,
QWidget
* = 0 );
49
virtual
~
QtxBackgroundTool
();
50
51
Qtx::BackgroundData
data()
const
;
52
void
setData(
const
Qtx::BackgroundData
& );
53
54
void
gradients( QStringList&,
QIntList
& )
const
;
55
void
setGradients(
const
QStringList&,
const
QIntList
& =
QIntList
() );
56
57
bool
isModeAllowed(
Qtx::BackgroundMode
)
const
;
58
void
setModeAllowed(
Qtx::BackgroundMode
,
bool
=
true
);
59
60
bool
isTextureModeAllowed(
Qtx::TextureMode
)
const
;
61
void
setTextureModeAllowed(
Qtx::TextureMode
,
bool
=
true
);
62
63
bool
isTextureAllowed()
const
;
64
void
setTextureAllowed(
bool
=
true
);
65
66
QString imageFormats()
const
;
67
void
setImageFormats(
const
QString& );
68
69
Qt::Orientation
orientation()
const
;
70
void
setOrientation(
Qt::Orientation
);
71
72
private
:
73
void
init(
Qt::Orientation
);
74
void
internalUpdate();
75
76
private
slots:
77
void
updateState();
78
void
browse();
79
80
private
:
81
QComboBox
*
myModeCombo
;
82
QStackedWidget*
myCContainer
;
83
QWidget
*
myTContainer
;
84
QCheckBox*
myTextureCheck
;
85
QLineEdit
*
myFileName
;
86
QPushButton*
myBrowseBtn
;
87
QComboBox
*
myTextureMode
;
88
QtxColorButton
*
myFirstColor
;
89
QtxColorButton
*
mySecondColor
;
90
QStringList
myGradients
;
91
QIntList
myGradientsIds
;
92
bool
myTextureAllowed
;
93
QMap<int, bool>
myTypesAllowed
;
94
QMap<int, bool>
myTextureTypesAllowed
;
95
QString
myImageFormats
;
96
int
myLastGradient
;
97
};
98
99
class
QTX_EXPORT
QtxBackgroundDialog
:
public
QtxDialog
100
{
101
Q_OBJECT
102
103
public
:
104
QtxBackgroundDialog
(
QWidget
* = 0 );
105
QtxBackgroundDialog
(
const
Qtx::BackgroundData
&,
QWidget
* = 0 );
106
virtual
~
QtxBackgroundDialog
();
107
108
void
setData(
const
Qtx::BackgroundData
& );
109
Qtx::BackgroundData
data()
const
;
110
111
static
Qtx::BackgroundData
getBackground(
const
Qtx::BackgroundData
& =
Qtx::BackgroundData
(),
112
QWidget
* = 0,
113
bool
=
true
,
bool
=
true
,
bool
=
true
,
bool
=
true
,
114
const
QStringList& = QStringList(),
115
const
QIntList
& =
QIntList
(),
116
const
QString& = QString() );
117
static
Qtx::BackgroundData
getBackground(
const
Qtx::BackgroundData
&,
118
QWidget
*,
119
const
QIntList
&,
120
bool
=
true
,
bool
=
true
,
bool
=
true
,
bool
=
true
,
121
const
QStringList& = QStringList(),
122
const
QIntList
& =
QIntList
(),
123
const
QString& = QString() );
124
125
126
void
setGradients(
const
QStringList&,
const
QIntList
& =
QIntList
() );
127
void
setModeAllowed(
Qtx::BackgroundMode
,
bool
=
true
);
128
void
setTextureAllowed(
bool
=
true
);
129
void
setTextureModeAllowed(
Qtx::TextureMode
,
bool
=
true
);
130
void
setImageFormats(
const
QString& );
131
132
private
:
133
void
init();
134
135
private
:
136
QtxBackgroundTool
*
myTool
;
137
};
138
139
#endif // QTXBACKGROUNDTOOL_H
src
Qtx
QtxBackgroundTool.h
Copyright © 2007-2017 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS