142 lines
2.5 KiB
C
142 lines
2.5 KiB
C
|
#pragma once
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD>ջ<EFBFBD>ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㷨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༯
|
|||
|
* @file KJ135WBJYAlgWidgetComponet.h
|
|||
|
* @brief KJ135WBJYAlgWidgetComponet.h
|
|||
|
* @details
|
|||
|
* <EFBFBD>ջ<EFBFBD>ʮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㷨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>༯
|
|||
|
*/
|
|||
|
|
|||
|
#ifndef __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
|
|||
|
#define __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
|
|||
|
|
|||
|
#include "KJ135WBJYAlgInterfaceToolbox_global.h"
|
|||
|
#include <QObject>
|
|||
|
#include <QWidget>
|
|||
|
#include <QFileDialog>
|
|||
|
#include <QMessageBox>
|
|||
|
#include <QDebug>
|
|||
|
#include <QToolButton>
|
|||
|
#include <QLineEdit>
|
|||
|
#include <QLabel>
|
|||
|
#include <QComboBox>
|
|||
|
#include <QSpinBox>
|
|||
|
#include <QDoubleSpinBox>
|
|||
|
#include <QCheckBox>
|
|||
|
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD><C3B6>
|
|||
|
/// </summary>
|
|||
|
enum ComponentType{
|
|||
|
FileSelect = 0, // <20>ļ<EFBFBD>ѡ<EFBFBD><D1A1>
|
|||
|
FolderSelect, // <20>ļ<EFBFBD><C4BC><EFBFBD>ѡ<EFBFBD><D1A1>
|
|||
|
ComboxSelect,// ö<>ٶ<EFBFBD>ѡ
|
|||
|
IntInput,// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DoubleInput,// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
};
|
|||
|
|
|||
|
class FileSelectWidget : public QWidget
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
public:
|
|||
|
FileSelectWidget(ComponentType paramtype = ComponentType::FileSelect,QWidget* parent = nullptr);
|
|||
|
~FileSelectWidget();
|
|||
|
|
|||
|
void setFileName(const QString& fileName);
|
|||
|
QString getFileName() const;
|
|||
|
|
|||
|
void setLabelText(const QString& text);
|
|||
|
void setDataTypeStr(const QString& str);
|
|||
|
private slots:
|
|||
|
void onSelectFile();
|
|||
|
|
|||
|
signals:
|
|||
|
void fileSelected(const QString& fileName);
|
|||
|
private:
|
|||
|
QToolButton* m_pFileSelectButton;
|
|||
|
QLineEdit* m_pFileNameEdit;
|
|||
|
QLabel* m_pFileNameLabel;
|
|||
|
QString DataTypeStr;
|
|||
|
ComponentType paramType;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class ComboxSelectWidget : public QWidget
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
public:
|
|||
|
ComboxSelectWidget(QWidget* parent = nullptr);
|
|||
|
~ComboxSelectWidget();
|
|||
|
void setLabelText(const QString& text);
|
|||
|
void setDataTypeStr(const QString& str);
|
|||
|
void addItem(const QString& item);
|
|||
|
void setCurrentIndex(int index);
|
|||
|
void setCurrentText(const QString& text);
|
|||
|
QString getCurrentText() const;
|
|||
|
private:
|
|||
|
QComboBox* m_pCombox;
|
|||
|
QLabel* m_pComboxLabel;
|
|||
|
QString DataTypeStr;
|
|||
|
};
|
|||
|
|
|||
|
class IntInputWidget : public QWidget
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
public:
|
|||
|
IntInputWidget(QWidget* parent = nullptr);
|
|||
|
~IntInputWidget();
|
|||
|
void setLabelText(const QString& text);
|
|||
|
void setDataTypeStr(const QString& str);
|
|||
|
void setValue(int value);
|
|||
|
int getValue() const;
|
|||
|
private:
|
|||
|
QSpinBox* m_pIntInput;
|
|||
|
QLabel* m_pIntInputLabel;
|
|||
|
QString DataTypeStr;
|
|||
|
};
|
|||
|
|
|||
|
class DoubleInputWidget : public QWidget
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
public:
|
|||
|
DoubleInputWidget(QWidget* parent = nullptr);
|
|||
|
~DoubleInputWidget();
|
|||
|
void setLabelText(const QString& text);
|
|||
|
void setDataTypeStr(const QString& str);
|
|||
|
void setValue(double value);
|
|||
|
double getValue() const;
|
|||
|
private:
|
|||
|
QDoubleSpinBox* m_pDoubleInput;
|
|||
|
QLabel* m_pDoubleInputLabel;
|
|||
|
QString DataTypeStr;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#endif// __KJ135WBJYAlgInterfaceToolbox_GLOBAL_H__
|
|||
|
|