123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- #ifndef CONTEXTMENU_H
- #define CONTEXTMENU_H
- #include <QMenu>
- class ContextMenu : public QMenu
- {
- Q_OBJECT
- public:
-
-
- explicit ContextMenu(QWidget *parent = 0);
-
-
- void addContextMenuAction(QAction *action);
-
-
- void addContextMenuMenu(QMenu *menu);
-
-
- void addContextMenuSeparator();
-
-
- void removeFromContextMenu(QAction *action);
-
-
- QList <QAction *> contextMenuActions();
-
-
- void setNewFolderEnabled(bool);
-
-
- void setPasteEnabled(bool);
-
-
- void setDeleteEnabled(bool);
-
-
- void setRenameEnabled(bool);
-
-
- void setOpenEnabled(bool);
- private:
-
- QMenu *fbNewMenu;
-
- QAction *open;
-
- QAction *del;
-
- QAction *copy;
-
- QAction *cut;
-
- QAction *paste;
-
- QAction *rename;
-
- QAction *addFolder;
- signals:
-
- void openTriggered();
-
- void copyTriggered();
-
- void cutTriggered();
-
- void pasteTriggered();
-
- void deleteTriggered();
-
- void renameTriggered();
-
- void createFolderTriggered();
- public slots:
- };
- #endif
|