X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fviewitempaintparams.hpp;h=9f2125c86159271ab981df0b46e2d201eac6bdc4;hb=00c2ad4c9530f3f8395b5ae6737965d7e87ea023;hp=87e9d0e63b5447a442f89d70ddbca5f5b6c29e4e;hpb=3ed4af999487a1d7d851032b7a762bcda6e959cc;p=pulseview.git
diff --git a/pv/view/viewitempaintparams.hpp b/pv/view/viewitempaintparams.hpp
index 87e9d0e..9f2125c 100644
--- a/pv/view/viewitempaintparams.hpp
+++ b/pv/view/viewitempaintparams.hpp
@@ -14,19 +14,20 @@
* 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"
#include
+#include
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
class ViewItemPaintParams
{
@@ -74,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();
@@ -83,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