projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Auto-load session setups if they exist and auto-save them if desired
[pulseview.git]
/
pv
/
prop
/
enum.hpp
diff --git
a/pv/prop/enum.hpp
b/pv/prop/enum.hpp
index 0ae8a9c65950dace7499d825f4b1d8e98e62a5dc..1434e7e9e0419aa301b03b9d21febcd2f0f66a7a 100644
(file)
--- a/
pv/prop/enum.hpp
+++ b/
pv/prop/enum.hpp
@@
-14,8
+14,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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_PROP_ENUM_HPP
*/
#ifndef PULSEVIEW_PV_PROP_ENUM_HPP
@@
-28,9
+27,14
@@
#include <QMetaType>
#include <QMetaType>
+using std::pair;
+using std::vector;
+
Q_DECLARE_METATYPE(Glib::VariantBase);
class QComboBox;
Q_DECLARE_METATYPE(Glib::VariantBase);
class QComboBox;
+class QLabel;
+class QSlider;
namespace pv {
namespace prop {
namespace pv {
namespace prop {
@@
-40,25
+44,33
@@
class Enum : public Property
Q_OBJECT;
public:
Q_OBJECT;
public:
- Enum(QString name, std::vector<std::pair<Glib::VariantBase, QString> > values,
+ Enum(QString name, QString desc,
+ vector<pair<Glib::VariantBase, QString> > values,
Getter getter, Setter setter);
virtual ~Enum() = default;
QWidget* get_widget(QWidget *parent, bool auto_commit);
Getter getter, Setter setter);
virtual ~Enum() = default;
QWidget* get_widget(QWidget *parent, bool auto_commit);
+ void update_widget();
void commit();
private Q_SLOTS:
void commit();
private Q_SLOTS:
- void on_current_item_changed(int);
+ void on_current_index_changed(int);
+ void on_value_changed(int);
private:
private:
- const std::vector< std::pair<Glib::VariantBase, QString> > values_;
+ const vector< pair<Glib::VariantBase, QString> > values_;
+ bool is_range_;
QComboBox *selector_;
QComboBox *selector_;
+
+ QWidget *slider_layout_widget_;
+ QSlider *slider_;
+ QLabel *slider_label_;
};
};
-}
//
prop
-}
//
pv
+}
// namespace
prop
+}
// namespace
pv
#endif // PULSEVIEW_PV_PROP_ENUM_HPP
#endif // PULSEVIEW_PV_PROP_ENUM_HPP