From 84da08d7b7fcda12c85caeb5a10b4903770a6f69 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun-plugins/oblique/menu.h | 99 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 noatun-plugins/oblique/menu.h (limited to 'noatun-plugins/oblique/menu.h') diff --git a/noatun-plugins/oblique/menu.h b/noatun-plugins/oblique/menu.h new file mode 100644 index 0000000..793180c --- /dev/null +++ b/noatun-plugins/oblique/menu.h @@ -0,0 +1,99 @@ +// 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 + QValueList mFiles; + +public: + FileMenu(QWidget *parent, Oblique *oblique, File file); + /** + * @recursively uses everything under @p files + **/ + FileMenu(QWidget *parent, Oblique *oblique, TreeItem *files); + +private slots: + void removeFromList(); + void properties(); + void toggleInSlice(Slice *slice); +}; + +class SliceListAction : public KActionMenu +{ +Q_OBJECT + QMap mIndexToSlices; + QValueList mFiles; + Oblique *mOblique; + +public: + SliceListAction( + const QString &text, Oblique *oblique, + QObject *reciever, const char *slot, + const QValueList &files = QValueList(), QObject *parent=0, const char *name=0 + ); + +signals: + void activated(Slice *slice); + +private slots: + void hit(int index); + void slicesModified(); +}; + + +class SchemaListAction : public KActionMenu +{ +Q_OBJECT + QMap mIndexToSchemas; + Tree *mTree; + +public: + SchemaListAction( + const QString &text, + QObject *reciever, const char *slot, + QObject *parent, const char *name + ); + + void setTree(Tree *tree) { mTree = tree; } + +signals: + void activated(const QString &); + +private slots: + void hit(int index); + void prepare(); +}; + + +class ObliquePropertiesDialog : public KPropertiesDialog +{ +Q_OBJECT + QValueList mFiles; + +public: + ObliquePropertiesDialog(const QValueList &files, QWidget *parent); + +private: + static KFileItemList makeItems(const QValueList &files); + +private slots: + void modified(); +}; + + +#endif + -- cgit v1.2.1