diff options
Diffstat (limited to 'ui/qt/models/uat_model.h')
-rw-r--r-- | ui/qt/models/uat_model.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ui/qt/models/uat_model.h b/ui/qt/models/uat_model.h index 5da647a5..a24c938a 100644 --- a/ui/qt/models/uat_model.h +++ b/ui/qt/models/uat_model.h @@ -15,7 +15,6 @@ #define UAT_MODEL_H #include <config.h> -#include <glib.h> #include <QAbstractItemModel> #include <QList> @@ -24,6 +23,7 @@ class UatModel : public QAbstractTableModel { + Q_OBJECT public: UatModel(QObject *parent, uat_t *uat = 0); UatModel(QObject *parent, QString tableName); @@ -43,9 +43,13 @@ public: QModelIndex appendEntry(QVariantList row); QModelIndex copyRow(QModelIndex original); + bool moveRow(int src_row, int dst_row); + bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild); - bool moveRow(const QModelIndex &sourceParent, int sourceRow, const QModelIndex &destinationParent, int destinationChild); + //Drag & drop functionality + Qt::DropActions supportedDropActions() const; + bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); void reloadUat(); bool hasErrors() const; @@ -74,9 +78,11 @@ private: bool checkField(int row, int col, char **error) const; QList<int> checkRow(int row); void loadUat(uat_t * uat = 0); + bool moveRowPrivate(int src_row, int dst_row); epan_uat *uat_; - QList<bool> dirty_records; - QList<QMap<int, QString> > record_errors; + bool applying_; + QVector<bool> dirty_records; + QVector<QMap<int, QString> > record_errors; }; #endif // UAT_MODEL_H |