* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef PULSEVIEW_PV_BINDING_BINDING_HPP
#include <glibmm.h>
G_GNUC_END_IGNORE_DEPRECATIONS
-#include <vector>
+#include <map>
#include <memory>
+#include <vector>
+#include <QObject>
#include <QString>
+using std::map;
+using std::shared_ptr;
+using std::vector;
+
class QFormLayout;
+class QLabel;
class QWidget;
namespace pv {
namespace binding {
-class Binding
+class Binding: public QObject
{
+ Q_OBJECT
+
public:
- const std::vector< std::shared_ptr<prop::Property> >& properties();
+ const vector< shared_ptr<prop::Property> >& properties();
void commit();
- void add_properties_to_form(QFormLayout *layout,
- bool auto_commit = false) const;
+ void add_properties_to_form(QFormLayout *layout, bool auto_commit = false);
+
+ QWidget* get_property_form(QWidget *parent, bool auto_commit = false);
- QWidget* get_property_form(QWidget *parent,
- bool auto_commit = false) const;
+ void update_property_widgets();
static QString print_gvariant(Glib::VariantBase gvar);
+protected Q_SLOTS:
+ void on_help_clicked();
+
protected:
- std::vector< std::shared_ptr<prop::Property> > properties_;
+ vector< shared_ptr<prop::Property> > properties_;
+ map<QWidget*, QLabel*> help_labels_;
};
-} // binding
-} // pv
+} // namespace binding
+} // namespace pv
#endif // PULSEVIEW_PV_BINDING_BINDING_HPP