X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fbinding%2Fdevice.hpp;h=aceac8cc6f2fc3346f1c36de9c58c5b6b58d081b;hp=9d879ee58186680a01301e59c1f6e406e8d627cf;hb=7671200bd71de8cdd922b41b025ea18de6422345;hpb=49c62417b6b306607048b07f86b73f127e3084a3 diff --git a/pv/binding/device.hpp b/pv/binding/device.hpp index 9d879ee5..aceac8cc 100644 --- a/pv/binding/device.hpp +++ b/pv/binding/device.hpp @@ -14,13 +14,14 @@ * 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 + * along with this program; if not, see . */ #ifndef PULSEVIEW_PV_BINDING_DEVICE_HPP #define PULSEVIEW_PV_BINDING_DEVICE_HPP +#include + #include #include @@ -32,6 +33,11 @@ #include +using std::function; +using std::pair; +using std::set; +using std::shared_ptr; + namespace pv { namespace binding { @@ -41,21 +47,21 @@ class Device : public QObject, public Binding Q_OBJECT public: - Device(std::shared_ptr configurable); + Device(shared_ptr configurable); Q_SIGNALS: void config_changed(); private: - void bind_bool(const QString &name, + void bind_bool(const QString &name, const QString &desc, prop::Property::Getter getter, prop::Property::Setter setter); - void bind_enum(const QString &name, + void bind_enum(const QString &name, const QString &desc, const sigrok::ConfigKey *key, - std::set capabilities, + set capabilities, prop::Property::Getter getter, prop::Property::Setter setter, - std::function printer = print_gvariant); - void bind_int(const QString &name, QString suffix, - boost::optional< std::pair > range, + function printer = print_gvariant); + void bind_int(const QString &name, const QString &desc, QString suffix, + boost::optional< pair > range, prop::Property::Getter getter, prop::Property::Setter setter); static QString print_timebase(Glib::VariantBase gvar); @@ -64,10 +70,10 @@ private: static QString print_probe_factor(Glib::VariantBase gvar); protected: - std::shared_ptr configurable_; + shared_ptr configurable_; }; -} // binding -} // pv +} // namespace binding +} // namespace pv #endif // PULSEVIEW_PV_BINDING_DEVICE_HPP