setup electron app with boilerplate
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#ifndef NETWORKSTREAMMODEL_H
|
||||
#define NETWORKSTREAMMODEL_H
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include "store.h"
|
||||
|
||||
class NetworkStreamModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit NetworkStreamModel(Store *store, QObject *parent = nullptr);
|
||||
|
||||
// Required QAbstractItemModel interface
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &child) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
// Helper methods for MainWindow
|
||||
QString streamIdFromIndex(const QModelIndex &index) const;
|
||||
bool isStreamItem(const QModelIndex &index) const;
|
||||
QString networkIdFromIndex(const QModelIndex &index) const;
|
||||
|
||||
private:
|
||||
Store *m_store;
|
||||
};
|
||||
|
||||
#endif // NETWORKSTREAMMODEL_H
|
||||
Reference in New Issue
Block a user