X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fviewitempaintparams.hpp;h=9f2125c86159271ab981df0b46e2d201eac6bdc4;hb=64a21e782d6c9081f13f8398e6408c13648d1d14;hp=bba0d70e6fe72759a7742ba2728db482a798aa97;hpb=dbf74f26f6bd9fd5277f090fea8e4f5506c19911;p=pulseview.git diff --git a/pv/view/viewitempaintparams.hpp b/pv/view/viewitempaintparams.hpp index bba0d70e..9f2125c8 100644 --- a/pv/view/viewitempaintparams.hpp +++ b/pv/view/viewitempaintparams.hpp @@ -14,12 +14,11 @@ * 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 . */ -#ifndef PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP -#define PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP +#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWITEMPAINTPARAMS_HPP +#define PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWITEMPAINTPARAMS_HPP #include "pv/util.hpp" @@ -27,7 +26,8 @@ #include namespace pv { -namespace view { +namespace views { +namespace TraceView { class ViewItemPaintParams { @@ -75,6 +75,12 @@ public: return (offset_ / scale_).convert_to(); } + bool next_bg_colour_state() { + const bool state = bg_colour_state_; + bg_colour_state_ = !bg_colour_state_; + return state; + } + public: static QFont font(); @@ -84,9 +90,11 @@ private: QRect rect_; double scale_; pv::util::Timestamp offset_; + bool bg_colour_state_; }; -} // namespace view +} // namespace TraceView +} // namespace views } // namespace pv -#endif // PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP +#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWITEMPAINTPARAMS_HPP