qpcpp/ports/qt/guiactive.hpp

64 lines
2.5 KiB
C++
Raw Normal View History

//============================================================================
2022-08-11 15:36:19 -04:00
// Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
2022-08-28 22:12:27 -04:00
//! @date Last updated on: 2022-08-25
//! @version Last updated for: @ref qpcpp_7_1_0
2022-08-11 15:36:19 -04:00
//!
//! @file
//! @brief QP/C++ port to Qt
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) {}
2022-08-28 22:12:27 -04:00
void start(QPrioSpec const prioSpec,
2020-03-17 21:33:58 -04:00
QEvt const * * const qSto, std::uint_fast16_t const qLen,
void * const stkSto, std::uint_fast16_t const stkSize,
void const * const par) override;
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;
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) {}
2022-08-28 22:12:27 -04:00
void start(QPrioSpec const prioSpec,
2020-03-17 21:33:58 -04:00
QEvt const * * const qSto, std::uint_fast16_t const qLen,
void * const stkSto, std::uint_fast16_t const stkSize,
void const * const par) override;
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;
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