CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxUITableView.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2023 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "FxUIBaseView.h"
20#include "../../sdk/Core/FxUIAbstractItemModel.h"
21#include "../../sdk/Core/FxUIModelIndex.h"
22
23
25{
26 virtual int rowCount( const CFxUIModelIndex &parent = CFxUIModelIndex() ) const = 0;
27 virtual int columnCount( const CFxUIModelIndex &parent = CFxUIModelIndex() ) const = 0;
29
30protected:
31 virtual CFxUIModelIndex index( int row, int column, const CFxUIModelIndex &parent = CFxUIModelIndex() ) const override;
32 virtual CFxUIModelIndex parent( const CFxUIModelIndex &child ) const override;
33};
34
40{
41public:
42
47 {
50 SelectColumns
51 };
52
57 {
61 ExtendedSelection,
64
65 ContiguousSelection
66 };
67
72 {
77 Custom = Fixed
78 };
79
84 NoUpdate = 0x0000,
85 Clear = 0x0001,
86 Select = 0x0002,
87 Deselect = 0x0004,
88 Rows = 0x0020,
89 Columns = 0x0040,
90 ClearAndSelect = Clear | Select
91 };
92
94 {
95 None = 0,
96 Left = 1,
97 Middle = 2,
98 Right = 4
99 };
100
101public:
102
105
108
117
124
130 void setSortingEnabled( bool bEnable );
131
138
145
153 void setColumnWidth( int iColumn, int iWidth );
154
160 int columnWidth( int iColumn ) const;
161
168
170
177
184
189
193 std::vector<CFxUIModelIndex> selectedIndexes() const;
194
203
204
210 void setVerticalHeaderHidden( bool bHide );
211
217 void setHorzHeaderHidden( bool bHide );
218
224 void setHorzScrollBarDisable( bool bDisable );
225
233 void setColumnHidden( int iColumn, bool bHide );
234
241
246
255
256 //...
257
258};
#define COMMONUI_API
QVariant CFxUIVariant
Definition: FxUIObject.h:52
virtual int columnCount(const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
virtual int rowCount(const CFxUIModelIndex &parent=CFxUIModelIndex()) const =0
virtual CFxUIModelIndex parent(const CFxUIModelIndex &child) const override
virtual CFxUIModelIndex index(int row, int column, const CFxUIModelIndex &parent=CFxUIModelIndex()) const override
void setSelectionBehavior(CFxUITableView::UISelectionBehavior behavior)
CFxUISignal< void(CFxUIModelIndex, CFxUITableView::UIMouseClickEvent)> & mouseClicked()
void setColumnWidth(int iColumn, int iWidth)
CFxUIModelIndex currentIndex() const
void setColumnHidden(int iColumn, bool bHide)
CFxUIAbstractItemModel * getModel()
void setVerticalHeaderHidden(bool bHide)
@ NoSelection
Items cannot be selected.
Definition: FxUITableView.h:58
@ SingleSelection
When the user selects an item, any already-selected item becomes unselected, and the user cannot unse...
Definition: FxUITableView.h:59
@ MultiSelection
When the user selects an item in the usual way, the selection status of that item is toggled and the ...
Definition: FxUITableView.h:60
CFxUISignal< void(void)> & selectionChanged()
void setHorzHeaderHidden(bool bHide)
@ SelectItems
This enum selects the single items.
Definition: FxUITableView.h:48
@ SelectRows
This enum selects only the rows.
Definition: FxUITableView.h:49
CFxUISignal< void(const CFxUIModelIndex &)> & itemClicked()
void openPersistentEditor(const CFxUIModelIndex &index)
void setSortingEnabled(bool bEnable)
std::vector< CFxUIModelIndex > selectedIndexes() const
void setSelectionMode(CFxUITableView::UISelectionMode mode)
void setModel(CFxUIAbstractItemModel *model)
void setHorizontalHeaderStretchLastSection(bool bEnable)
void clearSelection()
int columnWidth(int iColumn) const
void setCurrentIndex(CFxUIModelIndex index)
@ Fixed
The user cannot resize the section.
Definition: FxUITableView.h:75
@ Stretch
HeaderView will automatically resize the section to fill the available space.
Definition: FxUITableView.h:74
@ ResizeToContents
HeaderView will automatically resize the section to its optimal size based on the contents of the ent...
Definition: FxUITableView.h:76
@ Interactive
The user can resize the section.
Definition: FxUITableView.h:73
void selectRow(CFxUITableView::UISelectionFlag flag, CFxUIModelIndex index)
void setHorzScrollBarDisable(bool bDisable)
void setHorizontalHeaderResizeSection(CFxUITableView::UIHeaderResizeMode mode, int iColumn)
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
GLuint index
Definition: gles2_ext.h:265