Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue #1112 tab key doesn't work on the last field of left panels
[modules/shaper.git]
/
src
/
Events
/
Events_Loop.h
diff --git
a/src/Events/Events_Loop.h
b/src/Events/Events_Loop.h
index b8a628ff7d73a9050e6ab527f5b620d4661ea2ca..66ed3070d58e785f994854603de2b46bdb0a0a72 100644
(file)
--- a/
src/Events/Events_Loop.h
+++ b/
src/Events/Events_Loop.h
@@
-1,3
+1,5
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: Events_Loop.hxx
// Created: Thu Mar 13 2014
// Author: Mikhail PONIKAROV
// File: Events_Loop.hxx
// Created: Thu Mar 13 2014
// Author: Mikhail PONIKAROV
@@
-14,7
+16,7
@@
class Events_MessageGroup;
class Events_MessageGroup;
-/**\class Events_Lo
p
p
+/**\class Events_Lo
o
p
* \ingroup EventsLoop
* \brief Base class that manages the receiving and sending of all
* not Qt-events in the application.
* \ingroup EventsLoop
* \brief Base class that manages the receiving and sending of all
* not Qt-events in the application.
@@
-33,7
+35,7
@@
class Events_Loop
std::map<char*, Events_Listener*> myImmediateListeners;
/// map from event ID to groupped messages (accumulated on flush)
std::map<char*, Events_Listener*> myImmediateListeners;
/// map from event ID to groupped messages (accumulated on flush)
- std::map<char*,
boost
::shared_ptr<Events_Message> > myGroups;
+ std::map<char*,
std
::shared_ptr<Events_Message> > myGroups;
///< set of messages that are flushed right now, so they are not grouped
std::set<char*> myFlushed;
///< set of messages that are flushed right now, so they are not grouped
std::set<char*> myFlushed;
@@
-52,8
+54,9
@@
class Events_Loop
EVENTS_EXPORT static Events_ID eventByName(const char* theName);
//! Allows to send an event
EVENTS_EXPORT static Events_ID eventByName(const char* theName);
//! Allows to send an event
+ //! \param theMessage the enevt message to send
//! \param isGroup is true for grouping messages if possible
//! \param isGroup is true for grouping messages if possible
- EVENTS_EXPORT void send(const
boost
::shared_ptr<Events_Message>& theMessage, bool isGroup = true);
+ EVENTS_EXPORT void send(const
std
::shared_ptr<Events_Message>& theMessage, bool isGroup = true);
//! Registers (or adds if such listener is already registered) a listener
//! that will be called on the event and from the defined sender
//! Registers (or adds if such listener is already registered) a listener
//! that will be called on the event and from the defined sender
@@
-63,15
+66,25
@@
class Events_Loop
//! Initializes sending of a group-message by the given ID
EVENTS_EXPORT void flush(const Events_ID& theID);
//! Initializes sending of a group-message by the given ID
EVENTS_EXPORT void flush(const Events_ID& theID);
+ //! Removes messages with the given ID: they are not needed anymore (UPDATE on close)
+ EVENTS_EXPORT void eraseMessages(const Events_ID& theID);
+
//! Allows to disable flushes: needed in synchronization of document mechanism
//! (to synchronize all and only then flush create, update, etc in correct order)
//! Allows to disable flushes: needed in synchronization of document mechanism
//! (to synchronize all and only then flush create, update, etc in correct order)
- EVENTS_EXPORT void activateFlushes(const bool theActivate);
-
+ //! \param theActivate a state about flushe is active. If false, the flush is disabled
+ //! \return the previous active flush state
+ EVENTS_EXPORT bool activateFlushes(const bool theActivate);
+
//! Clears all collected messages
EVENTS_EXPORT void clear(const Events_ID& theID);
//! Enables flush without grouping for the given message
EVENTS_EXPORT void autoFlush(const Events_ID& theID, const bool theAuto = true);
//! Clears all collected messages
EVENTS_EXPORT void clear(const Events_ID& theID);
//! Enables flush without grouping for the given message
EVENTS_EXPORT void autoFlush(const Events_ID& theID, const bool theAuto = true);
+
+ //! Returns true if the evement is flushed right now
+ EVENTS_EXPORT bool isFlushed(const Events_ID& theID);
+ //! Sets the flag that the event is flished right now
+ EVENTS_EXPORT void setFlushed(const Events_ID& theID, const bool theValue);
};
#endif
};
#endif