File indexing completed on 2022-10-04 17:30:21

0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 // SPDX-FileCopyrightText: 2007 Dominik Seichter <domseichter@web.de>
0003 
0004 #ifndef PREVIEW_LIST_H
0005 #define PREVIEW_LIST_H
0006 
0007 #include <QTreeView>
0008 
0009 class KRenameModel;
0010 class QMenu;
0011 
0012 class PreviewList : public QTreeView
0013 {
0014     Q_OBJECT
0015 
0016 public:
0017     explicit PreviewList(QWidget *parent);
0018     ~PreviewList() override;
0019 
0020     inline void setKRenameModel(KRenameModel *model)
0021     {
0022         m_model = model;
0023     }
0024 
0025 Q_SIGNALS:
0026     void addFiles();
0027     void updateCount();
0028 
0029 private Q_SLOTS:
0030     void slotOpen();
0031     void slotRemove();
0032     void slotManually();
0033 
0034 protected:
0035     void contextMenuEvent(QContextMenuEvent *e) override;
0036 
0037 private:
0038     KRenameModel *m_model;
0039     QMenu        *m_menu;
0040 };
0041 
0042 #endif // PREVIEW_LIST_H
0043