#pragma once
#ifndef BASEUITOOL_H
#define BASEUITOOL_H



#include <QFileDialog>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <memory>
#include <boost/filesystem.hpp>
#include <QStandardItemModel>
#include <QStringListModel>
#include <QMessageBox>
#include <QString>
#include <vector>
#include <iostream>
#include <vector>
#include <algorithm>
#include <complex>
#include <QMap>

#include <opencascade/TopoDS.hxx>
//-------------------- FEKO 基本参数 -------------------------
enum FEKOCoordinateSystem {
	None,
	Cartesian,
	Spherical
};


QString TopAbs_ShapeEnum2QString(TopAbs_ShapeEnum v);


// -------------------  UI 中常用函数---------------------------------------

int findStdVectordouble(const std::vector<double>& sortedVector, double target, double precision=1e-5);

int messageLog(QString logtext, int value) ;

QString writeUTF8StringFile(QString path, QString context);

bool isNumeric(const QString& str);

std::complex<double> QVariant2Complex(const QVariant& variant);

QVariant Complex2QVariant(const std::complex<double>& value);

QMap<QString, int> QStringVector2QMapIndex(std::vector<QString>& vlist);

int QAbstracmodel2CsvFile(QString filepath, const QAbstractItemModel* model);


// -----------------------------------------------------------------------------




#endif