12 #include <dispatch/dispatch.h>
54 void helpButtonClicked();
57 static const int maxPopoverContentWidth;
58 static const int maxPopoverImageWidth;
59 static const int maxPopoverImageHeight;
60 static const qreal minTextUpdateInterval;
61 static const int eventHistoryMaxSize;
62 static const int noEventObserved;
63 static const int noDisplayableEventTime;
64 static const string noDataValueObserved;
65 static const string noDisplayableDataValue;
70 string cachedDataValue;
71 qint64 timeOfLastEvent;
72 qint64 timeOfLastUpdate;
73 bool compositionRunning;
74 QQueue<qint64> eventHistory;
75 unsigned int eventCount;
76 unsigned int droppedEventCount;
77 bool allEventsBlocked;
78 bool someEventsBlocked;
83 QTimer *refreshTextTimer;
84 dispatch_queue_t popoverTextQueue;
87 QString mostRecentImage;
89 void updateTextAndResizeThreadUnsafe();
90 void updateTextThreadUnsafe(
bool includeEventIndicator=
false);
91 QString generateImageCode();
92 void resetRefreshTextInterval();
93 bool refreshTextTimerFiredSinceLastReset;
94 QString generatePortPopoverText(
bool includeEventIndicator=
false);
96 static double getEventIntervalMean(QQueue<qint64> timestamps);
97 static double getEventIntervalStdDev(QQueue<qint64> timestamps);
101 QPoint positionBeforeDrag;