|
Last change
on this file since 7912 was
7855,
checked in by bensch, 19 years ago
|
|
qtgui: cleanup as patrick sugested
|
|
File size:
973 bytes
|
| Line | |
|---|
| 1 | /*! |
|---|
| 2 | * @file signal_connector.h |
|---|
| 3 | * @brief Definition of a SignalConnector class |
|---|
| 4 | */ |
|---|
| 5 | |
|---|
| 6 | #ifndef _SIGNAL_CONNECTOR_H |
|---|
| 7 | #define _SIGNAL_CONNECTOR_H |
|---|
| 8 | |
|---|
| 9 | #include "executor/executor.h" |
|---|
| 10 | |
|---|
| 11 | namespace OrxGui |
|---|
| 12 | { |
|---|
| 13 | //! A class for Conncting Signals to Objects, inside of the GUI |
|---|
| 14 | class SignalConnector |
|---|
| 15 | { |
|---|
| 16 | public: |
|---|
| 17 | SignalConnector(); |
|---|
| 18 | SignalConnector(BaseObject* object, const Executor* exec); |
|---|
| 19 | SignalConnector(const SignalConnector& signalConnector); |
|---|
| 20 | ~SignalConnector(); |
|---|
| 21 | |
|---|
| 22 | SignalConnector& operator=(const SignalConnector& signalConnector); |
|---|
| 23 | |
|---|
| 24 | void operator()(const std::string& parameters) const; |
|---|
| 25 | void execute(const std::string& parameters) const { (*this)(parameters); }; |
|---|
| 26 | |
|---|
| 27 | bool isClean() const { return (this->object == NULL || this->exec == NULL); } |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | private: |
|---|
| 31 | BaseObject* object; //!< The object to call. |
|---|
| 32 | const Executor* exec; //!< The Executor, that will be called, on object. |
|---|
| 33 | }; |
|---|
| 34 | } |
|---|
| 35 | #endif /* _SIGNAL_CONNECTOR_H */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.