Changeset 11360 for fact/Evidence/GUI.h
- Timestamp:
- 07/12/11 15:29:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/Evidence/GUI.h
r11088 r11360 34 34 bool SetStatus(QWidget *, QString, int, QString, int = -1); 35 35 36 // General Edd Widget: has Update() method called by DIM interface 37 class EddWidget { 38 39 public: 40 virtual void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int=-1) = 0; 41 }; 42 36 43 // Base class for Edd plot 37 44 // DeleteCurve() is pure virtual and needs to be implemented iin the application class … … 97 104 98 105 // General indicator for DIM service 99 class EddLineDisplay: public QLineEdit {106 class EddLineDisplay: public QLineEdit, public EddWidget { 100 107 Q_OBJECT 101 108 … … 112 119 113 120 public: 114 EddLineDisplay(QString, int= 0, QWidget * = NULL);121 EddLineDisplay(QString, int=-1, QWidget * = NULL); 115 122 ~EddLineDisplay(); 123 void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int = -1); 116 124 117 125 bool ShowAsTime; 118 126 119 127 private slots: 120 void Update(QString, int, QByteArray, QString, QString);121 128 void contextMenuEvent(QContextMenuEvent *); 122 129 void MenuOpenHistory(); … … 143 150 144 151 // Graph class for history display 145 class EddPlot: public EddBasePlot {152 class EddPlot: public EddBasePlot, public EddWidget { 146 153 Q_OBJECT 147 154 … … 190 197 void AddService(QString, int = 0); 191 198 void DeleteCurve(QwtPlotCurve *); 192 193 private slots: 194 void Update(QString, int, QByteArray, QString, QString); 199 void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int = -1); 200 201 private slots: 195 202 void LegendClicked(QwtPlotItem *); 196 203 void MenuPasteService(); … … 201 208 202 209 // Text history and output class 203 class EddText: public QTextEdit {210 class EddText: public QTextEdit, public EddWidget { 204 211 Q_OBJECT 205 212 … … 211 218 EddText(QString, bool = false, QWidget * = NULL); 212 219 ~EddText(); 220 void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int = -1); 213 221 214 222 bool Accumulate; 215 216 private slots:217 void Update(QString, int, QByteArray, QString, QString);218 223 }; 219 224 … … 226 231 struct Item { 227 232 DimStampedInfo *DIMService; 228 int Count;233 QMap<class EddWidget *, int> Subscribers; 229 234 int TimeStamp; 230 235 QByteArray ByteArray; 231 236 QString Format; 232 237 QString Text; 238 QStringList Items; 233 239 }; 234 240 QMap<QString, struct Item> ServiceList; 235 QMutex *Mutex;236 QList<QString> WaitingList;241 QMap<QString, bool> IgnoreMap; 242 QMutex *Mutex, IgnoreMutex; 237 243 238 244 struct HistItem { … … 249 255 250 256 private slots: 251 void Update(QString, int, QByteArray, QString , QString);257 void Update(QString, int, QByteArray, QString); 252 258 void UpdateStatistics(); 253 void MakeSubscriptions();254 259 255 260 public: … … 257 262 ~EddDim(); 258 263 259 void Subscribe(QString); 260 void Unsubscribe (QString); 264 void Subscribe(QString, class EddWidget *, int = -1); 265 void Unsubscribe (QString, class EddWidget *); 266 void Ignore (QString, bool); 261 267 class EvidenceHistory *GetHistory(QString); 262 268 void DropHistory(QString); 263 void ForceEmit();264 269 265 270 signals: 266 void YEP(QString, int, QByteArray = QByteArray(), QString = QString(), QString = QString()); 267 void INT(QString, int, QByteArray = QByteArray(), QString = QString(), QString = QString()); 271 void INT(QString, int, QByteArray = QByteArray(), QString = QString()); 268 272 }; 269 273
Note:
See TracChangeset
for help on using the changeset viewer.