1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681
|
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<title>API docs for “kiwi.ui.objectlist.Column”</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<link href="apidocs.css" type="text/css" rel="stylesheet" />
</head>
<body>
<h1 class="class">Class k.u.o.Column(<a href="kiwi.utils.PropertyObject.html">PropertyObject</a>, <span title="gobject.GObject">gobject.GObject</span>):</h1>
<p>
<span id="part">Part of <a href="kiwi.html">kiwi</a>.<a href="kiwi.ui.html">ui</a>.<a href="kiwi.ui.objectlist.html">objectlist</a></span>
<a href="classIndex.html#kiwi.ui.objectlist.Column">View In Hierarchy</a>
</p>
<div>
<p>Known subclasses: <a href="kiwi.ui.objectlist.ColoredColumn.html">kiwi.ui.objectlist.ColoredColumn</a>, <a href="kiwi.ui.objectlist.SequentialColumn.html">kiwi.ui.objectlist.SequentialColumn</a></p>
</div>
<div>Specifies a column for an <a
href="kiwi.ui.objectlist.ObjectList.html"><code>ObjectList</code></a>, see
the ObjectList documentation for a simple example.
<h1 class="heading">Properties</h1>
<ul>
<li>
<b>title</b>: string <i>mandatory</i>
<ul>
<li>
the title of the column, defaulting to the capitalized form of
the attribute
</li>
</ul>
</li>
<li>
<b>data-type</b>: object <i>str</i>
<ul>
<li>
the type of the attribute that will be inserted into the
column. Supported data types: bool, int, float, str, unicode,
decimal.Decimal, datetime.date, datetime.time, datetime.datetime,
gtk.gdk.Pixbuf, <a
href="kiwi.currency.currency.html"><code>kiwi.currency.currency</code></a>,
<a
href="kiwi.python.enum.html"><code>kiwi.python.enum</code></a>.
</li>
</ul>
</li>
<li>
<b>visible</b>: bool <i>True</i>
<ul>
<li>
specifying if it is initially hidden or shown.
</li>
</ul>
</li>
<li>
<b>justify</b>: gtk.Justification <i>None</i>
<ul>
<li>
one of gtk.JUSTIFY_LEFT, gtk.JUSTIFY_RIGHT or
gtk.JUSTIFY_CENTER or None. If None, the justification will be
determined by the type of the attribute value of the first
instance to be inserted in the ObjectList (for instance numbers
will be right-aligned).
</li>
</ul>
</li>
<li>
<b>format</b>: string <i>""</i>
<ul>
<li>
a format string to be applied to the attribute value upon
insertion in the list.
</li>
</ul>
</li>
<li>
<b>width</b>: integer <i>65535</i>
<ul>
<li>
the width in pixels of the column, if not set, uses the
default to ObjectList. If no Column specifies a width,
columns_autosize() will be called on the ObjectList upon append()
or the first add_list().
</li>
</ul>
</li>
<li>
<b>sorted</b>: bool <i>False</i>
<ul>
<li>
whether or not the ObjectList is to be sorted by this column.
If no Columns are sorted, the ObjectList will be created
unsorted.
</li>
</ul>
</li>
<li>
<b>order</b>: GtkSortType <i>-1</i>
<ul>
<li>
one of gtk.SORT_ASCENDING, gtk.SORT_DESCENDING or -1 The value
-1 is mean that the column is not sorted.
</li>
</ul>
</li>
<li>
<b>expand</b>: bool <i>False</i>
<ul>
<li>
if set column will expand. Note: this space is shared equally
amongst all columns that have the expand set to True.
</li>
</ul>
</li>
<li>
<b>tooltip</b>: string <i>""</i>
<ul>
<li>
a string which will be used as a tooltip for the column
header
</li>
</ul>
</li>
<li>
<b>format_func</b>: object <i>None</i>
<ul>
<li>
a callable which will be used to format the output of a
column. The function will take one argument which is the value to
convert and is expected to return a string. <i>Note</i>: that you
cannot use format and format_func at the same time, if you
provide a format function you'll be responsible for converting
the value to a string.
</li>
</ul>
</li>
<li>
<b>editable</b>: bool <i>False</i>
<ul>
<li>
if true the field is editable and when you modify the contents
of the cell the model will be updated.
</li>
</ul>
</li>
<li>
<b>searchable</b>: bool <i>False</i>
<ul>
<li>
if true the attribute values of the column can be searched
using type ahead search. Only string attributes are currently
supported.
</li>
</ul>
</li>
<li>
<b>radio</b>: bool <i>False</i>
<ul>
<li>
If true render the column as a radio instead of toggle. Only
applicable for columns with boolean data types.
</li>
</ul>
</li>
<li>
<b>spin_adjustment</b>: gtk.Adjustment <i>None</i>
<ul>
<li>
A gtk.Adjustment instance. If set, render the column cell as a
spinbutton.
</li>
</ul>
</li>
<li>
<b>use_stock</b>: bool <i>False</i>
<ul>
<li>
If true, this will be rendered as pixbuf from the value which
should be a stock id.
</li>
</ul>
</li>
<li>
<b>icon_size</b>: gtk.IconSize <i>gtk.ICON_SIZE_MENU</i>
</li>
<li>
<b>editable_attribute</b>: string <i>""</i>
<ul>
<li>
a string which is the attribute which should decide if the
cell is editable or not.
</li>
</ul>
</li>
<li>
<b>use_markup</b>: bool <i>False</i>
<ul>
<li>
If true, the text will be rendered with markup
</li>
</ul>
</li>
<li>
<b>expander</b>: bool <i>False</i>
<ul>
<li>
If True, this column will be used as the tree expander
column
</li>
</ul>
</li>
<li>
<b>ellipsize</b>: pango.EllipsizeMode
<i>pango.ELLIPSIZE_NONE</i>
<ul>
<li>
One of pango.ELLIPSIZE_{NONE, START, MIDDLE_END}, it describes
where characters should be removed in case ellipsization (where
to put the ...) is needed.
</li>
</ul>
</li>
<li>
<b>font-desc</b>: str <i>""</i>
<ul>
<li>
A string passed to pango.FontDescription, for instance
"Sans" or
</li>
</ul>
</li>
<li>
<b>column</b>: str None
<ul>
<li>
A string referencing to another column. If this is set a new
column will not be created and the column will be packed into the
other.
</li>
</ul>
</li>
</ul>
<table class="fieldTable"></table></div>
<div id="splitTables">
<table class="children sortable" id="id245">
<tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#__init__">__init__</a></td>
<td><span>Creates a new Column, which describes how a column in a
</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#__repr__">__repr__</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#prop_set_data_type">prop_set_data_type</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#attach">attach</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_guess_renderer_for_type">_guess_renderer_for_type</a></td>
<td><span>Gusses which CellRenderer we should use for a given type.
</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_cell_data_text_func">_cell_data_text_func</a></td>
<td><span>To render the data of a cell renderer text
</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_cell_data_pixbuf_func">_cell_data_pixbuf_func</a></td>
<td><span>To render the data of a cell renderer pixbuf
</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_cell_data_combo_func">_cell_data_combo_func</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_cell_data_spin_func">_cell_data_spin_func</a></td>
<td><span>To render the data of a cell renderer spin
</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_on_renderer__toggled">_on_renderer__toggled</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_on_renderer_toggle_check__toggled">_on_renderer_toggle_check__toggled</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_on_renderer_toggle_radio__toggled">_on_renderer_toggle_radio__toggled</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_on_renderer_text__edited">_on_renderer_text__edited</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_on_renderer_spin__edited">_on_renderer_spin__edited</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_on_renderer_combo__edited">_on_renderer_combo__edited</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#_on_renderer__edited">_on_renderer__edited</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#as_string">as_string</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.objectlist.Column.html#set_spinbutton_precision_digits">set_spinbutton_precision_digits</a></td>
<td><span>Set the number of precision digits to be shown in the
</span></td>
</tr>
</table>
<p>
Inherited from <a href="kiwi.utils.PropertyObject.html">PropertyObject</a>:
</p>
<table class="children sortable" id="id246">
<tr class="baseclassmethod">
<td>Class Method</td>
<td><a href="kiwi.utils.PropertyObject.html#__class_init__">__class_init__</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="basemethod">
<td>Method</td>
<td><a href="kiwi.utils.PropertyObject.html#__post_init__">__post_init__</a></td>
<td><span>A hook which is called after the constructor is called.
</span></td>
</tr><tr class="basemethod">
<td>Method</td>
<td><a href="kiwi.utils.PropertyObject.html#_set">_set</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="basemethod">
<td>Method</td>
<td><a href="kiwi.utils.PropertyObject.html#_get">_get</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="basemethod">
<td>Method</td>
<td><a href="kiwi.utils.PropertyObject.html#get_attribute_names">get_attribute_names</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="basemethod">
<td>Method</td>
<td><a href="kiwi.utils.PropertyObject.html#is_default_value">is_default_value</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="basemethod">
<td>Method</td>
<td><a href="kiwi.utils.PropertyObject.html#do_set_property">do_set_property</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="basemethod">
<td>Method</td>
<td><a href="kiwi.utils.PropertyObject.html#do_get_property">do_get_property</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr>
</table>
</div>
<div class="function">
<a name="kiwi.ui.objectlist.Column.__init__"></a>
<a name="__init__"></a>
<div class="functionHeader">
def __init__(self, attribute='', title=None, data_type=None, **kwargs):
</div>
<div class="functionBody">
<div class="interfaceinfo">overrides <a href="kiwi.utils.PropertyObject.html#__init__">kiwi.utils.PropertyObject.__init__</a></div><div class="interfaceinfo">overridden in <a href="kiwi.ui.objectlist.ColoredColumn.html">kiwi.ui.objectlist.ColoredColumn</a>, <a href="kiwi.ui.objectlist.SequentialColumn.html">kiwi.ui.objectlist.SequentialColumn</a></div>
<div>Creates a new Column, which describes how a column in a ObjectList
should be rendered.
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">attribute</td><td>a string with the name of the instance attribute the column
represents.
</td></tr><tr><td></td><td class="fieldArg">title</td><td>the title of the column, defaulting to the capitalized form of the
attribute.
</td></tr><tr><td></td><td class="fieldArg">data_type</td><td>the type of the attribute that will be inserted into the column.
</td></tr><tr class="fieldStart"><td class="fieldName">Note</td><td colspan="2">title_pixmap: (TODO) if set to a filename a pixmap will be used
*instead* of the title set. The title string will still be used to identify
the column in the column selection and in a tooltip, if a tooltip is not
set.
</td></tr></table></div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column.__repr__"></a>
<a name="__repr__"></a>
<div class="functionHeader">
def __repr__(self):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column.prop_set_data_type"></a>
<a name="prop_set_data_type"></a>
<div class="functionHeader">
def prop_set_data_type(self, data):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column.attach"></a>
<a name="attach"></a>
<div class="functionHeader">
def attach(self, objectlist):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._guess_renderer_for_type"></a>
<a name="_guess_renderer_for_type"></a>
<div class="functionHeader">
def _guess_renderer_for_type(self, model):
</div>
<div class="functionBody">
<div>Gusses which CellRenderer we should use for a given type. It also set
the property of the renderer that depends on the model, in the
renderer.
<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._cell_data_text_func"></a>
<a name="_cell_data_text_func"></a>
<div class="functionHeader">
def _cell_data_text_func(self, tree_column, renderer, model, treeiter, (column, renderer_prop)):
</div>
<div class="functionBody">
<div>To render the data of a cell renderer text
<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._cell_data_pixbuf_func"></a>
<a name="_cell_data_pixbuf_func"></a>
<div class="functionHeader">
def _cell_data_pixbuf_func(self, tree_column, renderer, model, treeiter, (column, renderer_prop)):
</div>
<div class="functionBody">
<div>To render the data of a cell renderer pixbuf
<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._cell_data_combo_func"></a>
<a name="_cell_data_combo_func"></a>
<div class="functionHeader">
def _cell_data_combo_func(self, tree_column, renderer, model, treeiter, (column, renderer_prop)):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._cell_data_spin_func"></a>
<a name="_cell_data_spin_func"></a>
<div class="functionHeader">
def _cell_data_spin_func(self, tree_column, renderer, model, treeiter, (column, renderer_prop)):
</div>
<div class="functionBody">
<div>To render the data of a cell renderer spin
<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._on_renderer__toggled"></a>
<a name="_on_renderer__toggled"></a>
<div class="functionHeader">
def _on_renderer__toggled(self, renderer, path, column):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._on_renderer_toggle_check__toggled"></a>
<a name="_on_renderer_toggle_check__toggled"></a>
<div class="functionHeader">
def _on_renderer_toggle_check__toggled(self, renderer, path, model, attr):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._on_renderer_toggle_radio__toggled"></a>
<a name="_on_renderer_toggle_radio__toggled"></a>
<div class="functionHeader">
def _on_renderer_toggle_radio__toggled(self, renderer, path, model, attr):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._on_renderer_text__edited"></a>
<a name="_on_renderer_text__edited"></a>
<div class="functionHeader">
def _on_renderer_text__edited(self, renderer, path, text, model, attr, column, from_string):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._on_renderer_spin__edited"></a>
<a name="_on_renderer_spin__edited"></a>
<div class="functionHeader">
def _on_renderer_spin__edited(self, renderer, path, value, model, attr, column, from_string):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._on_renderer_combo__edited"></a>
<a name="_on_renderer_combo__edited"></a>
<div class="functionHeader">
def _on_renderer_combo__edited(self, renderer, path, text, model, attr, column):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column._on_renderer__edited"></a>
<a name="_on_renderer__edited"></a>
<div class="functionHeader">
def _on_renderer__edited(self, renderer, path, value, column):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column.as_string"></a>
<a name="as_string"></a>
<div class="functionHeader">
def as_string(self, data):
</div>
<div class="functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.ui.objectlist.Column.set_spinbutton_precision_digits"></a>
<a name="set_spinbutton_precision_digits"></a>
<div class="functionHeader">
def set_spinbutton_precision_digits(self, digits):
</div>
<div class="functionBody">
<div>Set the number of precision digits to be shown in the spinbutton.
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">digits</td><td>the number of precision digits to be set in spinbutton
(type: int
)</td></tr></table></div>
</div>
</div>
<address>
<a href="index.html">API Documentation</a> for Kiwi, generated by <a href="http://codespeak.net/~mwh/pydoctor/">pydoctor</a> at 2008-05-29 16:06:17.
</address>
</body>
</html>
|