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.BrowserModelis 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.BrowserIterpointing into browser, orNone.
- Returns:
Whether tree_iter was set.
- tree_iter:
A
Gtk.TreeIterthat 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
Falseand 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.Discoveryadded to store.info (
Infinity.DiscoveryInfo) – AInfinity.DiscoveryInfodiscovered 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.TreePathto a top-level row.iter (
Gtk.TreeIter) – AGtk.TreeIterpointing to the same row.old_browser (
Infinity.Browser) – The browser which was set at this row before.new_browser (
Infinity.Browser) – The newInfinity.Browserto set for this row.
Emits the
InfGtk.BrowserModel::set-browsersignal. This is supposed to only be called by implementations ofInfGtk.BrowserModelwhenever 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.BrowserIterpointing into browser, orNone.
- Returns:
Whether tree_iter was set.
- tree_iter:
A
Gtk.TreeIterthat 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
Falseand 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.Discoveryadded to store.info (
Infinity.DiscoveryInfo) – AInfinity.DiscoveryInfodiscovered 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.TreePathto a top-level row.iter (
Gtk.TreeIter) – AGtk.TreeIterpointing to the same row.old_browser (
Infinity.Browser) – The browser which was set at this row before.new_browser (
Infinity.Browser) – The newInfinity.Browserto set for this row.
Emits the
InfGtk.BrowserModel::set-browsersignal. This is supposed to only be called by implementations ofInfGtk.BrowserModelwhenever 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.TreePathpointing to the item with a new browesr.iter (
Gtk.TreeIter) – AGtk.TreeIterpointing 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.Browserfor 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.