##// END OF EJS Templates
A lot of refactoring:...
A lot of refactoring: QLopPlot now handle more than one plot. File browser uses QFileSystemModel and QItemView Wrapped QCustomPlot.

File last commit:

r6:665de41c4c74 default
r6:665de41c4c74 default
Show More
filebrowser.h
44 lines | 1.0 KiB | text/x-c | CLexer
#ifndef FILEBROWSER_H
#define FILEBROWSER_H
#include <QDockWidget>
#include <QFileSystemModel>
#include <QAbstractItemView>
#include <filesystemmodel.h>
#include <QKeyEvent>
#include <QCompleter>
namespace Ui {
class FileBrowser;
}
class FileBrowser : public QDockWidget
{
Q_OBJECT
public:
explicit FileBrowser(QWidget *parent = 0);
~FileBrowser();
void setNameFilters(const QStringList & filters, bool disables=false);
signals:
void fileClicked(const QString& file);
void fileDoubleClicked(const QString& file);
private slots:
void changeToTreeView();
void changeToListView();
void clicked(QModelIndex index);
void doubleClicked(QModelIndex index);
void parentDir();
void cd(const QString& newPath);
protected:
void changeEvent(QEvent *e);
void keyPressEvent(QKeyEvent *e);
private:
void pathLineEditEnterEditMode(bool enter=true);
Ui::FileBrowser *ui;
FileSystemModel* model;
QAbstractItemView* view;
QCompleter* pathCompleter;
};
#endif // FILEBROWSER_H