From 8040f48974d88c6d30dff720a2ffb27e0cf54814 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 23 Sep 2018 16:13:37 +0200 Subject: Integrate channel map into file list in instrument editor. --- src/filelist.h | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'src/filelist.h') diff --git a/src/filelist.h b/src/filelist.h index e336bc1..165af83 100644 --- a/src/filelist.h +++ b/src/filelist.h @@ -26,15 +26,15 @@ */ #pragma once -#include -#include +#include #include #include class Instrument; +class FileDataModel; class FileList - : public QListWidget + : public QTreeView { Q_OBJECT public: @@ -44,30 +44,33 @@ public: signals: void masterFileChanged(QString filename); - void fileAdded(QString file, QString name); +// void fileAdded(QString file, QString name); void fileRemoved(QString file, QString name); void allFilesRemoved(); - void nameChanged(QString file, QString name); +// void nameChanged(QString file, QString name); public slots: void addFiles(); - void popupMenu(const QPoint& pos); private slots: - void selectionChanged(QListWidgetItem* item); + void selectionChanged(const QModelIndex &index); + void onCustomContextMenu(const QPoint &point); void setMaster(); void removeFile(); void removeAllFiles(); - void editName(); - void setItemName(QListWidgetItem* i, QString name); - +// void setItemName(QListWidgetItem* i, QString name); +// private: - QString itemFile(QListWidgetItem* i); - QString itemName(QListWidgetItem* i); - void setItemFile(QListWidgetItem* i, QString file); - void setItemMaster(QListWidgetItem* i, bool master); - - void setMasterFile(QListWidgetItem* i); +// QString itemFile(QListWidgetItem* i); +// void setItemFile(QListWidgetItem* i, QString file); +// +// QString itemName(QListWidgetItem* i); +// void setItemMaster(QListWidgetItem* i, bool master); +// +// int itemChannelMap(QListWidgetItem* i); +// void setItemChannelMap(QListWidgetItem* i, int id); +// +// void setMasterFile(QListWidgetItem* i); void createMenus(); QMenu* menu; @@ -76,6 +79,7 @@ private: QAction* removeAction; QAction* removeAllAction; - QListWidgetItem* activeItem; +// QListWidgetItem* activeItem; Instrument& instrument; + FileDataModel* model; }; -- cgit v1.2.3