X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fflag.hpp;h=1311d4a9eec3dd831d36d3de28af39bed538d353;hb=f4e57597347e47a4ea58fbdc7b0a22e07f1c0ede;hp=fdebe1c0a6b4139b9675aa57c1771ed151fc7041;hpb=dbfae3f1b55b984c7ee7e619a8da53b77db98c90;p=pulseview.git diff --git a/pv/view/flag.hpp b/pv/view/flag.hpp index fdebe1c..1311d4a 100644 --- a/pv/view/flag.hpp +++ b/pv/view/flag.hpp @@ -18,18 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_VIEW_FLAG_H -#define PULSEVIEW_PV_VIEW_FLAG_H +#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_FLAG_HPP +#define PULSEVIEW_PV_VIEWS_TRACEVIEW_FLAG_HPP #include #include "timemarker.hpp" +class QMenu; + namespace pv { -namespace view { +namespace views { +namespace TraceView { class Flag : public TimeMarker, - public std::enable_shared_from_this + public std::enable_shared_from_this { Q_OBJECT @@ -43,7 +46,7 @@ public: * @param time The time to set the flag to. * @param text The text of the marker. */ - Flag(View &view, double time, const QString &text); + Flag(View &view, const pv::util::Timestamp& time, const QString &text); /** * Copy constructor. @@ -62,16 +65,21 @@ public: pv::widgets::Popup* create_popup(QWidget *parent); + QMenu* create_context_menu(QWidget *parent); + void delete_pressed(); private Q_SLOTS: + void on_delete(); + void on_text_changed(const QString &text); private: QString text_; }; -} // namespace view +} // namespace TraceView +} // namespace views } // namespace pv -#endif // PULSEVIEW_PV_VIEW_FLAG_H +#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_FLAG_HPP