explicit DolphinController(QObject* parent);
virtual ~DolphinController();
- inline void setUrl(const KUrl& url);
+ /** Sets the URL to \a url and emits the signal urlChanged(). */
+ void setUrl(const KUrl& url);
inline const KUrl& url() const;
void triggerContextMenuRequest(const QPoint& pos);
void emitViewportEntered();
signals:
+ /**
+ * Is emitted if the URL for the Dolphin controller has been changed
+ * to \a url.
+ */
+ void urlChanged(const KUrl& url);
+
/**
* Is emitted if a context menu should be opened.
* @param pos Position relative to the view widget where the
* Is emitted if the item with the index \a index should be triggered.
* Usually triggering on a directory opens the directory, triggering
* on a file opens the corresponding application.
+ * Emitted with an invalid \a index when clicking on the viewport itself.
*/
void itemTriggered(const QModelIndex& index);
KUrl m_url;
};
-void DolphinController::setUrl(const KUrl& url)
-{
- m_url = url;
-}
-
const KUrl& DolphinController::url() const
{
return m_url;