2022-04-19 19:23:30 -04:00
|
|
|
//! @file
|
|
|
|
//! @brief QP/C++ port to Qt
|
|
|
|
//! @cond
|
|
|
|
//============================================================================
|
|
|
|
//! Last updated for version 6.9.1 / Qt 5.x
|
|
|
|
//! Last updated on 2020-10-05
|
|
|
|
//!
|
|
|
|
//! Q u a n t u m L e a P s
|
|
|
|
//! ------------------------
|
|
|
|
//! Modern Embedded Software
|
|
|
|
//!
|
|
|
|
//! Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
|
|
|
|
//!
|
|
|
|
//! This program is open source software: you can redistribute it and/or
|
|
|
|
//! modify it under the terms of the GNU General Public License as published
|
|
|
|
//! by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
//! (at your option) any later version.
|
|
|
|
//!
|
|
|
|
//! Alternatively, this program may be distributed and modified under the
|
|
|
|
//! terms of Quantum Leaps commercial licenses, which expressly supersede
|
|
|
|
//! the GNU General Public License and are specifically designed for
|
|
|
|
//! licensees interested in retaining the proprietary status of their code.
|
|
|
|
//!
|
|
|
|
//! This program 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 General Public License for more details.
|
|
|
|
//!
|
|
|
|
//! You should have received a copy of the GNU General Public License
|
|
|
|
//! along with this program. If not, see <www.gnu.org/licenses>.
|
|
|
|
//!
|
|
|
|
//! Contact information:
|
|
|
|
//! <www.state-machine.com/licensing>
|
|
|
|
//! <info@state-machine.com>
|
|
|
|
//============================================================================
|
|
|
|
//! @endcond
|
2015-05-14 16:05:04 -04:00
|
|
|
|
2019-10-27 12:26:31 -04:00
|
|
|
#ifndef GUIACTIVE_HPP
|
|
|
|
#define GUIACTIVE_HPP
|
2013-10-10 20:01:51 -04:00
|
|
|
|
|
|
|
namespace QP {
|
|
|
|
|
|
|
|
//............................................................................
|
2016-12-01 10:31:49 -05:00
|
|
|
class GuiQActive : public QActive {
|
2013-10-10 20:01:51 -04:00
|
|
|
public:
|
2016-12-01 10:31:49 -05:00
|
|
|
GuiQActive(QStateHandler const initial) : QActive(initial) {}
|
2020-03-17 21:33:58 -04:00
|
|
|
void start(std::uint_fast8_t const prio,
|
|
|
|
QEvt const * * const qSto, std::uint_fast16_t const qLen,
|
|
|
|
void * const stkSto, std::uint_fast16_t const stkSize,
|
|
|
|
void const * const par) override;
|
2013-10-10 20:01:51 -04:00
|
|
|
#ifndef Q_SPY
|
2020-04-06 15:29:56 -04:00
|
|
|
bool post_(QEvt const * const e,
|
|
|
|
std::uint_fast16_t const margin) noexcept override;
|
2013-10-10 20:01:51 -04:00
|
|
|
#else
|
2020-03-17 21:33:58 -04:00
|
|
|
bool post_(QEvt const * const e, std::uint_fast16_t const margin,
|
2020-10-04 15:01:19 -04:00
|
|
|
void const * const sender) noexcept override;
|
2014-04-21 21:48:04 -04:00
|
|
|
#endif // Q_SPY
|
2020-04-06 15:29:56 -04:00
|
|
|
void postLIFO(QEvt const * const e) noexcept override;
|
2013-10-10 20:01:51 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
//............................................................................
|
2016-12-01 10:31:49 -05:00
|
|
|
class GuiQMActive : public QMActive {
|
2013-10-10 20:01:51 -04:00
|
|
|
public:
|
2016-12-01 10:31:49 -05:00
|
|
|
GuiQMActive(QStateHandler const initial) : QMActive(initial) {}
|
2020-03-17 21:33:58 -04:00
|
|
|
void start(std::uint_fast8_t const prio,
|
|
|
|
QEvt const * * const qSto, std::uint_fast16_t const qLen,
|
|
|
|
void * const stkSto, std::uint_fast16_t const stkSize,
|
|
|
|
void const * const par) override;
|
2013-10-10 20:01:51 -04:00
|
|
|
#ifndef Q_SPY
|
2020-04-06 15:29:56 -04:00
|
|
|
bool post_(QEvt const * const e,
|
|
|
|
std::uint_fast16_t const margin) noexcept override;
|
2013-10-10 20:01:51 -04:00
|
|
|
#else
|
2020-03-17 21:33:58 -04:00
|
|
|
bool post_(QEvt const * const e, std::uint_fast16_t const margin,
|
2020-10-05 11:34:50 -04:00
|
|
|
void const * const sender) noexcept override;
|
2014-04-21 21:48:04 -04:00
|
|
|
#endif // Q_SPY
|
2020-04-06 15:29:56 -04:00
|
|
|
void postLIFO(QEvt const * const e) noexcept override;
|
2013-10-10 20:01:51 -04:00
|
|
|
};
|
|
|
|
|
2014-04-21 21:48:04 -04:00
|
|
|
} // namespace QP
|
2013-10-10 20:01:51 -04:00
|
|
|
|
2019-10-27 12:26:31 -04:00
|
|
|
#endif // GUIACTIVE_HPP
|