FMPlugin.h
No OneTemporary

File Metadata

Created
Wed, Jul 8, 9:18 AM

FMPlugin.h

#ifndef _FM_PLUGIN_H_
#define _FM_PLUGIN_H_
class QLineEdit;
class QAction;
class TreeView;
#include <QDebug>
#include <QtCore/QObject>
#include <QtCore/QStack>
#include <QFileSystemModel>
#include <JuffPlugin.h>
class FileSystemModel;
class FMPlugin : public QObject, public JuffPlugin {
Q_OBJECT
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID JuffPlugin_iid)
#endif
Q_INTERFACES(JuffPlugin)
public:
FMPlugin();
virtual ~FMPlugin();
// info
virtual QString name() const;
virtual QString title() const;
virtual QString description() const;
virtual QString targetEngine() const;
// controls
virtual QWidgetList dockList() const;
virtual bool dockVisible(QWidget*) const;
virtual void applySettings();
QWidget * settingsPage() const;
protected:
virtual void onDocSaved(const QString&);
protected slots:
void itemDoubleClicked(const QModelIndex&);
void home();
void up();
void back();
void curFileDir();
void favorites();
void newDir();
void addToFavorites();
void goToFavorite();
void manageFavorites();
void onNewProjectRoot();
void treeCheckBox_toggled(bool value);
void showHiddenBox_toggled(bool value);
void onDirChanged(const QString&);
void onFileMoved(const QString &path, const QString &pathOld);
void onFileRenamed(const QString &path, const QString &oldName, const QString &newName);
private:
void cd(const QString&);
void initFavoritesMenu();
bool showAsTree;
bool showHidden;
int sortColumn;
QWidget* w_;
TreeView* tree_;
FileSystemModel* model_;
QLineEdit* pathEd_;
QAction* backBtn_;
QStack<QString> history_;
QStringList favorites_;
QMenu* favoritesMenu_;
QAction* addToFavoritesAct_;
QAction* manageFavoritesAct_;
QFileSystemWatcher fsWatcher_;
};
#endif

Event Timeline