Changeset 11360 for fact/Evidence/GUI.h


Ignore:
Timestamp:
07/12/11 15:29:14 (13 years ago)
Author:
ogrimm
Message:
Updates to make Edd more responsive with high incoming event rate
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/Evidence/GUI.h

    r11088 r11360  
    3434bool SetStatus(QWidget *, QString, int, QString, int = -1);
    3535
     36// General Edd Widget: has Update() method called by DIM interface
     37class EddWidget {
     38
     39  public:
     40        virtual void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int=-1) = 0;
     41};
     42
    3643// Base class for Edd plot
    3744// DeleteCurve() is pure virtual and needs to be implemented iin the application class
     
    97104                 
    98105// General indicator for DIM service
    99 class EddLineDisplay: public QLineEdit {
     106class EddLineDisplay: public QLineEdit, public EddWidget {
    100107    Q_OBJECT
    101108
     
    112119       
    113120  public:
    114     EddLineDisplay(QString, int=0, QWidget * = NULL);
     121    EddLineDisplay(QString, int=-1, QWidget * = NULL);
    115122    ~EddLineDisplay();
     123        void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int = -1);
    116124
    117125        bool ShowAsTime;
    118126       
    119127  private slots:
    120         void Update(QString, int, QByteArray, QString, QString);
    121128    void contextMenuEvent(QContextMenuEvent *);   
    122129    void MenuOpenHistory();
     
    143150
    144151// Graph class for history display
    145 class EddPlot: public EddBasePlot {
     152class EddPlot: public EddBasePlot, public EddWidget {
    146153    Q_OBJECT
    147154
     
    190197    void AddService(QString, int = 0);
    191198        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:
    195202        void LegendClicked(QwtPlotItem *);
    196203    void MenuPasteService();
     
    201208
    202209// Text history and output class
    203 class EddText: public QTextEdit {
     210class EddText: public QTextEdit, public EddWidget {
    204211  Q_OBJECT
    205212
     
    211218    EddText(QString, bool = false, QWidget * = NULL);
    212219    ~EddText();
     220        void Update(const QString &, int, const QByteArray &, const QString &, const QString &, int = -1);
    213221
    214222        bool Accumulate;
    215 
    216   private slots:
    217         void Update(QString, int, QByteArray, QString, QString);
    218223};
    219224
     
    226231        struct Item {
    227232          DimStampedInfo *DIMService;
    228           int Count;
     233          QMap<class EddWidget *, int> Subscribers;
    229234          int TimeStamp;
    230235          QByteArray ByteArray;
    231236          QString Format;
    232237          QString Text;
     238          QStringList Items;
    233239        };
    234240    QMap<QString, struct Item> ServiceList;
    235     QMutex *Mutex;
    236         QList<QString> WaitingList;
     241        QMap<QString, bool> IgnoreMap;
     242    QMutex *Mutex, IgnoreMutex;
    237243
    238244        struct HistItem {
     
    249255
    250256  private slots:
    251         void Update(QString, int, QByteArray, QString, QString);
     257        void Update(QString, int, QByteArray, QString);
    252258        void UpdateStatistics();
    253         void MakeSubscriptions();
    254259
    255260  public:
     
    257262    ~EddDim();
    258263
    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);
    261267        class EvidenceHistory *GetHistory(QString);
    262268        void DropHistory(QString);
    263         void ForceEmit();
    264269
    265270  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());
    268272};
    269273
Note: See TracChangeset for help on using the changeset viewer.