summaryrefslogtreecommitdiffstats
path: root/clients/tde
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-13 16:04:35 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-13 16:04:35 -0600
commit1219c9b7a497d10cc4e898feddbdbbc840404522 (patch)
tree0944be9470d2cd739dbd7be6bb1ecee02fba6876 /clients/tde
parenta29f4989c3aa63fffe42b9cd7e42ff11b1c89b26 (diff)
downloadulab-1219c9b7a497d10cc4e898feddbdbbc840404522.tar.gz
ulab-1219c9b7a497d10cc4e898feddbdbbc840404522.zip
Fix FTBFS on newer TQt3 versions
Fix cursor and graticule tooltip glitches when waveforms are offset from zero
Diffstat (limited to 'clients/tde')
-rw-r--r--clients/tde/src/part/fpgaview/part.h6
-rw-r--r--clients/tde/src/widgets/tracewidget.cpp8
-rw-r--r--clients/tde/src/widgets/tracewidget.h3
3 files changed, 12 insertions, 5 deletions
diff --git a/clients/tde/src/part/fpgaview/part.h b/clients/tde/src/part/fpgaview/part.h
index fbb5bf2..c03b0b2 100644
--- a/clients/tde/src/part/fpgaview/part.h
+++ b/clients/tde/src/part/fpgaview/part.h
@@ -90,11 +90,11 @@ class FPGAPushButton : public KLed
class FPGA7SegmentPrivate;
-class Q_EXPORT FPGA7Segment : public TQFrame
+class TQ_EXPORT FPGA7Segment : public TQFrame
{
Q_OBJECT
- Q_ENUMS(SegmentStyle)
- Q_PROPERTY(SegmentStyle segmentStyle READ segmentStyle WRITE setSegmentStyle)
+ TQ_ENUMS(SegmentStyle)
+ TQ_PROPERTY(SegmentStyle segmentStyle READ segmentStyle WRITE setSegmentStyle)
public:
FPGA7Segment(TQWidget* parent=0, const char* name=0);
diff --git a/clients/tde/src/widgets/tracewidget.cpp b/clients/tde/src/widgets/tracewidget.cpp
index d1424d2..f30ca44 100644
--- a/clients/tde/src/widgets/tracewidget.cpp
+++ b/clients/tde/src/widgets/tracewidget.cpp
@@ -488,6 +488,10 @@ GraticuleWidget::~GraticuleWidget() {
//
}
+TQSizePolicy GraticuleWidget::sizePolicy() const {
+ return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, true, true);
+}
+
void GraticuleWidget::updateGraticule() {
unsigned int d,s,x,y;
@@ -731,7 +735,7 @@ void GraticuleWidget::mouseMoveEvent(TQMouseEvent *e) {
double scaledXPos = (e->x()*100.0)/width();
double horizontal_range = (m_base->m_traceArray[trace]->rightEdge-m_base->m_traceArray[trace]->leftEdge);
double vertical_range = (m_base->m_traceArray[trace]->bottomEdge-m_base->m_traceArray[trace]->topEdge);
- double realCursorYPosition = (m_base->m_traceArray[trace]->topEdge+((scaledYPos/100.0)*vertical_range));
+ double realCursorYPosition = (m_base->m_traceArray[trace]->topEdge+((scaledYPos/100.0)*vertical_range)-m_base->m_traceArray[trace]->offset);
double realCursorXPosition = (m_base->m_traceArray[trace]->leftEdge+((scaledXPos/100.0)*horizontal_range));
#if 0
m_base->m_traceArray[trace]->graphStatusLabel->setText(TQString("<qt><nobr>%1<br>@%2,%3</qt>").arg(m_base->m_traceArray[trace]->traceName).arg(TraceWidget::prettyFormat(realCursorXPosition, horizontal_range, m_base->m_traceArray[trace]->horizontalUnits)).arg(TraceWidget::prettyFormat(realCursorYPosition, vertical_range, m_base->m_traceArray[trace]->verticalUnits)));
@@ -984,7 +988,7 @@ void TraceWidget::updateCursorText() {
for (uint cursor2=m_zoomCursorStartIndex;cursor2<m_cursorArray.count();cursor2++) {
if (cursor2 != cursor) {
if (m_cursorArray[cursor2]->orientation == m_cursorArray[cursor]->orientation) {
- double realSecondaryCursorPosition = (m_traceArray[trace]->topEdge+((m_cursorArray[cursor2]->position/100.0)*vertical_range));
+ double realSecondaryCursorPosition = (m_traceArray[trace]->topEdge+((m_cursorArray[cursor2]->position/100.0)*vertical_range)-m_traceArray[trace]->offset);
deltaText = trUtf8("Δ") + prettyFormat(fabs(realCursorPosition-realSecondaryCursorPosition), vertical_range, m_traceArray[trace]->verticalUnits);
break;
}
diff --git a/clients/tde/src/widgets/tracewidget.h b/clients/tde/src/widgets/tracewidget.h
index 06defcd..a2de453 100644
--- a/clients/tde/src/widgets/tracewidget.h
+++ b/clients/tde/src/widgets/tracewidget.h
@@ -142,6 +142,9 @@ class GraticuleWidget : public TQWidget
GraticuleWidget(TraceWidget*, const char* = 0);
~GraticuleWidget();
+ public:
+ virtual TQSizePolicy sizePolicy() const;
+
protected:
virtual void paintEvent(TQPaintEvent*);
virtual void resizeEvent(TQResizeEvent *);