X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fflag.hpp;h=5dec187c4efa3035c1a36f0926d7225604b8a782;hb=HEAD;hp=af4c7b9d15012ee89e691dfee9eeea13c1c20c90;hpb=48257a69ffad409c9893605d99cd6e15161dff4f;p=pulseview.git diff --git a/pv/view/flag.hpp b/pv/view/flag.hpp deleted file mode 100644 index af4c7b9d..00000000 --- a/pv/view/flag.hpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of the PulseView project. - * - * Copyright (C) 2014 Joel Holdsworth - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * 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 - */ - -#ifndef PULSEVIEW_PV_VIEW_FLAG_HPP -#define PULSEVIEW_PV_VIEW_FLAG_HPP - -#include - -#include "timemarker.hpp" - -class QMenu; - -namespace pv { -namespace view { - -class Flag : public TimeMarker, - public std::enable_shared_from_this -{ - Q_OBJECT - -public: - static const QColor FillColour; - -public: - /** - * Constructor. - * @param view A reference to the view that owns this cursor pair. - * @param time The time to set the flag to. - * @param text The text of the marker. - */ - Flag(View &view, const pv::util::Timestamp& time, const QString &text); - - /** - * Copy constructor. - */ - Flag(const Flag &flag); - - /** - * Returns true if the item is visible and enabled. - */ - bool enabled() const; - - /** - * Gets the text to show in the marker. - */ - QString get_text() const; - - pv::widgets::Popup* create_popup(QWidget *parent); - - QMenu* create_context_menu(QWidget *parent); - - void delete_pressed(); - - void drag_by(const QPoint &delta); - -private Q_SLOTS: - void on_delete(); - - void on_text_changed(const QString &text); - -private: - QString text_; -}; - -} // namespace view -} // namespace pv - -#endif // PULSEVIEW_PV_VIEW_FLAG_HPP