mirror of
https://github.com/mudita/MuditaOS.git
synced 2025-12-31 18:08:21 -05:00
- rename ServiceDB to ServiceDBCommon, - create separate ServiceDB for Pure and Bell, - move Pure-specific functionality from `ServiceDBCommon` to Pure `ServiceDB`
43 lines
853 B
C++
43 lines
853 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <gui/SwitchData.hpp>
|
|
#include <service-db/QuotesMessages.hpp>
|
|
|
|
namespace Quotes
|
|
{
|
|
class QuotesModel;
|
|
};
|
|
|
|
namespace gui
|
|
{
|
|
enum class QuoteAction
|
|
{
|
|
None,
|
|
Add,
|
|
Edit
|
|
};
|
|
|
|
class QuoteSwitchData : public gui::SwitchData
|
|
{
|
|
public:
|
|
QuoteSwitchData(QuoteAction action, Quotes::QuoteRecord quote = {}) : action(action), quote(std::move(quote))
|
|
{}
|
|
|
|
[[nodiscard]] auto getQuote() const
|
|
{
|
|
return quote;
|
|
}
|
|
[[nodiscard]] auto getAction() const
|
|
{
|
|
return action;
|
|
}
|
|
|
|
private:
|
|
QuoteAction action;
|
|
Quotes::QuoteRecord quote;
|
|
};
|
|
} // namespace gui
|