X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_QtEvents.h;h=985a43e9a7095de66d4c5d325c8a6ec96c743c6c;hb=227323fca46747847e850a1d6e3bdaac882e209e;hp=5c389fade4036fe81a0926b68b98a6fc50900027;hpb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_QtEvents.h b/src/XGUI/XGUI_QtEvents.h index 5c389fade..985a43e9a 100644 --- a/src/XGUI/XGUI_QtEvents.h +++ b/src/XGUI/XGUI_QtEvents.h @@ -1,9 +1,21 @@ -/* - * XGUI_QEvents.h - * - * Created on: Sep 12, 2014 - * Author: sbh - */ +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef XGUI_QTEVENTS_H_ #define XGUI_QTEVENTS_H_ @@ -16,24 +28,35 @@ #include #include +/** +* \ingroup GUI +* Class of event to send application events in multi thread environment +*/ class XGUI_EXPORT PostponeMessageQtEvent : public QEvent { public: + /// An event type static QEvent::Type PostponeMessageQtEventType; + /// Constructor + /// \param theMessage an event message to send PostponeMessageQtEvent(const std::shared_ptr& theMessage) : QEvent(PostponeMessageQtEventType), myMessage(theMessage) { } + + /// Returns type of the event static QEvent::Type type() { return PostponeMessageQtEventType; } + /// Returns current messasge std::shared_ptr postponedMessage(); private: + /// Message std::shared_ptr myMessage; };