GridEditor Class
GridEditor virtual abstact class that describes the grid editor interface. More...
Header: | #include <GridEditor> |
Inherits: | QObject |
Inherited By: |
Public Types
flags | ActivationPolicy |
enum | ActivationPolicyFlag { NotActivate, ActivateByClickNoFocused, ActivateByClickFocused, ActivateByClick, ActivateByMousePressNoFocused, …, ActivateByAnyEvents } |
enum | Type { Auto, String, Memo, ComboBoxBlob, Numeric, …, Custom } |
Detailed Description
Member Type Documentation
enum GridEditor::ActivationPolicyFlag
flags GridEditor::ActivationPolicy
Enumerator ActivationPolicyFlag describes the policy of activating the edit mode of the cell editor if the cell gets the focus. You can group the policy on your own using logical OR.
Constant | Value | Description |
---|---|---|
GridEditor::NotActivate | 0x0000 | Blank value. The editing mode may not be enabled. The cell can not be edited. |
GridEditor::ActivateByClickNoFocused | 0x0001 | Edit mode of the cell editor is activated if you click on a cell that has no focus. |
GridEditor::ActivateByClickFocused | 0x0002 | Edit mode of the cell editor is activated if you click on a cell that already has focus. |
GridEditor::ActivateByClick | ActivateByClickNoFocused | ActivateByClickFocused | Edit mode of the cell editor is activated if you click on a cell. This policy does not depend on whether the cell has focus or not. Editor always activated when was a click on a cell. |
GridEditor::ActivateByMousePressNoFocused | 0x0004 | Edit mode of the cell editor is activated if you press mouse on a cell that has no focus. |
GridEditor::ActivateByMousePressFocused | 0x0008 | Edit mode of the cell editor is activated if you press mouse on a cell that already has focus. |
GridEditor::ActivateByMousePress | ActivateByMousePressNoFocused | ActivateByMousePressFocused | Edit mode of the cell editor is activated if you press mouse on a cell. This policy does not depend on whether the cell has focus or not. Editor always activated when was a mouse press (mouse down) on a cell. |
GridEditor::ActivateByDblClickNoFocused | 0x0010 | Edit mode of the cell editor is activated if you double-click on a cell that has no focus. |
GridEditor::ActivateByDblClickFocused | 0x0020 | Edit mode of the cell editor is activated if you double-click on a cell that already has focus. |
GridEditor::ActivateByDblClick | ActivateByDblClickNoFocused | ActivateByDblClickFocused | Edit mode of the cell editor is activated if you double-click on a cell. This policy does not depend on whether the cell has focus or not. Editor always activated when was a double-click on a cell. |
GridEditor::ActivateByKeyboardFocus | 0x0040 | The cell becomes in the edit state if the focus was acquired by the keyboard (for instance by pressing the navigation buttons Up, Down, Left, Right etc). |
GridEditor::ActivateByKeyPress | 0x0080 | The cell becomes in the edit state if the any key was pressed while cell has focus and is not in the edit state. You can filtering the value of the key by using the editorEditingStarting() signal. |
GridEditor::ActivateByEnter | 0x0100 | The cell becomes in the edit state if the Enter key was pressed while cell already has focus. |
GridEditor::ActivateByKeyPress_F2 | 0x0200 | The cell becomes in the edit state if the F2 key was pressed while cell already has focus. |
GridEditor::ActivateByEditPress | ActivateByEnter | ActivateByKeyPress_F2 | ActivateByEnter plus ActivateByKeyPress_F2. |
GridEditor::EatingKeyEvents | 0x0400 | Accessory flag, a sign that you need to send a key press event to the editor, after the beginning of the cell editing initiated by this event. |
GridEditor::EatingMouseEvents | 0x0800 | Accessory flag, A sign that you need to send a mouse event to the editor, after the beginning of the cell editing initiated by this event. |
GridEditor::SelectCurrentEvent | 0x1000 | Accessory flag, grid should start multi-select from this cell. |
GridEditor::OtherMouseEvents | 0x2000 | Accessory flag, do not use it directly. |
GridEditor::ActivateByKeyPress_WithEating | ActivateByKeyPress | EatingKeyEvents | ActivateByKeyPress plus EatingKeyEvents. The cell becomes in the edit state if the any key was pressed while cell has focus. Unlike the ActivateByKeyPress, ActivateByKeyPress_WithEating eats first pressed symbol that caused the event. This first pressed symbol does not passed into the cell editor. You can filtering the value of the key by using the editorEditingStarting() signal. |
GridEditor::ActivateByAnyEvents | ActivateByClick | ActivateByDblClick |
ActivateByMousePress | ActivateByKeyPress | ActivateByEditPress | ActivateByKeyboardFocus | The start of cell editing will start at any event as soon as the cell gets focus. |
The ActivationPolicy type is a typedef for QFlags<ActivationPolicyFlag>. It stores an OR combination of ActivationPolicyFlag values.
enum GridEditor::Type
Enumerator describes the possible types of grid cell editors for table view, banded table view, card view.
Qtitan::GridTableColumn* column = (Qtitan::GridTableColumn *)view->getColumnByModelColumnName("Photo"); column->setEditorType(GridEditor::Picture); Qtitan::GridPictureEditorRepository* pictureEditor = (Qtitan::GridPictureEditorRepository *)column->editorRepository(); pictureEditor->setAspectRatioMode(Qt::KeepAspectRatio);
Constant | Value | Description |
---|---|---|
GridEditor::Auto | 0 | Automatic selection of the editor by edited value. By default. |
GridEditor::String | 1 | The editor of an unary line. See GridStringEditorRepository for the details. |
GridEditor::Memo | 2 | The editor of multi-line text. See GridMemoEditorRepository for the details. |
GridEditor::ComboBoxBlob | 3 | The editor of multi-line text in popup window. See GridBlobEditorRepository for the details. |
GridEditor::Numeric | 4 | The editor of numerical value. See GridNumericEditorRepository for the details. |
GridEditor::CheckBox | 5 | The editor of boolean value. See GridCheckBoxEditorRepository for the details. |
GridEditor::ComboBox | 7 | The editor allows to show combo boxes in the grid cell. See GridComboBoxEditorRepository for the details. |
GridEditor::Table | 8 | The editor allows to specify the other datagrid as details for the editing value. Details grid will be shown in the popup window by clicking on the button that embeded to the grid cell. See GridTableEditorRepository for the details. |
GridEditor::DateTime | 9 | The editor of DateTime value. See GridDateTimeEditorRepository for the details. |
GridEditor::Time | 10 | The editor of Time value. See GridTimeEditorRepository for the details. |
GridEditor::Date | 11 | The editor of Date value. See GridDateEditorRepository for the details. |
GridEditor::Picture | 12 | The editor of picturies or images. See GridPictureEditorRepository for the details. |
GridEditor::ComboBoxPicture | 13 | The editor of picturies and images. The pucture will be edited in the popup window like combobox. See GridPictureComboBoxEditorRepository for the details. |
GridEditor::DelegateAdapter | 14 | The type of editor which allows you to use delegates from the regular table QTableView in the QtitanDataGrid. For more details see GridDelegateAdapterEditorRepository or follow this topic - QtitanDataGrid cell editor |
GridEditor::ProgressBar | 15 | The editor for showing and editing numeric value. Custom ProgressBar widget is used for this purposes. See GridProgressEditorRepository for the details. |
GridEditor::Custom | 16 | The editor of value creating by cutomer. Please read this article for more details - QtitanDataGrid cell editor |