Created on May 22, 2010
@author: tw55413
Bases: object
Bases: PyQt4.QtGui.QLabel, camelot.view.controls.action_widget.AbstractActionWidget
A custom interactive desktop button for the desktop. Each ‘button’ is actually an animated label.
Actions box
Bases: PyQt4.QtGui.QWidget
A box containing actions to be applied to a view
Parameters: |
|
---|
Encapsulates various ms office schemes
Bases: object
Bases: PyQt4.QtGui.QLabel
Bases: camelot.view.controls.dashboard.BareFrame
Bases: PyQt4.QtGui.QLineEdit
A QLineEdit with additional decorations :
- a background text, visible when the line edit doesn’t contain any text
- a validity, which will trigger the background color
Use the user_input method to get the text that was entered by the user.
Note : since QT 4.7 the background text could be replaced with the setPlaceholderText on a QLineEdit
Set the text to be displayed in the background when the line input does not contain any text :param background_text: the text to be shown, None if no text should be shown
Set the minimum width of the line edit, measured in number of characters. :param width: the number of characters that should be visible in the
editor
Functions and widget to represent exceptions to the user
Bases: PyQt4.QtGui.QMessageBox
Dialog to display an exception to the user
Display an exception that occurred in the model thread in a message box, use this function as the exception argument in the model thread’s post function to represent the exception to the user
Parameters: | exception_info – a tuple containing exception information |
---|
Log an exception and return a serialized form of the exception with exception information in a user readable format, to be used when displaying an exception message box.
that serialized form can be fed to the model_thread_exception_message_box function.
Returns: | a tuple with exception information |
---|
Bases: object
Helper class representing a field attribute’s name and its value
Bases: camelot.admin.object_admin.ObjectAdmin
Bases: camelot.view.controls.user_translatable_label.UserTranslatableLabel
A Label widget used to display the name of a field on a form. This label provides the user with the possibility to change the translation of the label and review its field attributes.
Bases: PyQt4.QtGui.QWidget
Widget that allows applying various filter operators on a field
Whenever the combobox changes, show or hide the appropriate editors and emit the filter_changed signal
Parameters: | query – an sqlalchemy query |
---|---|
Returns: | the input query transformed to take into account the filter of |
this widget
Whenever one of the editors their value changes, emit the filters changed signal
Controls to filter data
form view
Bases: PyQt4.QtGui.QAction
Bases: object
A class that holds the editors used on a form
Bases: camelot.view.controls.view.AbstractView
A FormView is the combination of a FormWidget, possible actions and menu items
view
alias of FormWidget
Controls related to visualizing object hierarchy
Bases: PyQt4.QtGui.QDialog
A dialog requesting the user to select a subclass
Bases: camelot.view.controls.modeltree.ModelTree
Widget to select subclasses of a certain entity, where the subclasses are represented in a tree
emits subclassClicked when a subclass has been selected
Bases: PyQt4.QtGui.QGraphicsPixmapItem
custom tree and tree-items widgets
Bases: PyQt4.QtGui.QTreeWidgetItem
Custom tree item widget
Functions and classes to use a progress dialog in combination with a model thread
Bases: PyQt4.QtGui.QProgressDialog
A Progress Dialog to be used in combination with a post to the model thread:
to display a progress dialog until my_function has finished:
d = ProgressDialog()
post(my_function, d.finished, d.exception)
d.exec_()
Bases: camelot.view.controls.abstract_widget.AbstractSearchWidget
A control that displays a single text field in which search keywords can be typed
emits a search and a cancel signal if the user starts or cancels the search
Bases: PyQt4.QtGui.QFrame
A custom status bar containing a progress indicator
Tableview
Bases: camelot.view.controls.tableview.TableWidget
A table widget that inspects the admin class and changes the behavior of the table as specified in the admin class
Bases: PyQt4.QtGui.QTableView
A table widget to be used as the frozen table widget inside a table widget.
Bases: PyQt4.QtGui.QWidget
HeaderWidget for a tableview, containing the title, the search widget, and the number of rows in the table
alias of RowsWidget
alias of SimpleSearchControl
Bases: PyQt4.QtGui.QLabel
Widget that is part of the header widget, displaying the number of rows in the table view
Bases: PyQt4.QtGui.QSplitter
Custom implementation of QSplitter to use the custom SplitterHandle
Bases: PyQt4.QtGui.QSplitterHandle
Custom implementation of QSplitterHandle to provide more functions, such as hiding a widget by clicking the handle
Bases: camelot.view.controls.view.AbstractView
A generic tableview widget that puts together some other widgets. The behaviour of this class and the resulting interface can be tuned by specifying specific class attributes which define the underlying widgets used
class MovieRentalTableView(TableView):
title_format = 'Grand overview of recent movie rentals'
The attributes that can be specified are :
The widget class to be used as a header in the table view:
header_widget = HeaderWidget
The widget class used to display a table within the table view
table_widget = TableWidget
A string used to format the title of the view
title_format = ‘%(verbose_name_plural)s’
A class implementing QAbstractTableModel that will be used as a model for the table view
table_model = QueryTableProxy
Bases: camelot.view.controls.tableview.TableWidget
A table widget that inspects the admin class and changes the behavior of the table as specified in the admin class
Returns: | a list with all the objects corresponding to the rows in the table |
---|
Returns: | a function that when called return an iterable with all the |
---|
objects corresponding to the selected rows in the table.
alias of HeaderWidget
Switch to a different subclass, where admin is the admin object of the subclass
alias of QueryTableProxy
Bases: PyQt4.QtGui.QTableView
A widget displaying a table, to be used within a TableView. This is a pumped up version of the QTableView widget providing extra functions such as frozen columns. But it does not rely on the model being Camelot specific, or a Collection Proxy.
margin, specified as a number of pixels, used to calculate the height of a row in the table, the minimum row height will allow for this number of pixels below and above the text.
Close the active editor, this method is used to prevent assertion failures in QT when an editor is still open in the view for a cell that no longer exists in the model
those assertion failures only exist in QT debug builds.
Bases: PyQt4.QtGui.QAction
Functionality common to TableViews and FormViews
Bases: PyQt4.QtGui.QWidget
A string used to format the title of the view :: title_format = ‘Movie rental overview’
The widget class to be used as a header in the table view:
header_widget = None
Bases: camelot.view.controls.view.AbstractView
Class to combine multiple views in Tabs and let them behave as one view. This class can be used when defining custom create_table_view methods on an ObjectAdmin class to group multiple table views together in one view.