Qt编程:ImagePlay 中的IPProcessPropertiesWidget

      IPProcessPropertiesWidget 是 ImagePlay 图像处理框架中负责动态生成和管理处理步骤(IPProcessStep)属性界面的核心组件。它根据不同类型的属性自动创建相应的编辑控件,并组织成统一的设置面板。

//#############################################################################
//
//  This file is part of ImagePlay.
//
//  ImagePlay is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  ImagePlay is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with ImagePlay.  If not, see <http://www.gnu.org/licenses/>.
//
//#############################################################################

#ifndef IPPROCESSPROPERTIESWIDGET_H
#define IPPROCESSPROPERTIESWIDGET_H

#include <QWidget>
#include <QFormLayout>
#include <QSpinBox>
#include <QLineEdit>
#include "PropertyWidgets/IPPropertyButtonInt.h"
#include "PropertyWidgets/IPPropertyButtonBool.h"
#include "PropertyWidgets/IPPropertySliderInt.h"
#include "PropertyWidgets/IPPropertySliderIntOdd.h"
#include "PropertyWidgets/IPPropertySliderIntEven.h"
#include "PropertyWidgets/IPPropertySpinnerInt.h"
#include "PropertyWidgets/IPPropertySliderDouble.h"
#include "PropertyWidgets/IPPropertyFileOpen.h"
#include "PropertyWidgets/IPPropertyFileSave.h"
#include "PropertyWidgets/IPPropertyColorRGB.h"
#include "PropertyWidgets/IPPropertyColorHSL.h"
#include "PropertyWidgets/IPPropertyColorHSV.h"
#include "PropertyWidgets/IPPropertyCheckbox.h"
#include "PropertyWidgets/IPPropertyKernelInt.h"
#include "PropertyWidgets/IPPropertyRadioInt.h"
#include "PropertyWidgets/IPPropertyCheckboxInt.h"
#include "PropertyWidgets/IPPropertyBinaryMorphologyInt.h"
#include "PropertyWidgets/IPPropertyBinaryMorphologyTristateInt.h"
#include "PropertyWidgets/IPPropertyGrayscaleMorphologyInt.h"
#include "PropertyWidgets/IPPropertyString.h"
#include "PropertyWidgets/IPPropertyFolder.h"
#include "PropertyWidgets/IPPropertyCombobox.h"
#include "PropertyWidgets/IPPropertyGroup.h"
#include "PropertyWidgets/IPPropertyPoint.h"
#include "PropertyWidgets/IPPropertyMatrixDouble.h"
#include "PropertyWidgets/IPPropertySerialPort.h"
#include "MainWindow.h"

#include <QDebug>

#include "IPL_processes.h"

//-----------------------------------------------------------------------------
//!IPProcessPropertiesWidget displays settings for IPLProcess
/*!
 * Displays GUI controls for all types of process properties.
 * The GUI and layout are built dynamically and destroyed when hidden.
 */
class IPProcessPropertiesWidget : public QWidget
{
    Q_OBJECT
public:
    explicit                    IPProcessPropertiesWidget   (QWidget *parent = 0);
                                ~IPProcessPropertiesWidget  ();
    void                        init                        (IPProcessStep* process);
    void                        closeSettings               ();
    void                        resetSettings               ();
    void                        addPropertyWidget           (QString label, QString description, IPPropertyWidget *widget);
    void                        setMainWindow               (MainWindow* mainWindow)                                            { _mainWindow = mainWindow; }
    MainWindow*                 mainWindow                  ();

private:
    static bool                 sortByPosition              (IPLProcessProperty* x, IPLProcessProperty* y);
    IPProcessStep*              _processStep;
    QList<IPPropertyWidget*>    _propertyWidgets;
    MainWindow*                 _mainWindow;

public slots:
    void                        showPropertyGroup           (QString);
};

#endif // IPPROCESSPROPERTIESWIDGET_H
//#############################################################################
//
//  This file is part of ImagePlay.
//
//  ImagePlay is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  ImagePlay is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with ImagePlay.  If not, see <http://www.gnu.org/licenses/>.
//
//#############################################################################

#include "IPProcessPropertiesWidget.h"

IPProcessPropertiesWidget::IPProcessPropertiesWidget(QWi
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值