File indexing completed on 2024-05-12 04:52:51
0001 /* 0002 SPDX-FileCopyrightText: 2016 Nicolas Carion 0003 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 0006 #pragma once 0007 0008 #include "abstractparamwidget.hpp" 0009 #include "ui_boolparamwidget_ui.h" 0010 #include <QWidget> 0011 0012 /** @brief This class represents a parameter that requires 0013 the user to choose tick a checkbox 0014 */ 0015 class BoolParamWidget : public AbstractParamWidget, public Ui::BoolParamWidget_UI 0016 { 0017 Q_OBJECT 0018 public: 0019 /** @brief Constructor for the widgetComment 0020 @param name String containing the name of the parameter 0021 @param comment Optional string containing the comment associated to the parameter 0022 @param checked Boolean indicating whether the checkbox should initially be checked 0023 @param parent Parent widget 0024 */ 0025 BoolParamWidget(std::shared_ptr<AssetParameterModel> model, QModelIndex index, QWidget *parent); 0026 0027 /** @brief Returns the current value of the parameter 0028 */ 0029 bool getValue(); 0030 0031 public Q_SLOTS: 0032 /** @brief Toggle the comments on or off 0033 */ 0034 void slotShowComment(bool show) override; 0035 0036 /** @brief refresh the properties to reflect changes in the model 0037 */ 0038 void slotRefresh() override; 0039 };