Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SIGNALFILEITEM_H
00029 #define SIGNALFILEITEM_H
00030
00031 #include <GeopsyCore.h>
00032
00033 #include "GeopsyGuiDLLExport.h"
00034
00035 namespace GeopsyGui {
00036
00037 class GEOPSYGUI_EXPORT SignalFileItem : public QAbstractItemModel
00038 {
00039 public:
00040 SignalFileItem(QObject * parent=0);
00041 ~SignalFileItem() {}
00042
00043 void setDatabase(SignalDB * db);
00044
00045 virtual int rowCount(const QModelIndex &parent=QModelIndex()) const;
00046 virtual int columnCount(const QModelIndex &parent=QModelIndex()) const;
00047 virtual QVariant data(const QModelIndex &index, int role) const;
00048 virtual QModelIndex parent (const QModelIndex & index) const;
00049 virtual QModelIndex index (int row, int column, const QModelIndex & parent=QModelIndex()) const;
00050 virtual Qt::ItemFlags flags (const QModelIndex & ) const {return Qt::ItemIsSelectable | Qt::ItemIsEnabled;}
00051
00052 void getSelection(SubSignalPool& sel, const QItemSelectionModel& sm);
00053 void getSelection(QList<SignalFile *>& sel, const QItemSelectionModel& sm);
00054 static SignalFile * file(const QModelIndex & index);
00055 QModelIndex index(SignalFile * f);
00056 void remove(const QList<SignalFile *>& sel);
00057 private:
00058 SignalDB * _db;
00059 };
00060
00061
00062 }
00063
00064 #endif // SIGNALFILEITEM_H