X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fprop%2Fproperty.hpp;h=322c608490c775803eeebe00b189a1140c3ba3c1;hb=669686c18ca6f1ee0697ae7804bfddf4fc6bd1e1;hp=26208258dbf7dc5efad704c64278b6e8d61af534;hpb=db71cc90aa6da62b9c448a4b86c0acb7a03a26fa;p=pulseview.git diff --git a/pv/prop/property.hpp b/pv/prop/property.hpp index 26208258..322c6084 100644 --- a/pv/prop/property.hpp +++ b/pv/prop/property.hpp @@ -14,19 +14,25 @@ * 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_PROP_PROPERTY_H -#define PULSEVIEW_PV_PROP_PROPERTY_H +#ifndef PULSEVIEW_PV_PROP_PROPERTY_HPP +#define PULSEVIEW_PV_PROP_PROPERTY_HPP +#include +// Suppress warnings due to use of deprecated std::auto_ptr<> by glibmm. +G_GNUC_BEGIN_IGNORE_DEPRECATIONS #include +G_GNUC_END_IGNORE_DEPRECATIONS #include + #include #include +using std::function; + class QWidget; namespace pv { @@ -37,14 +43,15 @@ class Property : public QObject Q_OBJECT; public: - typedef std::function Getter; - typedef std::function Setter; + typedef function Getter; + typedef function Setter; protected: - Property(QString name, Getter getter, Setter setter); + Property(QString name, QString desc, Getter getter, Setter setter); public: const QString& name() const; + const QString& desc() const; virtual QWidget* get_widget(QWidget *parent, bool auto_commit = false) = 0; @@ -58,9 +65,10 @@ protected: private: QString name_; + QString desc_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv -#endif // PULSEVIEW_PV_PROP_PROPERTY_H +#endif // PULSEVIEW_PV_PROP_PROPERTY_HPP