Builds on windows again
This commit is contained in:
parent
33cf39b799
commit
bebb3391c3
160 changed files with 138 additions and 117 deletions
|
|
@ -1,46 +0,0 @@
|
|||
#ifndef CONNECTIONLISTMODEL_H
|
||||
#define CONNECTIONLISTMODEL_H
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
#include "ConnectionConfig.h"
|
||||
#include "Expected.h"
|
||||
|
||||
class ConnectionList;
|
||||
|
||||
/** \brief Model class for the list of connections.
|
||||
*
|
||||
* This class also allows for the editing of the list.
|
||||
*/
|
||||
class ConnectionListModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConnectionListModel(ConnectionList *conns, QObject *parent);
|
||||
ConnectionListModel(const ConnectionListModel&) = delete;
|
||||
~ConnectionListModel();
|
||||
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
virtual int columnCount(const QModelIndex &/*parent*/) const override;
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
// virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
void newItem();
|
||||
Expected<ConnectionConfig> get(int row);
|
||||
virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
|
||||
|
||||
void save();
|
||||
void save(int index);
|
||||
private:
|
||||
|
||||
ConnectionList *m_connections;
|
||||
|
||||
|
||||
static QString makeLongDescription(const ConnectionConfig &cfg);
|
||||
};
|
||||
|
||||
#endif // CONNECTIONLISTMODEL_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue