/***************************************************************************
* Copyright (C) 2006 by Cvetoslav Ludmiloff <ludmiloff@gmail.com> *
- * Copyright (C) 2006-2010 by Peter Penz <peter.penz@gmx.at> *
+ * Copyright (C) 2006-2010 by Peter Penz <peter.penz19@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
#ifndef PANEL_H
#define PANEL_H
-#include <QtGui/QWidget>
-#include <kurl.h>
-#include <kfileitem.h>
+#include <QWidget>
+#include <KUrl>
+#include <KFileItem>
/**
* @brief Base widget for all panels that can be docked on the window borders.
+ *
+ * Derived panels should provide a context menu that at least offers the
+ * actions from Panel::customContextMenuActions().
*/
class Panel : public QWidget
{
/** Returns the current set URL of the active Dolphin view. */
KUrl url() const;
+ /**
+ * Sets custom context menu actions that are added to the panel specific
+ * context menu actions. Allows an application to apply custom actions to
+ * the panel.
+ */
+ void setCustomContextMenuActions(const QList<QAction*>& actions);
+ QList<QAction*> customContextMenuActions() const;
+
+ /** @see QWidget::sizeHint() */
+ virtual QSize sizeHint() const;
+
public slots:
/**
* This is invoked every time the folder being displayed in the
private:
KUrl m_url;
+ QList<QAction*> m_customContextMenuActions;
};
#endif // PANEL_H