Loading...
Searching...
No Matches
switchbuttonwidget.h
Go to the documentation of this file.
/**
* \file pappsomspp/widget/switchbuttonwidget/switchbuttonwidget.h
* \date 26/07/2021
* \author Thomas Renne
* \brief widget to transform a push button to a switch button
*/
/*******************************************************************************
* Copyright (c) 2021 Thomas Renne <thomas.renne@e.email>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ 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.
*
* PAPPSOms++ 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 PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Thomas Renne <thomas.renne@e.email> - initial API and
*implementation
******************************************************************************/
#pragma once
#include <QPushButton>
#include "pappsomspp/export-import-config.h"
namespace pappso
{
class PMSPP_LIB_DECL SwitchWidget : public QPushButton
{
Q_OBJECT
public:
SwitchWidget(QWidget *parent = 0);
~SwitchWidget();
/** @brief get the state of the switch button (on/off)
* @return boolean true or false
* */
bool getSwitchValue();
/** @brief set the state of the switch button (on/off)
* @param switch_value boolean true or false
* */
void setSwitchValue(bool switch_value);
private slots:
void updateSwitchValue();
private:
bool m_switchButtonValue = false;
};
} // namespace pappso
pappso::SwitchWidget::updateSwitchValue
void updateSwitchValue()
Definition switchbuttonwidget.cpp:70
pappso::SwitchWidget::setSwitchValue
void setSwitchValue(bool switch_value)
set the state of the switch button (on/off)
Definition switchbuttonwidget.cpp:49
pappso::SwitchWidget::getSwitchValue
bool getSwitchValue()
get the state of the switch button (on/off)
Definition switchbuttonwidget.cpp:64
pappso::SwitchWidget::m_switchButtonValue
bool m_switchButtonValue
Definition switchbuttonwidget.h:61
pappso::SwitchWidget::SwitchWidget
SwitchWidget(QWidget *parent=0)
Definition switchbuttonwidget.cpp:34
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39