┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.h
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2008-05-05 00:42:33 +0000
committerDavid Faure <[email protected]>2008-05-05 00:42:33 +0000
commitba509a3be33e6221406c91d0c0be208acf75d82a (patch)
treeccc1c607cd39e979a9f84623b6cd537b3ca44c38 /src/dolphinpart.h
parentfd98230020bdbdd051bbb11193a61097f169479b (diff)
Re-enable name filtering (e.g. /home/dfaure/*.txt) in konqueror
svn path=/trunk/KDE/kdebase/apps/; revision=804094
Diffstat (limited to 'src/dolphinpart.h')
-rw-r--r--src/dolphinpart.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dolphinpart.h b/src/dolphinpart.h
index 3ef654039..cca1d7135 100644
--- a/src/dolphinpart.h
+++ b/src/dolphinpart.h
@@ -45,6 +45,9 @@ class DolphinPart : public KParts::ReadOnlyPart
Q_PROPERTY( QString currentViewMode READ currentViewMode WRITE setCurrentViewMode )
+ // Used by konqueror when typing something like /home/dfaure/*.diff in the location bar
+ Q_PROPERTY( QString nameFilter READ nameFilter WRITE setNameFilter )
+
public:
explicit DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args);
~DolphinPart();
@@ -77,6 +80,16 @@ public:
/// Returns the view owned by this part; used by DolphinPartBrowserExtension
DolphinView* view() { return m_view; }
+ /**
+ * Sets a name filter, like *.diff
+ */
+ void setNameFilter(const QString& nameFilter);
+
+ /**
+ * Returns the current name filter. Used by konqueror to show it in the URL.
+ */
+ QString nameFilter() const { return m_nameFilter; }
+
protected:
/**
* We reimplement openUrl so no need to implement openFile.
@@ -167,6 +180,7 @@ private:
DolphinModel* m_dolphinModel;
DolphinSortFilterProxyModel* m_proxyModel;
DolphinPartBrowserExtension* m_extension;
+ QString m_nameFilter;
Q_DISABLE_COPY(DolphinPart)
};