Version: 9.16.0
SUIT_ViewWindow.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// SUIT_ViewWindow.h: interface for the SUIT_ViewWindow class.
24//
25#ifndef SUIT_VIEWWINDOW_H
26#define SUIT_VIEWWINDOW_H
27
28#include "SUIT.h"
30
31#include <QMainWindow>
32#include <QList>
33#include <QMap>
34
35class SUIT_Desktop;
38class QtxMultiAction;
39class QImage;
40
42{
43 Q_OBJECT
44
45public:
46
48 virtual ~SUIT_ViewWindow();
49
50 virtual void setViewManager( SUIT_ViewManager* );
51 SUIT_ViewManager* getViewManager() const;
52
53 bool event(QEvent*);
54
55 virtual QImage dumpView();
56 bool dumpViewToFormat( const QString& fileName, const QString& format );
57
58 bool onAccelAction( int );
59
60 bool closable() const;
61 bool setClosable( const bool );
62
63 virtual QString getVisualParameters();
64 virtual void setVisualParameters( const QString& parameters );
65
66 void setDestructiveClose( const bool );
67
68 int getId() const;
69
70 QtxActionToolMgr* toolMgr() const;
71
72 virtual void setDropDownButtons( bool );
73 bool dropDownButtons() const;
74
75 virtual void enableAutoRotation( const bool );
76 virtual bool isAutoRotationEnabled() const;
77
78 virtual SUIT_CameraProperties cameraProperties();
79
80public slots:
81 virtual void onDumpView();
82 void setVisible( bool );
83
84signals:
87 void mousePressed( SUIT_ViewWindow*, QMouseEvent* );
88 void mouseReleased( SUIT_ViewWindow*, QMouseEvent* );
89 void mouseDoubleClicked( SUIT_ViewWindow*, QMouseEvent* );
90 void mouseMoving( SUIT_ViewWindow*, QMouseEvent* );
91 void wheeling( SUIT_ViewWindow*, QWheelEvent* );
92 void keyPressed( SUIT_ViewWindow*, QKeyEvent* );
93 void keyReleased( SUIT_ViewWindow*, QKeyEvent* );
94 void contextMenuRequested( QContextMenuEvent *e );
96 void vpStartRotate( int, int, qint64 );
97 void vpRotate( int, int, qint64 );
98 void vpEndRotate( int, int, qint64 );
99
100protected:
101 void closeEvent( QCloseEvent* );
102 virtual void contextMenuEvent( QContextMenuEvent* );
103 virtual QString filter() const;
104 virtual bool action( const int );
105 virtual bool dumpViewToFormat( const QImage&, const QString& fileName, const QString& format );
106
107 virtual QAction* synchronizeAction();
108 static void synchronizeView( SUIT_ViewWindow* viewWindow, int id );
109
112
113protected slots:
114 void updateSyncViews();
115 void onSynchronizeView(bool);
116 virtual void synchronize( SUIT_ViewWindow* );
117 void emitViewModified();
118
119private:
120 typedef QMap< int, QList<QtxMultiAction*> > ActionsMap;
121
127};
128
129#endif // SUIT_VIEWWINDOW_H
#define SUIT_EXPORT
Definition: SUIT.h:36
TrgItem synchronize(const SrcItem &, const TrgItem &, const TreeData &)
Synchronize two data trees by recurive comparing of the corresponding items.
Definition: SUIT_TreeSync.h:118
Toolbar actions manager.
Definition: QtxActionToolMgr.h:44
The class QtxMultiAction implements modifiable action.
Definition: QtxMultiAction.h:31
Base class for Camera Properties.
Definition: SUIT_CameraProperties.h:29
Definition: SUIT_Desktop.h:47
Definition: SUIT_ViewManager.h:50
Definition: SUIT_ViewWindow.h:42
SUIT_ViewManager * myManager
Definition: SUIT_ViewWindow.h:111
void vpRotate(int, int, qint64)
void mouseDoubleClicked(SUIT_ViewWindow *, QMouseEvent *)
void vpEndRotate(int, int, qint64)
void tryClosing(SUIT_ViewWindow *)
ActionsMap myMultiActions
Definition: SUIT_ViewWindow.h:125
void viewModified(SUIT_ViewWindow *)
void vpStartRotate(int, int, qint64)
QAction * mySyncAction
Definition: SUIT_ViewWindow.h:126
QtxActionToolMgr * myToolMgr
Definition: SUIT_ViewWindow.h:122
void mousePressed(SUIT_ViewWindow *, QMouseEvent *)
void wheeling(SUIT_ViewWindow *, QWheelEvent *)
void keyReleased(SUIT_ViewWindow *, QKeyEvent *)
bool myIsDropDown
Definition: SUIT_ViewWindow.h:123
void keyPressed(SUIT_ViewWindow *, QKeyEvent *)
void closing(SUIT_ViewWindow *)
QMap< int, QList< QtxMultiAction * > > ActionsMap
Definition: SUIT_ViewWindow.h:120
bool myIsAutoRotation
Definition: SUIT_ViewWindow.h:124
void mouseMoving(SUIT_ViewWindow *, QMouseEvent *)
void mouseReleased(SUIT_ViewWindow *, QMouseEvent *)
void contextMenuRequested(QContextMenuEvent *e)
SUIT_Desktop * myDesktop
Definition: SUIT_ViewWindow.h:110