X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fprop%2Fbool.h;fp=pv%2Fprop%2Fbool.h;h=62e5ca36b6425ee1f91f9ff34afe6d1504b9fe2b;hp=0000000000000000000000000000000000000000;hb=de1d99bbe58f825e30048baa48a9439c01686f10;hpb=4d5d5d6aeb7d936fb6b939f6c6531b3f054dac1f diff --git a/pv/prop/bool.h b/pv/prop/bool.h new file mode 100644 index 00000000..62e5ca36 --- /dev/null +++ b/pv/prop/bool.h @@ -0,0 +1,48 @@ +/* + * This file is part of the PulseView project. + * + * Copyright (C) 2013 Joel Holdsworth + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef PULSEVIEW_PV_PROP_BOOL_H +#define PULSEVIEW_PV_PROP_BOOL_H + +#include "property.h" + +class QCheckBox; + +namespace pv { +namespace prop { + +class Bool : public Property +{ +public: + Bool(QString name, Getter getter, Setter setter); + + QWidget* get_widget(QWidget *parent); + bool labeled_widget() const; + + void commit(); + +private: + QCheckBox *_check_box; +}; + +} // prop +} // pv + +#endif // PULSEVIEW_PV_PROP_BOOL_H