LAMPCAE/src/Settings/MainSetting.h

118 lines
3.0 KiB
C
Raw Normal View History

2023-05-08 06:32:41 +00:00
/**
* @file MainSetting.h
* @brief (.h)
* @author LAMPCAE(LAMPCAE@diso.cn)
2023-05-08 06:32:41 +00:00
* @version 2.5.0
* @date 2022-02-13 17:33
* @copyright Copyright (c) Since 2020 All rights reserved.
*
* ============================================================================
* Program: LAMPCAE
2023-05-08 06:32:41 +00:00
*
* Copyright (c) Since 2020 All rights reserved.
* See License or http://www.LAMPCAE.com/ for details.
2023-05-08 06:32:41 +00:00
*
* BSD 3-Clause License
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
* ==================================================================================
*/
#ifndef _MainSetting_H_
#define _MainSetting_H_
#include <QString>
#include <QStringList>
#include <QVector>
#include <QIcon>
#include <QMap>
class QSettings;
namespace Setting
{
class MainSetting
{
public:
MainSetting() = default;
~MainSetting() = default;
void writeINI(QSettings *seeting);
void readINI(QSettings *seeting);
void setWorkingDir(const QString &dir);
QString getWorkingDir() const;
void setLanguage(const QString &lang);
QString getLanguage();
//添加最新打开文件
void appendRecentFile(QString f);
QStringList getRencentFile();
//插件
void setPlugins(QStringList ps);
QStringList getPlugins();
void isShowUserGuidance(bool s);
bool isShowUserGuidance();
void isUseRibbon(bool on);
bool isUseRibbon();
void setLicensePath(const QString &path);
QString getLicensePath() const;
private:
QString _workingDir;
QString _language{"English"};
QStringList _recentFiles{};
QString _licensePath;
QStringList _plugins{};
2024-07-23 03:40:54 +00:00
QString _FEKOInstallPath;
2025-06-26 02:12:29 +00:00
QString _LastSelectPath;
public:
const QString &getLastSelectPath() const;
void setLastSelectPath(const QString &_LastSelectPath);
2024-07-23 03:40:54 +00:00
public:
const QString& getFekoInstallPath() const;
void setFekoInstallPath(const QString& fekoInstallPath);
const QString& getFekocadPath() const;
void setFekocadPath(const QString& fekocadPath);
const QString& getRunFekoPath() const;
void setRunFekoPath(const QString& runFekoPath);
private:
QString _FEKOCADPath;
QString _RunFEKOPath;
2025-06-26 02:12:29 +00:00
QString _preFEKOPath;
private: // RCSDB
QString _RCSDBFoler;
QString _RCSDBFilePath;
QString _RCSProjectPath;
public:
void setRcsdbFoler(const QString& rcsdbFoler);
void setRcsdbFilePath(const QString& rcsdbFilePath);
void setRcsProjectPath(const QString& rcsProjectPath);
const QString& getRcsdbFoler() const;
const QString& getRcsdbFilePath() const;
const QString& getRcsProjectPath() const;
2024-07-23 03:40:54 +00:00
public:
const QString& getPreFekoPath() const;
void setPreFekoPath(const QString& preFekoPath);
private:
2025-06-26 02:12:29 +00:00
2023-05-08 06:32:41 +00:00
bool _showUserGuidance{true};
bool _useRibbon{true};
};
}
#endif