InfGtk.BrowserModel¶
- Implementations:
InfGtk.BrowserModelFilter
,InfGtk.BrowserModelSort
,InfGtk.BrowserStore
Methods¶
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
---|---|
This signal is emitted every time the |
Fields¶
None
Class Details¶
- class InfGtk.BrowserModel¶
- Bases:
- Structure:
InfGtk.BrowserModel
is an opaque data type. You should only access it via the public API functions.- browser_iter_to_tree_iter(browser, iter)¶
- Parameters:
browser (
Infinity.Browser
) – AInfinity.Browser
.iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing into browser, orNone
.
- Returns:
Whether tree_iter was set.
- tree_iter:
A
Gtk.TreeIter
that will be set by this function.
- Return type:
(
bool
, tree_iter:Gtk.TreeIter
)
Sets tree_iter to point to the same node iter refers to within the model. If browser is not known to self, i.e. its connection was never added to self, then the function returns
False
and tree_iter is left untouched.If iter is
None
, the function sets tree_iter to point to the top level entry representing browser.
- resolve(discovery, info)¶
- Parameters:
discovery (
Infinity.Discovery
) – AInfinity.Discovery
added to store.info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by discovery.
Resolves info and adds the resulting connection to the model. If that connection is already contained, the original (newly resolved) entry is removed in favor of the existing entry whose browser might already have explored (parts of) the server’s directory.
- set_browser(path, iter, old_browser, new_browser)¶
- Parameters:
path (
Gtk.TreePath
) – AGtk.TreePath
to a top-level row.iter (
Gtk.TreeIter
) – AGtk.TreeIter
pointing to the same row.old_browser (
Infinity.Browser
) – The browser which was set at this row before.new_browser (
Infinity.Browser
) – The newInfinity.Browser
to set for this row.
Emits the
InfGtk.BrowserModel
::set-browser
signal. This is supposed to only be called by implementations ofInfGtk.BrowserModel
whenever they set or unset a browser on a row.
- do_browser_iter_to_tree_iter(browser, iter) virtual¶
- Parameters:
browser (
Infinity.Browser
) – AInfinity.Browser
.iter (
Infinity.BrowserIter
) – AInfinity.BrowserIter
pointing into browser, orNone
.
- Returns:
Whether tree_iter was set.
- tree_iter:
A
Gtk.TreeIter
that will be set by this function.
- Return type:
(
bool
, tree_iter:Gtk.TreeIter
)
Sets tree_iter to point to the same node iter refers to within the model. If browser is not known to model, i.e. its connection was never added to model, then the function returns
False
and tree_iter is left untouched.If iter is
None
, the function sets tree_iter to point to the top level entry representing browser.
- do_resolve(discovery, info) virtual¶
- Parameters:
discovery (
Infinity.Discovery
) – AInfinity.Discovery
added to store.info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by discovery.
Resolves info and adds the resulting connection to the model. If that connection is already contained, the original (newly resolved) entry is removed in favor of the existing entry whose browser might already have explored (parts of) the server’s directory.
- do_set_browser(path, iter, old_browser, new_browser) virtual¶
- Parameters:
path (
Gtk.TreePath
) – AGtk.TreePath
to a top-level row.iter (
Gtk.TreeIter
) – AGtk.TreeIter
pointing to the same row.old_browser (
Infinity.Browser
) – The browser which was set at this row before.new_browser (
Infinity.Browser
) – The newInfinity.Browser
to set for this row.
Emits the
InfGtk.BrowserModel
::set-browser
signal. This is supposed to only be called by implementations ofInfGtk.BrowserModel
whenever they set or unset a browser on a row.
Signal Details¶
- InfGtk.BrowserModel.signals.set_browser(browser_model, path, iter, old_browser, new_browser)¶
- Signal Name:
set-browser
- Flags:
- Parameters:
browser_model (
InfGtk.BrowserModel
) – The object which received the signalpath (
Gtk.TreePath
) – AGtk.TreePath
pointing to the item with a new browesr.iter (
Gtk.TreeIter
) – AGtk.TreeIter
pointing to the item with a new browser.old_browser (
Infinity.Browser
) – The previousInfinity.Browser
.new_browser (
Infinity.Browser
) – The newInfinity.Browser
.
This signal is emitted every time the
Infinity.Browser
for one of the model’s top-level entries change. This means either that a completely new item was inserted, that an item providing only a discovery has been resolved (seeInfGtk.BrowserModel.resolve
()), or that a top-level entry has been removed.During emission of the signal the actual value in the model might either be the old or the new browser.