Version: 9.16.0
QtxWorkspaceAction.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: QtxWorkspaceAction.h
24// Author: Sergey TELKOV
25//
26#ifndef QTXWORKSPACEACTION_H
27#define QTXWORKSPACEACTION_H
28
29#include "QtxActionSet.h"
30
31class QtxWorkspace;
32
33#ifdef WIN32
34#pragma warning( disable:4251 )
35#endif
36
38{
39 Q_OBJECT
40
41public:
43 enum { Cascade = 0x0001,
44 Tile = 0x0002,
45 VTile = 0x0004,
46 HTile = 0x0008,
47 Windows = 0x0010,
48 Standard = Cascade | Tile | Windows,
49 Operations = Cascade | Tile | VTile | HTile,
50 All = Standard | HTile | VTile };
51
52public:
54 virtual ~QtxWorkspaceAction();
55
56 QtxWorkspace* workspace() const;
57
58 int menuActions() const;
59 void setMenuActions( const int );
60
61 QIcon icon( const int ) const;
62 QString text( const int ) const;
63 int accel( const int ) const;
64 QString statusTip( const int ) const;
65
66 void setIcon( const int, const QIcon& );
67 void setText( const int, const QString& );
68 void setStatusTip( const int, const QString& );
69
70 void perform( const int );
71
72public slots:
73 void tile();
74 void cascade();
75 void tileVertical();
76 void tileHorizontal();
77
78private slots:
79 void onAboutToShow();
80 void onTriggered( int );
81
82protected:
83 virtual void addedTo( QWidget* );
84 virtual void removedFrom( QWidget* );
85
86private:
87 void updateContent();
88 void updateWindows();
89 void activateItem( const int );
90
91private:
94};
95
96#ifdef WIN32
97#pragma warning( default:4251 )
98#endif
99
100#endif
#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
Implements actions group for menu Windows with standard operations, like "Cascade",...
Definition: QtxWorkspaceAction.h:38
QtxWorkspace * myWorkspace
parent workspace
Definition: QtxWorkspaceAction.h:92
bool myWindowsFlag
"show child windows items" flag
Definition: QtxWorkspaceAction.h:93
A workspace widget which can be used in the MDI application as top-level widget in the application ma...
Definition: QtxWorkspace.h:35