stec-platform
subscriptionabstracttablemodel.h
1 #ifndef SUBSCRIPTIONABSTRACTTABLEMODEL_H
2 #define SUBSCRIPTIONABSTRACTTABLEMODEL_H
3 
4 /*
5 *
6 * $LastChangedDate: 2022-04-14 18:52:13 -0400 (Thu, 14 Apr 2022) $
7 * $LastChangedBy: ed $
8 * $Revision: 3186 $
9 * $Author: ed $
10 * $URL: svn+ssh://svn.vremsoft.com/var/share/svn/tags/platfom3.4.3/platformlib/subscriptionabstracttablemodel.h $
11 * $Id: subscriptionabstracttablemodel.h 3186 2022-04-14 22:52:13Z ed $
12 * edc@vremsoft.com
13 *
14 * 19
15 *
16 * *** 2014<c> ***
17 *
18 *
19 */
20 
21 #include <QAbstractTableModel>
22 #include <QAbstractTableModel>
23 #include <QString>
24 #include <subscription.h>
25 #include <QVariant>
26 #include <QList>
27 
28 
34 class PLATFORMSHARED_EXPORT SubscriptionAbstractTableModel : public QAbstractTableModel
35 {
36  Q_OBJECT
37 private :
38  Subscription *subscription;
39  VremVArray lst, tgtlst;
40 public:
41 
47  explicit SubscriptionAbstractTableModel(QString name, QObject *parent = 0);
48 
51 
52  QVariant data ( const QModelIndex &index, int role ) const;
53  int columnCount ( const QModelIndex &parent ) const;
54  int rowCount ( const QModelIndex &parent ) const;
55  Qt::ItemFlags flags ( const QModelIndex &index ) const;
56  QVariant headerData ( int section, Qt::Orientation orientation, int role ) const;
57  virtual bool removeRows ( int position, int rows, const QModelIndex &index );
58  virtual bool insertRows ( int position, int rows, const QModelIndex &index );
59  virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );
60 
61 
62 
63  int getNbrConnections(void);
64  QVariant getProperty(void);
65  QString getDescription(void);
66  QVariant getUserData(void);
67 
68 
69  QString text() {
70  return subscription->text();
71  }
72 
73 signals:
74 
75 public slots:
76  void SlostEventOccured(qint16 index, qint16 count, QVariant src);
77  void SlotResetEventOccured( qint16 count, QVariant src);
78 
79 
80 public slots:
81 
82 };
83 
84 #endif // SUBSCRIPTIONABSTRACTTABLEMODEL_H
The SubscriptionAbstractTableModel class used for things like alarms and such.
Definition: subscriptionabstracttablemodel.h:35
The Subscription class A platform subscriber must use or inheit this class.
Definition: subscription.h:43
QString const text(void)
returns the name of the subscription
Definition: subscription.h:217