dbrowser.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef DBROWSER_H
  2. #define DBROWSER_H
  3. #include <QWidget>
  4. #include <QVBoxLayout>
  5. #include <QShortcut>
  6. #include <QKeySequence>
  7. #include "browserbuttons.h"
  8. #include "filebrowser.h"
  9. #include "contextmenu.h"
  10. class DBrowser : public QWidget
  11. {
  12. Q_OBJECT
  13. public:
  14. explicit DBrowser(QString homedir ="", QWidget *parent = 0);
  15. FileBrowser *fBrowser;
  16. BrowserButtons *bButtons;
  17. QFileSystemModel *getDirModel();
  18. private:
  19. QAction *iconViewMode;
  20. QAction *listViewMode;
  21. QAction *detailViewMode;
  22. ContextMenu *contextMenu;
  23. QVBoxLayout *layout;
  24. QString styles; //Name of the style sheet
  25. QLabel *lblLocation;
  26. signals:
  27. void exit();
  28. void maximize();
  29. void mapReady(QMap <qint64, int>*map);
  30. public slots:
  31. void exitRequested();
  32. void maximizeRequested();
  33. void changeViewRequested(QAction * view);
  34. void changeView();
  35. void setItemWidget(QString, QWidget *);
  36. void setOverlayStatus(QString path, int status=ListViewDelegate::FileModified);
  37. void removeOverlayStatus(QString path);
  38. void addToolButtonButton(QToolButton *btn);
  39. //void addToolButtonSeparator(QToolButton);
  40. //void removeFromToolButton(QToolButton *btn);
  41. void addContextMenuAction(QAction *action);
  42. void addContextMenuMenu(QMenu *menu);
  43. void addContextMenuSeparator();
  44. void removeFromContextMenu(int index);
  45. /*void setContextMenuActionEnabled(QAction *action, bool enable);
  46. void setContextMenuActionVisible(QAction *action, bool enable);
  47. */
  48. };
  49. #endif // DBROWSER_H