// Copyright (c) 2003 Charles Samuels // See the file COPYING for redistribution terms. #ifndef MENU_H #define MENU_H #include #include #include #include "file.h" #include "oblique.h" /** * a context menu for a item in the list **/ class FileMenu : public KPopupMenu { Q_OBJECT TQ_OBJECT TQValueList mFiles; public: FileMenu(TQWidget *tqparent, Oblique *oblique, File file); /** * @recursively uses everything under @p files **/ FileMenu(TQWidget *tqparent, Oblique *oblique, TreeItem *files); private slots: void removeFromList(); void properties(); void toggleInSlice(Slice *slice); }; class SliceListAction : public KActionMenu { Q_OBJECT TQ_OBJECT TQMap mIndexToSlices; TQValueList mFiles; Oblique *mOblique; public: SliceListAction( const TQString &text, Oblique *oblique, TQObject *reciever, const char *slot, const TQValueList &files = TQValueList(), TQObject *tqparent=0, const char *name=0 ); signals: void activated(Slice *slice); private slots: void hit(int index); void slicesModified(); }; class SchemaListAction : public KActionMenu { Q_OBJECT TQ_OBJECT TQMap mIndexToSchemas; Tree *mTree; public: SchemaListAction( const TQString &text, TQObject *reciever, const char *slot, TQObject *tqparent, const char *name ); void setTree(Tree *tree) { mTree = tree; } signals: void activated(const TQString &); private slots: void hit(int index); void prepare(); }; class ObliquePropertiesDialog : public KPropertiesDialog { Q_OBJECT TQ_OBJECT TQValueList mFiles; public: ObliquePropertiesDialog(const TQValueList &files, TQWidget *tqparent); private: static KFileItemList makeItems(const TQValueList &files); private slots: void modified(); }; #endif