Add context menu to hide columns in file manager
This commit is contained in:
@@ -25,9 +25,12 @@ private:
|
||||
|
||||
class DirFileSystemModel : public QFileSystemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
mutable QCache<QString, ImageInfoData> *_cache = nullptr;
|
||||
static QCache<QString, ImageInfoData>* getCacheInstance();
|
||||
QModelIndex _dir;
|
||||
QStringList _fitsKeywords;
|
||||
bool _loadFitsKeywords = true;
|
||||
public:
|
||||
explicit DirFileSystemModel(QObject *parent = nullptr);
|
||||
void setDir(const QString &path);
|
||||
@@ -37,6 +40,8 @@ public:
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
bool hasChildren(const QModelIndex &parent) const override;
|
||||
public slots:
|
||||
void loadFitsKeywords(bool enable);
|
||||
};
|
||||
|
||||
class DirView : public QTreeView
|
||||
@@ -49,6 +54,8 @@ public:
|
||||
void setDir(const QString &path);
|
||||
QString dir() const;
|
||||
void setOpenFilter(const QSet<QString> &openFilter);
|
||||
public slots:
|
||||
void headerContextMenu(const QPoint &pos);
|
||||
signals:
|
||||
void dirChanged(const QString &path);
|
||||
void openFile(const QString &path);
|
||||
|
||||
Reference in New Issue
Block a user