summaryrefslogtreecommitdiff
path: root/src/filelist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/filelist.h')
-rw-r--r--src/filelist.h38
1 files changed, 21 insertions, 17 deletions
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 <QListWidget>
-#include <QListWidgetItem>
+#include <QTreeView>
#include <QAction>
#include <QMenu>
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;
};