Version: 9.16.0
QtxWorkstackAction.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// File: QtxWorkstackAction.h
24// Author: Sergey TELKOV
25//
26#ifndef QTXWORKSTACKACTION_H
27#define QTXWORKSTACKACTION_H
28
29#include "QtxActionSet.h"
30#include <QDialog>
31
32class QtxWorkstack;
33class QRadioButton;
34class QStackedLayout;
35class QListWidget;
36class QComboBox;
37class QLabel;
38class QToolButton;
39
40#ifdef WIN32
41#pragma warning( disable:4251 )
42#endif
43
45{
46 Q_OBJECT
47
48public:
50 enum { SplitVertical = 0x0001,
51 SplitHorizontal = 0x0002,
52 Windows = 0x0010,
53 Split = SplitVertical | SplitHorizontal,
54 Standard = Split | Windows };
55
57 virtual ~QtxWorkstackAction();
58
59 QtxWorkstack* workstack() const;
60 QAction* getArrangeViewsAction();
61
62 int menuActions() const;
63 void setMenuActions( const int );
64
65 QIcon icon( const int ) const;
66 QString text( const int ) const;
67 int accel( const int ) const;
68 QString statusTip( const int ) const;
69
70 void setIcon( const int, const QIcon& );
71 void setText( const int, const QString& );
72 void setStatusTip( const int, const QString& );
73
74 void perform( const int );
75
76private slots:
77 void onAboutToShow();
78 void onTriggered( int );
79
80protected:
81 virtual void addedTo( QWidget* );
82 virtual void removedFrom( QWidget* );
83
84private:
85 void updateContent();
86 void updateWindows();
87 void splitVertical();
88 void splitHorizontal();
89 void activateItem( const int );
90
91private:
95};
96
98
100{
101 Q_OBJECT
102
103 enum ViewMode{ XYZ, XY, XZ, YZ };
104
105public:
107 ~QtxSplitDlg();
108 int getSplitMode();
109 QList<int> getViewsMode();
110
111private :
112 QToolButton* createSplitButton( int, int );
113 void initialize();
114 void valid();
115
116 QStackedLayout* myStackedSplitLayout;
117 QRadioButton* myButton2Views;
118 QRadioButton* myButton3Views;
119 QRadioButton* myButton4Views;
120 QPushButton* myButtonApply;
121 QPushButton* myButtonPrevious;
122 QPushButton* myButtonNext;
126
129
134 QMap<QComboBox*, ViewMode> myMapComboBoxMode;
135 QMap<ViewMode, bool> myMapModeIsBusy;
136
137private slots:
138
139 void onChangeIcons();
140 void onSplitChanged(int);
141 void onComboBoxChanged(int);
142 void onPreviousViews();
143 void onNextViews();
144 void onSynchronize();
145 void onCloseViews();
146 void onStackViews();
147 void onApply();
148};
149
150#ifdef WIN32
151#pragma warning( default:4251 )
152#endif
153
154#endif
QtxSplitDlgMode
Definition: QtxWorkstackAction.h:97
@ CreateSubViews
Definition: QtxWorkstackAction.h:97
@ ArrangeViews
Definition: QtxWorkstackAction.h:97
#define QTX_EXPORT
Definition: Qtx.h:36
For more information see QT documentation.
An action class which is represented in the menu bar (or toolbar) as a group of items (which can be c...
Definition: QtxActionSet.h:35
virtual void addedTo(QWidget *)
Called when this action set is added to the menu bar (or toolbar).
Definition: QtxActionSet.cxx:254
virtual void removedFrom(QWidget *)
Called when this action set is removed from the menu bar (or toolbar).
Definition: QtxActionSet.cxx:265
Used for arranging views(menu item "Window->Arrange Views") and for creating sub-views of current vie...
Definition: QtxWorkstackAction.h:100
QPushButton * myButtonNext
Definition: QtxWorkstackAction.h:122
QRadioButton * myButton4Views
Definition: QtxWorkstackAction.h:119
QStackedLayout * myStackedSplitLayout
Definition: QtxWorkstackAction.h:116
QRadioButton * myButton3Views
Definition: QtxWorkstackAction.h:118
QtxWorkstack * myWorkstack
Definition: QtxWorkstackAction.h:127
bool myIsCloseViews
Definition: QtxWorkstackAction.h:133
int mySplitMode
Definition: QtxWorkstackAction.h:131
QMap< ViewMode, bool > myMapModeIsBusy
Definition: QtxWorkstackAction.h:135
QRadioButton * myButton2Views
Definition: QtxWorkstackAction.h:117
QPushButton * myButtonPrevious
Definition: QtxWorkstackAction.h:121
QList< QLabel * > myLabels
Definition: QtxWorkstackAction.h:123
QListWidget * myViewsList
Definition: QtxWorkstackAction.h:125
QMap< QComboBox *, ViewMode > myMapComboBoxMode
Definition: QtxWorkstackAction.h:134
QtxSplitDlgMode myDlgMode
Definition: QtxWorkstackAction.h:128
QList< QComboBox * > myComboBox
Definition: QtxWorkstackAction.h:124
ViewMode
Definition: QtxWorkstackAction.h:103
QPushButton * myButtonApply
Definition: QtxWorkstackAction.h:120
int myNBSelectedViews
Definition: QtxWorkstackAction.h:132
int myViewsNB
Definition: QtxWorkstackAction.h:130
Implements actions group for menu Windows with standard operations, like "Split vertical",...
Definition: QtxWorkstackAction.h:45
bool myWindowsFlag
"show child windows items" flag
Definition: QtxWorkstackAction.h:93
QtxWorkstack * myWorkstack
parent workstack
Definition: QtxWorkstackAction.h:92
QAction * myArrangeViewsAction
Definition: QtxWorkstackAction.h:94
Workstack widget.
Definition: QtxWorkstack.h:57
Definition: VTKViewer_ArcBuilder.h:60