1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
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.
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.
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
17 // See http://www.salome-platform.org/
19 #ifndef SUIT_POPUPCLIENT_H
20 #define SUIT_POPUPCLIENT_H
27 class QContextMenuEvent;
29 /*!\class SUIT_PopupClient
30 * Descr: Base class for instances which creates popup menu on QContextMenuEvent
32 class SUIT_EXPORT SUIT_PopupClient
41 bool connectPopupRequest( QObject* reciever, const char* slot );
42 bool disconnectPopupRequest( QObject* reciever, const char* slot );
44 virtual QString popupClientType() const = 0;
45 virtual void contextMenuPopup( QPopupMenu* ) {}
48 void contextMenuRequest( QContextMenuEvent* e );
54 /*! Class: SUIT_PopupClient::Signal [internal] \n
55 * Descr: invoke signal which is connected to reciever in SUIT_PopupClient
57 class SUIT_PopupClient::Signal : public QObject
65 void sendSignal( SUIT_PopupClient*, QContextMenuEvent* );
68 void contextMenuRequest( SUIT_PopupClient*, QContextMenuEvent* );