55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
|
|
#pragma once
|
|||
|
|
#ifndef __WIDGETSETTINGCLASS__H__
|
|||
|
|
#define __WIDGETSETTINGCLASS__H__
|
|||
|
|
#include <QCoreApplication>
|
|||
|
|
#include <QSettings>
|
|||
|
|
#include <QDebug>
|
|||
|
|
#include <QString>
|
|||
|
|
#include <QObject>
|
|||
|
|
#include <QMutex>
|
|||
|
|
#include <QScopedPointer>
|
|||
|
|
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD><CAB2><EFBFBD>
|
|||
|
|
#define RASTERFILEFILTER u8"<22><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> (*.*);;TIF (*.tif);;TIFF (*.tiff);;bin (*.bin);;dat (*.dat);;"
|
|||
|
|
#define LAMPWINDDATAFILEFILTER u8"<22><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD> (*.*);;<3B>糡<EFBFBD>ļ<EFBFBD> (*.lampwind);;TIF (*.tif);;TIFF (*.tiff);;bin (*.bin);;dat (*.dat);;"
|
|||
|
|
|
|||
|
|
|
|||
|
|
class WidgetSettingClass : public QObject
|
|||
|
|
{
|
|||
|
|
Q_OBJECT
|
|||
|
|
public:
|
|||
|
|
// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ľ<EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
|
|||
|
|
static WidgetSettingClass& instance();
|
|||
|
|
|
|||
|
|
|
|||
|
|
// <20><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|||
|
|
WidgetSettingClass(const WidgetSettingClass&) = delete;
|
|||
|
|
WidgetSettingClass& operator=(const WidgetSettingClass&) = delete;
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
static QScopedPointer<WidgetSettingClass> m_instance;
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
// ˽<>й<EFBFBD><D0B9>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
explicit WidgetSettingClass(QObject* parent = nullptr);
|
|||
|
|
~WidgetSettingClass();
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
QSettings* m_settings;
|
|||
|
|
QString lastFileDialogPath;
|
|||
|
|
QString iniPath;
|
|||
|
|
public:
|
|||
|
|
QString getWindTool_nc2WindDataToolPath();
|
|||
|
|
QString getWindTool_PythonEnvPath();
|
|||
|
|
QString getExeApplicationPath();
|
|||
|
|
QString getExeDirectionApplicationPath();
|
|||
|
|
QString getWindReaddLLApplicationPath();
|
|||
|
|
QString getLastFileDialogPath();
|
|||
|
|
void setLastFileDialogPath(QString path);
|
|||
|
|
QString getTempFolder();
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif
|