Logo

Cake Planner

Backend

config_model.cpp

File Header Information

FieldValue
SPDX CommentConfiguration Model implementation
SPDX TypeSOURCE
ContributorZHENG Robert
License IDMIT
Fileconfig_model.cpp
DescriptionConfiguration Model implementation
Version0.15.0
Date2026-01-24
AuthorZHENG Robert (robert@hase-zheng.net)
CopyrightCopyright (c) 2026 ZHENG Robert
LicenseMIT

Table of Contents

API Documentation

namespace rz

rz namespace.


namespace model

model namespace.


ConfigModel::ConfigModel() = default

Constructs the ConfigModel.


void ConfigModel::loadEnv(const std::string& path)

Load environment variables from a file.

ParameterDescription
pathThe path to the .env file.

QString ConfigModel::getSmtpServer() const

Gets the SMTP server address.

Returns: The SMTP server.


QString ConfigModel::getSmtpUsername() const

Gets the SMTP username.

Returns: The SMTP username.


QString ConfigModel::getSmtpPassword() const

Gets the SMTP password.

Returns: The SMTP password.


QString ConfigModel::getSmtpFrom() const

Gets the SMTP Sender email address.

Returns: The SMTP from address.


int ConfigModel::getSmtpPort() const

Gets the SMTP port.

Returns: The SMTP port.


bool ConfigModel::getSmtpStartTls() const

Checks if STARTTLS is enabled for SMTP.

Returns: True if STARTTLS is enabled, false otherwise.


QString ConfigModel::getWatchDir() const

Gets the directory being watched for changes.

Returns: The watch directory.