projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Session: Don't reset session name for file devices
[pulseview.git]
/
pv
/
view
/
cursorpair.cpp
diff --git
a/pv/view/cursorpair.cpp
b/pv/view/cursorpair.cpp
index 5ee90aa1357e6f2f89ce32f1cffbf14dcbdb3506..e0e3de65f3c9adc427f0ae877e79f0fcb4b0de1e 100644
(file)
--- a/
pv/view/cursorpair.cpp
+++ b/
pv/view/cursorpair.cpp
@@
-14,8
+14,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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 <http://www.gnu.org/licenses/>.
*/
#include "cursorpair.hpp"
*/
#include "cursorpair.hpp"
@@
-34,7
+33,8
@@
using std::shared_ptr;
using std::pair;
namespace pv {
using std::pair;
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
const int CursorPair::DeltaPadding = 8;
const QColor CursorPair::ViewportFillColour(220, 231, 243);
const int CursorPair::DeltaPadding = 8;
const QColor CursorPair::ViewportFillColour(220, 231, 243);
@@
-61,7
+61,8
@@
shared_ptr<Cursor> CursorPair::second() const
return second_;
}
return second_;
}
-void CursorPair::set_time(const pv::util::Timestamp& time) {
+void CursorPair::set_time(const pv::util::Timestamp& time)
+{
const pv::util::Timestamp delta = second_->time() - first_->time();
first_->set_time(time);
second_->set_time(time + delta);
const pv::util::Timestamp delta = second_->time() - first_->time();
first_->set_time(time);
second_->set_time(time + delta);
@@
-119,8
+120,7
@@
void CursorPair::paint_label(QPainter &p, const QRect &rect, bool hover)
const int radius = delta_rect.height() / 2;
const QRectF text_rect(delta_rect.intersected(
rect).adjusted(radius, 0, -radius, 0));
const int radius = delta_rect.height() / 2;
const QRectF text_rect(delta_rect.intersected(
rect).adjusted(radius, 0, -radius, 0));
- if (text_rect.width() >= text_size_.width())
- {
+ if (text_rect.width() >= text_size_.width()) {
const int highlight_radius = delta_rect.height() / 2 - 2;
if (selected()) {
const int highlight_radius = delta_rect.height() / 2 - 2;
if (selected()) {
@@
-144,7
+144,8
@@
void CursorPair::paint_label(QPainter &p, const QRect &rect, bool hover)
}
}
}
}
-void CursorPair::paint_back(QPainter &p, const ViewItemPaintParams &pp) {
+void CursorPair::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+{
if (!enabled())
return;
if (!enabled())
return;
@@
-191,5
+192,6
@@
pair<float, float> CursorPair::get_cursor_offsets() const
((second_->time() - view_.offset()) / view_.scale()).convert_to<float>());
}
((second_->time() - view_.offset()) / view_.scale()).convert_to<float>());
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv
} // namespace pv