* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_TOOLBARS_MAINBAR_H
-#define PULSEVIEW_PV_TOOLBARS_MAINBAR_H
+#ifndef PULSEVIEW_PV_TOOLBARS_MAINBAR_HPP
+#define PULSEVIEW_PV_TOOLBARS_MAINBAR_HPP
#include <stdint.h>
#include <QComboBox>
#include <QDoubleSpinBox>
+#include <QMenu>
#include <QToolBar>
#include <QToolButton>
#include <pv/session.hpp>
+#include <pv/widgets/devicetoolbutton.hpp>
#include <pv/widgets/popuptoolbutton.hpp>
#include <pv/widgets/sweeptimingwidget.hpp>
namespace sigrok {
- class Device;
+class Device;
+class InputFormat;
}
Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Device>)
public:
MainBar(Session &session, pv::MainWindow &main_window);
- void set_device_list(
- const std::list< std::shared_ptr<sigrok::Device> > &devices,
- std::shared_ptr<sigrok::Device> selected);
-
- std::shared_ptr<sigrok::Device> get_selected_device() const;
+ void update_device_list();
void set_capture_state(pv::Session::capture_state state);
-Q_SIGNALS:
- void run_stop();
+ void reset_device_selector();
private:
void update_sample_rate_selector();
Session &session_;
MainWindow &main_window_;
- QComboBox device_selector_;
- bool updating_device_selector_;
+ pv::widgets::DeviceToolButton device_selector_;
pv::widgets::PopupToolButton configure_button_;
QAction *configure_button_action_;
pv::widgets::PopupToolButton channels_button_;
+ QAction *channels_button_action_;
pv::widgets::SweepTimingWidget sample_count_;
pv::widgets::SweepTimingWidget sample_rate_;
QIcon icon_green_;
QIcon icon_grey_;
QToolButton run_stop_button_;
+ QAction *run_stop_button_action_;
+
+ QToolButton menu_button_;
};
} // namespace toolbars
} // namespace pv
-#endif // PULSEVIEW_PV_TOOLBARS_MAINBAR_H
+#endif // PULSEVIEW_PV_TOOLBARS_MAINBAR_HPP