time_plot_widget.cpp
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // Copyright (c) 2015, Southwest Research Institute® (SwRI®)
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of Southwest Research Institute® (SwRI®) nor the
14 // names of its contributors may be used to endorse or promote products
15 // derived from this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL Southwest Research Institute® BE LIABLE
21 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27 // DAMAGE.
28 //
29 // *****************************************************************************
31 
32 #include <QPainter>
33 #include <QMouseEvent>
34 
36 
37 namespace swri_profiler_tools
38 {
40  :
41  QWidget(parent),
42  db_(NULL)
43 {
44  setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
45 }
46 
48 {
49 }
50 
52 {
53  return QSize(200, 200);
54 }
55 
57 {
58  if (db_) {
59  // note(exjohnson): we can implement this later if desired, but
60  // currently no use case for it.
61  qWarning("TimePlotWidget: Cannot change the profile database.");
62  return;
63  }
64 
65  db_ = db;
66 }
67 
68 void TimePlotWidget::setActiveNode(int profile_key, int node_key)
69 {
70 }
71 
72 void TimePlotWidget::enterEvent(QEvent *event)
73 {
74 }
75 
76 void TimePlotWidget::leaveEvent(QEvent *event)
77 {
78 }
79 
80 void TimePlotWidget::mouseMoveEvent(QMouseEvent *event)
81 {
82 }
83 
84 void TimePlotWidget::mousePressEvent(QMouseEvent *event)
85 {
86 }
87 
88 void TimePlotWidget::mouseDoubleClickEvent(QMouseEvent *event)
89 {
90 }
91 
92 void TimePlotWidget::paintEvent(QPaintEvent *)
93 {
94  QPainter painter(this);
95 
96  painter.setPen(Qt::NoPen);
97  painter.fillRect(0, 0, width(), height(), QColor(255, 255, 255));
98  painter.setPen(Qt::black);
99 
100 }
101 } // namespace swri_profiler_tools
void setDatabase(ProfileDatabase *db)
void setActiveNode(int profile_key, int node_key)


swri_profiler_tools
Author(s):
autogenerated on Fri Nov 27 2020 03:44:18